INC = /home/staff/stolfi/gcc/include LIB = /home/staff/stolfi/gcc/lib HFILES = \ krtbox.h \ krtimagepos.h \ krtintersect.h \ krtshape.h \ krtsphere.h \ krtsuperq.h \ krttriangle.h HOFILES = \ krtbox.ho \ krtimagepos.ho \ krtintersect.ho \ krtshape.ho \ krtsphere.ho \ krtsuperq.ho \ krttriangle.ho OFILES = \ krtbox.o \ krtimagepos.o \ krtintersect.o \ krtshape.o \ krtsphere.o \ krtsuperq.o \ krttriangle.o LIBFILE = \ libkrt.a GCCFLAGS = \ -I$(INC) \ -g \ -ansi \ -Wall -Wtraditional -Wpointer-arith -Wmissing-prototypes \ -mfpu all: cleanup $(HOFILES) $(LIBFILE) install cleanup: ;\ ( cd $(INC) && rm -f $(HFILES) $(HOFILES) ) ;\ ( cd $(LIB) && rm -f $(LIBFILE) ) install: ;\ cp -p $(HFILES) $(HOFILES) $(INC) ;\ cp -p $(LIBFILE) $(LIB) %.o: %.c ;\ gcc -c $(GCCFLAGS) $*.c %.ho: %.h ;\ gcc -o $*.ho -c $(GCCFLAGS) -x c $*.h \ || /bin/rm -f $*.ho $(LIBFILE): $(OFILES) ;\ rm -f $*.a && ar crv $*.a $(OFILES) && ranlib $*.a # Dependencies of .h files: krtshape.ho:: krtshape.h $(INC)/r3.ho krtimagepos.ho:: krtimagepos.h $(INC)/r3.ho krtintersect.ho:: krtintersect.h krtshape.ho $(INC)/r3.ho krtbox.ho:: krtbox.h krtshape.ho $(INC)/r3.ho krtsphere.ho:: krtsphere.h krtshape.ho $(INC)/r3.ho krtsuperq.ho:: krtsuperq.h krtshape.ho $(INC)/r3.ho krttriangle.ho:: krttriangle.h krtshape.ho $(INC)/r3.ho # Dependencies for .c files: krtshape.o:: krtshape.c krtshape.ho $(INC)/r3.ho krtimagepos.o:: krtimagepos.c krtimagepos.ho $(INC)/r3.ho krtintersect.o:: krtintersect.c krtintersect.ho $(INC)/r3.ho krtshape.ho krtbox.o:: krtbox.c krtbox.ho krtshape.ho $(INC)/js.ho $(INC)/r3.ho krtsphere.o:: krtsphere.c krtsphere.ho krtshape.ho $(INC)/js.ho $(INC)/r3.ho krtsuperq.o:: krtsuperq.c krtsuperq.ho krtshape.ho $(INC)/js.ho $(INC)/r3.ho krttriangle.o:: krttriangle.c krttriangle.ho krtshape.ho $(INC)/js.ho $(INC)/r3.ho