97a41387e5a5dafe84e94c34640ec494d2f316ea
hiram
  Thu May 23 14:19:32 2013 -0700
approaching something useful refs #9104
diff --git src/userApps/Makefile src/userApps/Makefile
index 8561acd..1ada5ef 100644
--- src/userApps/Makefile
+++ src/userApps/Makefile
@@ -1,19 +1,39 @@
 #  Makefile for userApps project
 #  performs the operations of fetching selected directories from
 #  the kent source tree using 'git' and then building the utilities
-#  in the kent source tree.
+#  in the kent source tree.  All build results will be kept locally
+#  in this directory.
 
-samtabixDir = ${CURDIR}/samtabix
 DESTDIR = ${CURDIR}
 BINDIR = /bin
-extraCFlags =
-mysqlInc =
-mysqlLibs =
-pngLib =
+MACHTYPE = local
+CGI_BIN = ${DESTDIR}/cgi-bin
+DOCUMENTROOT = ${DESTDIR}/htdocs
+SCRIPTS = ${DESTDIR}/scripts
+SAMTABIXDIR = ${DESTDIR}/samtabix
+USE_SAMTABIX = 1
+USE_SSL = 1
+NOSQLTEST = 1
+
+envVars = DESTDIR=${DESTDIR} BINDIR=${BINDIR} MACHTYPE=${MACHTYPE} \
+	CGI_BIN=${CGI_BIN} DOCUMENTROOT=${DOCUMENTROOT} SCRIPTS=${SCRIPTS} \
+	SAMTABIXDIR=${SAMTABIXDIR} USE_SAMTABIX=1 USE_SSL=1 NOSQLTEST=1
+
+all:  fetchSource libs utils
+
+utils:
+	cd kent/src && ${envVars} ${MAKE} userApps
+
+libs:
+	cd samtabix && ${envVars} ${MAKE}
+	cd kent/src && ${envVars} ${MAKE} libs
+
+clean:
+	cd kent/src && ${envVars} ${MAKE} clean
 
 fetchSource:
 	./fetchKentSource.sh
 	@echo -n "size of fetched kent source tree: "
 	@du -hs kent
 	@echo -n "number of files in kent source tree: "
 	@find ./kent -type f | wc -l