On Wednesday, Dec 18, 2002, at 17:16 Europe/Rome, Allan Wind wrote:
Right, but with the following filter command I throw away everything useless.This one is evil, it will pick everything up (temporary files, that testAllFiles = $(wildcard *)
program you wrote to figure something out, object files, binaries etc).
ObjectFiles = $(patsubst %.c,$(ObjectDir)/%.o,$(SourceFiles))You can print these out, to see where things go wrong.
Already done. I get the right list, something like:
./obj/foo.o ./obj/bar.o
It seems not to make any difference. Anyway the error message seems to complain to unable to find a rule for '/obj/foo.o'. I suspect that it can't match the target of the following rule:MyProject: $(ObjectFiles) $(CCompiler) $(CFLAGS) $(LDFLAGS) $(ObjectFiles) -o $@^^^^^^^^^^^^^^ Use $^ (or $? instead).
$(ObjectDir)/%.o: $(SourceDir)%.c
$(CCompiler) $(CFLAGS) -c $^ -o $@
Note that an explicit rule such as:
$(ObjectDir)/foo.o: $(SourceDir)/foo.c
$(CCompiler) $(CFLAGS) -c $^ -o $@
works. But I'd happy to avoid to write an explicit rule for each source file!!!!
Any other hint???
Thanks,
Andrea.
---
Andrea Riciputi <mailto:[EMAIL PROTECTED]>
"Science is like sex: sometimes something useful comes out,
but that is not the reason we are doing it" -- (Richard Feynman)
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make
