10-09-04 01:47 AM
Christopher M. Lusardi wrote:
> Hello,
>
> I have been trying to store my suffixed dot o's in a subdirectory using
> "mv", but make can only find 2 files in a series of many files!
>
> How can I correct my error(see below)?
<snip>
> edit: $(OBJS) $(OBJS2)
> CC $(OBJS_DIR)/$(OBJS) $(OBJS_DIR)/$(OBJS2) -o $@
The above line is a problem. OBJS_DIR is a single directory, but OBJS
(and similairly OBJS2) is a list of files, so this expands to:
/home/clusardi/.objects/main.o file1.o ...
instead of what you want:
/home/clusardi/.objects/main.o /home/clusardi/.objects/file1.o ...
since file1.o isn't in the current directory, but instead under
$OBJS_DIR just like main.o, and so you get the error message.
I suspect the "patsub" command could help you convert %.o into
$(OBJS_DIR)/%.o.
If you're still having problems, posting a small, complete example that
demonstrates the problem would be useful.
Ed.
[ Post a follow-up to this message ]
|