Subject: Re: compilling probs
To: None <mcmahill@mtl.mit.edu>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-mac68k
Date: 08/10/1999 10:02:39
On Mon, 9 Aug 1999 mcmahill@mtl.mit.edu wrote:
> On Mon, 9 Aug 1999, Colomb wrote:
>
> > I used to use
> > makefile on a Unix box a school, but for the life of me I can't remember
> > how to write the nakefile and the man pages only refer to a Tutorial for
> > that.
>
> A really simple one would be:
>
>
> test: test.c
> $(CC) $(CFLAGS) -o $@ $<
> I'd recommend reading the O'Reilly book "Managing Projects with Make" or
> go to the gnu web page, www.gnu.org, and find the manual for gmake.
The O'Reilly book is good, but for 4.4BSD, you can do something simpler:
PROG= test
SRC= test.cc (it was a c++ program to start)
NOMAN= 1 (no manpage)
.include <bsd.prog.mk>
To add a second c file, best.cc,
SRC= test.cc best.cc
Want to throw in a lex file or a yacc file?
SRC= test.cc best.cc lex.l yacc.y
make clean will do the right thing and clean all the generated files up.
Add a man page?
MAN= test.1
Take care,
Bill