src/utils/textHistogram/makefile 1.13

1.13 2009/03/26 20:18:41 hiram
updated to use DESTDIR and BINDIR
Index: src/utils/textHistogram/makefile
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/textHistogram/makefile,v
retrieving revision 1.12
retrieving revision 1.13
diff -b -B -U 1000000 -r1.12 -r1.13
--- src/utils/textHistogram/makefile	10 Mar 2009 00:34:50 -0000	1.12
+++ src/utils/textHistogram/makefile	26 Mar 2009 20:18:41 -0000	1.13
@@ -1,14 +1,16 @@
 include ../../inc/common.mk
 
 L += -lm
-MYLIBDIR = ../../lib/$(MACHTYPE)
-MYLIBS =  $(MYLIBDIR)/jkweb.a
+MYLIBDIR = ../../lib/${MACHTYPE}
+MYLIBS =  ${MYLIBDIR}/jkweb.a ${L}
 
+A = textHistogram
 O = textHistogram.o
 
-textHistogram: $O $(MYLIBS)
-	${CC} ${COPT} ${CFLAGS} -o ${BINDIR}/textHistogram $O $(MYLIBS) $L
-	${STRIP} ${BINDIR}/textHistogram${EXE}
+textHistogram: $O ${MYLIBS}
+	@${MKDIR} "${DESTDIR}${BINDIR}"
+	${CC} ${COPT} ${CFLAGS} -o ${DESTDIR}${BINDIR}/${A}${EXE} $O ${MYLIBS}
+	${STRIP} ${DESTDIR}${BINDIR}/${A}${EXE}
 
-clean:
+clean::
 	rm -f ${O}