# Last edited on 2007-04-16 21:09:54 by stolfi LIBNAME = libaa INC = ${HOME}/PUB/include LIB = ${HOME}/PUB/${PLATFORM}/lib HFILES := \ aa.h \ aarange.h \ aaeval.h CFILES := \ aa.c \ aarange.c \ aaeval.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ ${LIBNAME}.a .PHONY: all clean uninstall install check # all: clean uninstall install all: uninstall install # all: check 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} check: cd tests && make all clean: -/bin/rm -f *.o *.ho *.a core cd tests && make clean IFLAGS := \ -I. -I${INC} CFLAGS := \ -g -ffloat-store -frounding-math \ -Wall -Wpointer-arith -Wmissing-prototypes %.o: %.c ;\ ${CC} -c ${CFLAGS} ${IFLAGS} $*.c %.ho: %.h ;\ ${CC} -o $*.ho -c ${CFLAGS} ${IFLAGS} -x c $*.h \ || /bin/rm -f $*.ho ${LIBFILE}: ${OFILES} ;\ rm -f $*.a && ar crv $*.a ${OFILES} && ranlib $*.a # ==================================================================== # Dependencies: DEPFILE := Deps.make depend: /bin/rm -f ${DEPFILE} extract-ho-deps ${IFLAGS} -I/usr/include ${HFILES} ${CFILES} \ | egrep -v ': /usr/include' \ > ${DEPFILE} cd tests && make depend # Include specific dependencies extracted by "make depend" include ${DEPFILE}