help with Makefile

Rick Schneider rick at vsi1.UUCP
Fri Aug 12 01:23:12 AEST 1988


>From article <370 at fedeva.UUCP>, by wrd3156 at fedeva.UUCP (Bill Daniels):
> 
> ... but leaves ugly ".c"s around after the 
> compilation has completed.

< init_db: $(DIR1)/init_db.o
<  	/bin/sh $(ULD) init_db \
<  	    $(DIR1)/init_db.o
<  
< $(DIR1)/init_db.o: $(DIR1)/init_db.c $(DEFS)/file.h \
<  		   $(LOCINC)/cr.h $(LOCINC)/input.h
<  	cd $(DIR1); $(UCC) init_db.c
        rm -f init_db.c
        ^^^^^^^^^^^^^^^

or add a new directive:

clean:	rm -f $(DIR1)/*.c

and when you want to remove the source files type:

make clean



 



More information about the Comp.unix.questions mailing list