# Last edited on 2003-07-28 02:23:47 by stolfi LIBNAME = libaa INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib HFILES := \ aa.h \ aarange.h \ aaeval.h \ aa_compile.h CFILES := \ aa.c \ aarange.c \ aaeval.c \ aa_compile.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ ${LIBNAME}.a .PHONY: all clean uninstall install test # all: clean uninstall install all: 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 \ -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: aa.ho:: aa.h ${INC}/js.ho ${INC}/flt.ho ${INC}/ia.ho aaeval.ho:: aaeval.h aa.ho ${INC}/pcode.ho aa_compile.ho:: aa_compile.h ${INC}/pcode.ho # Dependencies for .c files: aa.o:: aa.c aa.ho ${INC}/js.ho ${INC}/ioprotos.ho ${INC}/flt.ho ${INC}/ia.ho aaeval.o:: aaeval.c aaeval.ho aa.ho ${INC}/pcode.ho ${INC}/flt.ho \ ${INC}/ia.ho ${INC}/js.ho ${INC}/ioprotos.ho aa_compile.o:: aa_compile.c ${INC}/ia.ho ${INC}/js.ho ${INC}/pcode.ho