# Last edited on 2005-02-04 07:43:42 by stolfi JSINC := /home/staff/stolfi/PUB/include JSLIB := /home/staff/stolfi/PUB/${PLATFORM}/lib CPKINC := ../.. CPKLIB := ../.. PROG := testhexpaint HFILES := HOFILES := ${subst .h,.ho,${HFILES}} CFILES := OFILES := ${subst .c,.o,${CFILES}} .PHONY: all clean run depend all: clean run # ==================================================================== # Run the test PSOUT := test.ps run: ${PROG} time ${PROG} gv ${PSOUT} # ==================================================================== # Cleanup clean: -/bin/rm -f *.o *.ho *.a ${PROG} core # ==================================================================== # Compiling, linking .SUFFIXES: LIBS := \ ${CPKLIB}/libcpk.a \ ${JSLIB}/libgeo.a \ ${JSLIB}/libps.a \ ${JSLIB}/libjs.a IFLAGS := \ -I${CPKINC} \ -I${JSINC} CFLAGS := \ -ggdb \ -Wall -Wpointer-arith -Wmissing-prototypes \ LDFLAGS := \ -ggdb %.o: %.c ;\ gcc -c ${GCCFLAGS} ${IFLAGS} $*.c %.ho: %.h ;\ gcc -o $*.ho -c ${GCCFLAGS} ${IFLAGS} -x c $*.h \ || /bin/rm -f $*.ho ${PROG}: ${PROG}.o ${OFILES} ${LIBS} -rm -f ${PROG} gcc -o ${PROG} ${LDFLAGS} ${PROG}.o ${OFILES} ${LIBS} -lm # ==================================================================== # Dependencies DEPFILE := Deps.make depend: /bin/rm -f ${DEPFILE} extract-ho-deps ${IFLAGS} -I/usr/include ${HFILES} ${CFILES} ${PROG}.c \ | egrep -v ': /usr/include' \ > ${DEPFILE} # Include specific dependencies extracted by "make depend" include ${DEPFILE}