Hello, Thanks for your response.
I have already tried the rule $(OBJECTS_DIR)/%.o : $(SOURCES_DIR)/%.c makefile but this also doesn't work: it gives the sames results Any other idea ? Vincent De Groote On 23 October 2010 03:04, Luke Shumaker <[email protected]> wrote: > On Fri, 2010-10-22 at 00:16 +0200, Vincent De Groote wrote: > > Hello, > > > > I have a problem with a makefile (sic !). gmake is executed in a build > > directory, with several subdirectories. > > I want to build a library from several sources, and then build an > executable > > from a test file and that library. > > > > If I do not try to put the object files in the objects directory, > everything > > works fine. > > When I try to write the objects in the objects directory, gmake ends with > > the following error: > > > > make: *** No rule to make target `objects/tester.o', needed by > > `bin/tester.exe'. Stop. > > > > In my mind, the rule > > > > $(OBJECTS_DIR)/%.o : %.c makefile > > > > should do the job. > > Try > > $(OBJECTS_DIR)/%.o : $(SOURCES_DIR)/%.o makefile > > Now, if you set VPATH to include $(SOURCES_DIR), I'd expect what you > originally had to work. However you did set VPATH to include > $(SOURCES_DIR), so I'm not sure. > > ~ LukeShu > > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
