# Last edited on 2005-08-25 21:36:26 by stolfi LIBNAME = libquad INC = ${HOME}/PUB/include LIB = ${HOME}/PUB/${PLATFORM}/lib HFILES = \ quad.h CFILES = \ quad.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: 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 \ -ansi \ -Wall -Wpointer-arith -Wmissing-prototypes %.o: %.c ;\ /usr/bin/gcc -c ${CFLAGS} ${IFLAGS} $*.c %.ho: %.h ;\ /usr/bin/gcc -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} # Include specific dependencies extracted by "make depend" include ${DEPFILE}