# Generic tools for functional approximation # Last edited on 2003-11-03 01:38:44 by stolfi INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib LIBNAME = libapprox HFILES = \ FBas.h \ FBasPoly2.h CFILES = \ FBas.c \ FBasPoly2.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ ${LIBNAME}.a HOFILES := $(subst .h,.ho,${HFILES}) OFILES := $(subst .c,.o,${CFILES}) all: uninstall clean 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 \ -ansi \ -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 ${PROG}: ${OFILES} ${LIBS} @echo "CFILES = ${CFILES}" @echo "OFILES = ${OFILES}" gcc ${LDFLAGS} -o ${PROG} ${OFILES} ${LIBS} -lm # Dependencies of .h files: FBas.ho: FBas.h FBasPoly2.ho: FBasPoly2.h FBas.ho # Dependencies for .c files: FBas.o: FBas.c FBas.ho FBasPoly2.ho \ ${INC}/rn.ho ${INC}/gauss_elim.ho \ ${INC}/js.ho ${INC}/filefmt.ho ${INC}/nget.ho ${INC}/fget.ho FBasPoly2.o: FBasPoly2.c FBas.ho FBasPoly2.ho \ ${INC}/js.ho ${INC}/filefmt.ho ${INC}/nget.ho ${INC}/fget.ho