# Branch-and-bound global optimization with interval estimator # Last edited on 2003-09-25 10:49:38 by stolfi INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib LIBNAME = libbbopt HFILES = \ fbox.h \ fboxheap.h \ fboxlist.h \ bbopt.h \ bbgoal.h CFILES = \ fbox.c \ fboxheap.c \ fboxlist.c \ bbopt.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: fbox.ho:: fbox.h ${INC}/ia.ho fboxheap.ho:: fboxheap.h fbox.ho ${INC}/ia.ho fboxlist.ho:: fboxlist.h fbox.ho bbopt.ho:: bbopt.h fbox.ho fboxlist.ho ${INC}/ia.ho bbgoal.ho:: bbgoal.h ${INC}/ia.ho ${INC}/flt.ho # Dependencies for .c files: fbox.o:: fbox.c fbox.ho ${INC}/ia.ho fboxheap.o:: fboxheap.c fbox.ho fboxheap.ho ${INC}/js.ho ${INC}/ia.ho fboxlist.o:: fboxlist.c fbox.ho fboxlist.ho ${INC}/js.ho bbopt.o:: bbopt.c bbopt.ho fbox.ho fboxheap.ho fboxlist.ho \ ${INC}/js.ho ${INC}/ps.ho \ ${INC}/ia.ho ${INC}/aa.ho