# Floating-point hacks # Last edited on 2003-12-21 13:54:23 by stolfi INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib HFILES := \ gauss_elim.h \ sym_eigen.h \ rn.h \ r2.h \ r3.h \ r4.h \ r6.h \ rmxn.h \ r2x2.h \ r3x3.h \ r4x4.h \ r6x6.h \ argparser_geo.h CFILES := \ gauss_elim.c \ sym_eigen.c \ rn.c \ r2.c \ r3.c \ r4.c \ r6.c \ rmxn.c \ r2x2.c \ r3x3.c \ r4x4.c \ r6x6.c \ argparser_geo.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ libgeo.a .PHONY: all uninstall clean install test # all: uninstall clean ${LIBFILE} install # all: ${LIBFILE} install all: ${LIBFILE} install test uninstall: cd ${INC} && rm -f ${HFILES} ${HOFILES} cd ${LIB} && rm -f ${LIBFILE} install: ${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 cd tests && make clean 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 ${LIBFILE}: ${OFILES} rm -f $*.a && ar crv $*.a ${OFILES} && ranlib $*.a # Dependencies of .h files: gauss_elim.ho:: gauss_elim.h sym_eigen.ho:: sym_eigen.h r2.ho:: r2.h r3.ho:: r3.h r4.ho:: r4.h r6.ho:: r6.h rn.ho:: rn.h r2x2.ho:: r2x2.h r2.ho r3x3.ho:: r3x3.h r3.ho r4x4.ho:: r4x4.h r4.ho r6x6.ho:: r6x6.h r6.ho rmxn.ho:: rmxn.h rn.ho argparser_geo.ho:: argparser_geo.h r3.ho r4.ho \ ${INC}/argparser.ho ${INC}/js.ho # Dependencies of .c files: gauss_elim.o:: gauss_elim.c gauss_elim.ho ${INC}/js.ho sym_eigen.o:: sym_eigen.c sym_eigen.ho ${INC}/js.ho r2.o:: r2.c r2.ho rn.ho ${INC}/ioprotos.ho ${INC}/js.ho r3.o:: r3.c r3.ho rn.ho ${INC}/ioprotos.ho ${INC}/js.ho r4.o:: r4.c r4.ho rn.ho ${INC}/ioprotos.ho ${INC}/js.ho r6.o:: r6.c r6.ho rn.ho ${INC}/ioprotos.ho ${INC}/js.ho rn.o:: rn.c rn.ho gauss_elim.ho ${INC}/ioprotos.ho ${INC}/js.ho r2x2.o:: r2x2.c r2x2.ho r2.ho rmxn.ho ${INC}/ioprotos.ho r3x3.o:: r3x3.c r3x3.ho r3.ho rmxn.ho ${INC}/ioprotos.ho r4x4.o:: r4x4.c r4x4.ho r4.ho rmxn.ho ${INC}/ioprotos.ho r6x6.o:: r6x6.c r6x6.ho r6.ho rmxn.ho ${INC}/ioprotos.ho rmxn.o:: rmxn.c rmxn.ho rn.ho gauss_elim.ho ${INC}/ioprotos.ho ${INC}/js.ho argparser_geo.o:: argparser_geo.c argparser_geo.ho r3.ho r4.ho \ ${INC}/argparser.ho ${INC}/js.ho