Re: how do you add to the makefile

From: Bryan Donlan (bdonlan@maine.rr.com)
Date: 05/06/02


On Sunday 05 May 2002 09:15 am, you wrote:
> Ken Kreb wrote:
> > Ok how do you add a new .c file to your makefile?
> > ea;  what all has to be done to make it work?
>
> You add to Makefile.in:
> OBJFILES = ... newfile.o
>
> Then you add a ``newfile.o'' definition in the end of the file,--
> newfile.o: newfile.h newfile.c
>   $(CC) -c $(CFLAGS) newfile.c

Wouldn't it be best to use wildcards? And what with configure, it'd be safe to
use auto-dependency generation. With that, you'd merekly have to add the .c
to the /src/ directory... If the make is not GNU, or gcc dosen't support the
-M option, you could do it manually, in ./configure.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT