# NeXTSTEP 3.2 # boilerplate stuff for makefiles CC = cc -Wall -g -I../../include -DVERSION='"$(VERSION)"'# how to call the C compiler SHELL = /bin/sh# some make's need this... VERSION = 1.11 chmod = chmod# how to change the mode of a file ln = ln -s# how to link a file ranlib = ranlib# how to make the archive symboltable # this rule uses the GNU C compiler to produce makefile dependencies # from the C source file list $c. # the rule depends on the header file list $h to simplify # bootstrapping. depend: $h $c makefile - if [ -f $@ ]; then $(chmod) +w $@; else $(ln) ../$@ .; fi > $@ - [ "$c" ] && $(CC) -MM $(CFLAGS) $c >> $@ $(chmod) -w $@ # this rule generates the dependencies of a library $l on its objects made # from the file list $c. this rule could be much smarter but at least # ESIX/make appears to be quite broken. makefile.etc: makefile - if [ -f $@ ]; then $(chmod) +w $@; else $(ln) ../$@ .; fi for o in $(c:.c=); do \ echo '$$l: '"$$o.o"; \ echo "$$o.o: $$o.c"; \ done > $@ $(chmod) -w $@ # this rule inserts the objects $o into the library $l. # note that NeXTSTEP 3.1 ranlib apparently backdates the library, i.e., # this rule may get executed a few times too many... mklib: $(AR) $(ARFLAGS) $l $o $(ranlib) $l .c.a: ; # this rule produces debugging objects .SUFFIXES: .do .c .c.do: ; $(CC) -DDEBUG $(CFLAGS) -c -o $@ $*.c -include depend