help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hel on GNU make


From: BobR
Subject: Re: hel on GNU make
Date: Sun, 11 Sep 2005 01:34:21 GMT

a R T u n wrote in message
<1126362065.134462.272680@g49g2000cwa.googlegroups.com>...
>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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]