]> git.donarmstrong.com Git - samtools.git/blobdiff - Makefile
mpileup indel hotfix: fix in detecting long stretches of N's. The version string...
[samtools.git] / Makefile
index 2f51bfcb920aef7cfada148a1743c1f1fa9b47db..a584c7aded36099624707490163d2c10ea7097d0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,11 @@
+# The default version string in bam.h and bcftools/bcf.h can be overriden directly
+#   make VERSION="-DVERSION='\\\"my-version\\\"'"
+# or using the git-stamp rule
+#   make git-stamp
+VERSION=
+
 CC=                    gcc
-CFLAGS=                -g -Wall -O2
+CFLAGS=                -g -Wall $(VERSION) -O2
 #LDFLAGS=              -Wl,-rpath,\$$ORIGIN/../lib
 DFLAGS=                -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
 KNETFILE_O=    knetfile.o
@@ -17,6 +23,7 @@ SUBDIRS=      . bcftools misc
 LIBPATH=
 LIBCURSES=     -lcurses # -lXCurses
 
+
 .SUFFIXES:.c .o
 .PHONY: all lib
 
@@ -35,6 +42,9 @@ all-recur lib-recur clean-recur cleanlocal-recur install-recur:
 
 all:$(PROG)
 
+git-stamp:
+               make VERSION="-DVERSION='\\\"`git describe --always --dirty`\\\"'"
+
 .PHONY:all lib clean cleanlocal
 .PHONY:all-recur lib-recur clean-recur cleanlocal-recur install-recur