a R T u n wrote in message <[EMAIL PROTECTED]>... >I am sorry if my question is offtopic in this group. But there isn't >any dedicated group for GNU make. If there please let me know. > >My problem with GNU make is managing a c++ project with several >modules. Specifically, what I want to do is to read sources from ./src >and header from ./include directories resoectively, and place the >objects under ./obj and output under ./out directories. The ./obj and >./out directories are created in the makefile if they do not exist. > >The main part of my makefile to handle this is as below: > >all: dirs $(OUTFILE) > >$(OUTFILE) : $(OBJECTS) > $(LD) $(LFLAGS) $< > >%.obj : %.cpp > @$(CC) $(CFLAGS) $<
<guessing> I think the GCC default is '*.o'. %.o : %.cpp @$(CC) $(CFLAGS) $< > >When I run the make for the first time it says LINK: fatal error 1181: >cannot open input file "firstfile.obj" Which is probably "firstfile.o". I'm no 'makefile' expert (I use an IDE <G>), but, you might try that and see what difference you get. -- Bob R POVrookie -- MinGW (GNU compiler): http://www.mingw.org/ Dev-C++ IDE: http://www.bloodshed.net/ POVray: http://www.povray.org/ alt.comp.lang.learn.c-c++ faq: http://www.comeaucomputing.com/learn/faq/ _______________________________________________ Help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
