# Last edited on 2003-09-25 00:45:54 by stolfi PROG := testtbfind INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib .PHONY: all clean run clean-single single show-ps # all: clean run all: run GCCFLAGS := \ -I. -I${INC} \ -g \ -Wall -Wpointer-arith -Wmissing-prototypes HFILES := MAINC = ${PROG}.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBS = \ ${LIB}/libps.a \ ${LIB}/libjs.a PSFILE := ${PROG}.eps SHOWPS = kghostview ${PSFILE}: ${PROG} ${PROG} show-ps: ${PSFILE} ${SHOWPS} ${PSFILE} run: ${PSFILE} show-ps clean: /bin/rm -f *.o *.ho core ${PROG} ${EPSFILE} # Linking: ${PROG}: ${OFILES} ${PROG}.o ${LIBS} gcc -o ${PROG} ${PROG}.o ${OFILES} ${LIBS} -lm # General dependencies: %.o: %.c gcc -c ${GCCFLAGS} $*.c %.ho: %.h gcc -o $*.ho -c ${GCCFLAGS} -x c $*.h \ || /bin/rm -f $*.ho # Specific dependencies of .ho files: # Specific dependencies for .o files: ${PROG}.o: ${PROG}.c ${INC}/tbfind.ho ${INC}/js.ho gcc -o ${PROG}.o -c ${GCCFLAGS} ${MAINC}