src/inc/common.mk 1.76
1.76 2010/02/24 01:10:23 angie
I have added some hooks into knetfile.c in our local copy of samtools, so that knetfile can serve as a wrapper on udc (or any other suitable code). If KNETFILE_HOOKS=1 (in addition to USE_BAM=1) this will bring the benefits of udc to bam tracks.
Index: src/inc/common.mk
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/common.mk,v
retrieving revision 1.75
retrieving revision 1.76
diff -b -B -U 1000000 -r1.75 -r1.76
--- src/inc/common.mk 31 Jan 2010 17:47:37 -0000 1.75
+++ src/inc/common.mk 24 Feb 2010 01:10:23 -0000 1.76
@@ -1,148 +1,151 @@
CC=gcc
# to build on sundance: CC=gcc -mcpu=v9 -m64
ifeq (${COPT},)
COPT=-O -g
endif
CFLAGS=
HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${MACHTYPE}
HG_INC=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc
#global external libraries
L=
# libssl: disabled by default
ifeq (${USE_SSL},)
USE_SSL=0
endif
ifeq (${USE_SSL},1)
L+=-lssl
HG_DEFS+=-DUSE_SSL
endif
# libpng: disabled by default
ifeq (${USE_PNG},)
USE_PNG=0
endif
ifeq (${USE_PNG},1)
ifeq (${PNGLIB},)
PNGLIB=-lpng
endif
L+=${PNGLIB}
HG_DEFS+=-DUSE_PNG
HG_INC+=${PNGINCL}
endif
-# libbam: disabled by default
+# libbam (samtools, and Angie's KNETFILE_HOOKS extension to it): disabled by default
ifeq (${USE_BAM},)
USE_BAM=0
endif
ifeq (${USE_BAM},1)
ifeq (${SAMDIR},)
- SAMDIR = /hive/data/outside/samtools/samtools/${MACHTYPE}
+ SAMDIR = /hive/data/outside/samtools/svn_${MACHTYPE}/samtools
endif
ifeq (${SAMINC},)
SAMINC = ${SAMDIR}
endif
ifeq (${SAMLIB},)
SAMLIB = ${SAMDIR}/libbam.a
endif
HG_INC += -I${SAMINC}
L+=${SAMLIB}
HG_DEFS+=-DUSE_BAM
endif
+ifeq (${KNETFILE_HOOKS},1)
+ HG_DEFS+=-DKNETFILE_HOOKS
+endif
# libfuse: disabled by default
ifeq (${USE_FUSE},)
USE_FUSE=0
endif
ifeq (${USE_FUSE},1)
L+=-lfuse
HG_DEFS+=-DUSE_FUSE
endif
ifeq (${HG_WARN},)
ifeq (darwin,$(findstring darwin,${OSTYPE}))
HG_WARN = -Wall -Wno-unused-variable -Wno-long-double
HG_WARN_UNINIT=
else
ifeq (solaris,$(findstring solaris,${OSTYPE}))
HG_WARN = -Wall -Wformat -Wimplicit -Wreturn-type
HG_WARN_UNINIT=-Wuninitialized
else
HG_WARN = -Wall -Werror -Wformat -Wimplicit -Wreturn-type
HG_WARN_UNINIT=-Wuninitialized
endif
endif
# -Wuninitialized generates a warning without optimization
ifeq ($(findstring -O,${COPT}),-O)
HG_WARN += ${HG_WARN_UNINIT}
endif
endif
# this is to hack around many make files not including HG_WARN in
# the link line
CFLAGS += ${HG_WARN}
ifeq (${SCRIPTS},)
SCRIPTS=/cluster/bin/scripts
endif
ifeq (${CGI_BIN},)
CGI_BIN=/usr/local/apache/cgi-bin
endif
ifeq (${DOCUMENTROOT},)
DOCUMENTROOT=/usr/local/apache/htdocs
endif
ifeq (${BINDIR},)
BINDIR = ${HOME}/bin/${MACHTYPE}
endif
ifeq (${ENCODE_PIPELINE_BIN},)
ENCODE_PIPELINE_BIN=/cluster/data/encode/pipeline/bin
endif
MKDIR=mkdir -p
ifeq (${STRIP},)
STRIP=strip
endif
CVS=cvs
# portable naming of compiled executables: add ".exe" if compiled on
# Windows (with cygwin).
ifeq (${OS}, Windows_NT)
AOUT=a.exe
EXE=.exe
else
AOUT=a.out
EXE=
endif
# location of stringify program
STRINGIFY = ${DESTDIR}${BINDIR}/stringify
#Lowelab defines
#The lowelab specific code will be included in compilation if the following conditions are satistied
LOWELAB_WIKI_DEF=
LOWELAB_DEF=
ifdef LOWELAB
LOWELAB_WIKI=1
LOWELAB_DEF=-DLOWELAB
endif
ifdef LOWELAB_WIKI
LOWELAB_WIKI_DEF=-DLOWELAB_WIKI
endif
LOWELAB_DEFS=${LOWELAB_DEF} ${LOWELAB_WIKI_DEF}
ifdef LOWELAB
ifeq (${SCRIPTS},/cluster/bin/scripts)
SCRIPTS=${HOME}/scripts
endif
ifeq (${CGI_BIN},/usr/local/apache/cgi-bin)
CGI_BIN=/www/cgi-bin
endif
ifeq (${DOCUMENTROOT},/usr/local/apache/htdocs)
DOCUMENTROOT=/www/browser-docs
endif
endif
%.o: %.c
${CC} ${COPT} ${CFLAGS} ${HG_DEFS} ${LOWELAB_DEFS} ${HG_WARN} ${HG_INC} ${XINC} -o $@ -c $<