X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Makefile;h=a584c7aded36099624707490163d2c10ea7097d0;hb=7c3295ba455fdc9269156dd1246c92ea5df3efd4;hp=c7ac7fd5ecc7f58b3a3ea8fc4f53f9852b86086a;hpb=3880f184334b2b5afe27de5c5a0f344cdcff1ef9;p=samtools.git diff --git a/Makefile b/Makefile index c7ac7fd..a584c7a 100644 --- 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 @@ -10,13 +16,14 @@ AOBJS= bam_tview.o bam_plcmd.o sam_view.o \ bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o \ bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o \ cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o \ - bam_tview_curses.o + bam_tview_curses.o bam_tview_html.o PROG= samtools INCLUDES= -I. 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 @@ -64,7 +74,8 @@ bam_plcmd.o:bam.h faidx.h bcftools/bcf.h bam2bcf.h bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h bam_lpileup.o:bam.h ksort.h bam_tview.o:bam.h faidx.h bam_tview.h -bam_tview_curses.o:bam.h faidx.h bam_tview.h bam_tview_curses.h +bam_tview_curses.o:bam.h faidx.h bam_tview.h +bam_tview_html.o:bam.h faidx.h bam_tview.h bam_sort.o:bam.h ksort.h razf.h bam_md.o:bam.h faidx.h sam_header.o:sam_header.h khash.h