0e2b924a7b0e384df35d5f5d1ab00e408aa9d034 hiram Wed Mar 27 16:10:03 2013 -0700 adding some sanity to the makefiles with DESTDIR compile and install targets refs #9104 diff --git src/utils/bestThreshold/makefile src/utils/bestThreshold/makefile index 1abb73d..fea0dd3 100644 --- src/utils/bestThreshold/makefile +++ src/utils/bestThreshold/makefile @@ -1,18 +1,27 @@ include ../../inc/common.mk L += -lm -MYLIBDIR = ../../lib/${MACHTYPE} -MYLIBS = ${MYLIBDIR}/jkweb.a +MYLIBDIR = ../../lib/$(MACHTYPE) +MYLIBS = $(MYLIBDIR)/jkweb.a O = bestThreshold.o +A = bestThreshold -bestThreshold: $O ${MYLIBS} - ${CC} ${COPT} -o ${BINDIR}/bestThreshold $O ${MYLIBS} $L - ${STRIP} ${BINDIR}/bestThreshold${EXE} +${A}: ${O} + ${CC} ${COPT} -o ${DESTDIR}${BINDIR}/${A} $O ${MYLIBS} ${L} + ${STRIP} ${DESTDIR}${BINDIR}/${A}${EXE} -test: - bestThreshold in.good in.bad > out +compile:: ${O} ${MYLIBS} + ${CC} ${COPT} ${CFLAGS} -o ${A}${EXE} $O ${MYLIBS} ${L} + +install:: compile + rm -f ${DESTDIR}${BINDIR}/${A}${EXE} + cp -p ${A}${EXE} ${DESTDIR}${BINDIR}/${A}${EXE} + ${STRIP} ${DESTDIR}${BINDIR}/${A}${EXE} + +test: compile + ./${A}${EXE} in.good in.bad > out diff expected out -clean: - rm -f $O +clean:: + rm -f ${O} ${A}${EXE} out