# Last edited on 2003-01-14 15:41:28 by stolfi LIBNAME = libia INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib HFILES := \ ia.h \ zf.h \ iaeval.h \ box.h CFILES := \ ia.c \ zf.c \ iaeval.c \ box.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ ${LIBNAME}.a .PHONY: all clean uninstall install test # all: uninstall install test all: clean uninstall install # all: test uninstall: cd ${INC} && /bin/rm -f ${HFILES} ${HOFILES} cd ${LIB} && /bin/rm -f ${LIBFILE} install: ${HOFILES} ${LIBFILE} cp -p ${HFILES} ${INC} cp ${HOFILES} ${INC} cp -p ${LIBFILE} ${LIB} test: cd tests && make all clean: -/bin/rm -f *.o *.ho *.a core cd tests && make clean GCCFLAGS = \ -I. -I${INC} \ -g \ -ansi \ -Wall -Wpointer-arith -Wmissing-prototypes %.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: ia.ho:: ia.h ${INC}/flt.ho zf.ho:: zf.h ia.ho ${INC}/flt.ho iaeval.ho:: iaeval.h ia.ho ${INC}/pcode.ho box.ho:: box.h ia.ho # Dependencies for .c files: ia.o:: ia.c ia.ho ${INC}/flt.ho ${INC}/js.ho ${INC}/ioprotos.ho zf.o:: zf.c zf.ho ia.ho ${INC}/js.ho ${INC}/ioprotos.ho \ ${INC}/flt.ho iaeval.o:: iaeval.c iaeval.ho ia.ho ${INC}/pcode.ho ${INC}/flt.ho \ ${INC}/js.ho ${INC}/ioprotos.ho box.o:: box.c box.ho ia.ho ${INC}/js.ho ${INC}/flt.ho