# Producing Postscript figures from C programs # Last edited on 2003-09-25 10:49:43 by stolfi LIBNAME = libfgraph INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib HFILES := \ fltgraph.h \ iagraph.h \ aagraph.h CFILES := \ fltgraph.c \ iagraph.c \ aagraph.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ ${LIBNAME}.a # all: uninstall clean install all: uninstall install uninstall: cd ${INC} && /bin/rm -f ${HFILES} ${HOFILES} cd ${LIB} && /bin/rm -f ${LIBFILE} install: ${HFILES} ${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 # Library dependencies: ${LIBFILE}: ${OFILES} ;\ rm -f $*.a && ar crv $*.a ${OFILES} && ranlib $*.a # Compilation rules: 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 # Dependencies of .h files: fltgraph.ho: fltgraph.h ${INC}/flt.ho ${INC}/ia.ho iagraph.ho: iagraph.h ${INC}/flt.ho ${INC}/ia.ho aagraph.ho: aagraph.h ${INC}/flt.ho ${INC}/ia.ho ${INC}/aa.ho # Dependencies for .c files: fltgraph.o: fltgraph.c fltgraph.ho \ ${INC}/js.ho ${INC}/flt.ho ${INC}/ia.ho ${INC}/ps.ho iagraph.o: iagraph.c iagraph.ho \ ${INC}/js.ho ${INC}/flt.ho ${INC}/ia.ho ${INC}/ps.ho aagraph.o: aagraph.c aagraph.ho \ ${INC}/js.ho ${INC}/flt.ho ${INC}/ia.ho ${INC}/aa.ho ${INC}/ps.ho