summarylogtreecommitdiffstats
path: root/makefile-system-htslib.patch
blob: 7ae2b4c6f295ff822ce490e8a983435ad0a2fba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff -aur /tmp/makepkg/bcftools/src/bcftools-1.3.1/Makefile /tmp/makepkg/bcftools/src/bcftools-1.3.1-patched/Makefile
--- /tmp/makepkg/bcftools/src/bcftools-1.3.1/Makefile	2016-04-22 11:50:59.000000000 +0200
+++ /tmp/makepkg/bcftools/src/bcftools-1.3.1-patched/Makefile	2016-05-29 20:18:22.323268586 +0200
@@ -28,18 +28,10 @@
 
 all: $(PROG) $(TEST_PROG)
 
-# Adjust $(HTSDIR) to point to your top-level htslib directory
-HTSDIR = htslib-1.3.1
-include $(HTSDIR)/htslib.mk
-HTSLIB = $(HTSDIR)/libhts.a
-BGZIP  = $(HTSDIR)/bgzip
-TABIX  = $(HTSDIR)/tabix
+HTSDIR = /usr/include
 
 CC       = gcc
-CPPFLAGS =
-CFLAGS   = -g -Wall -Wc++-compat -O2
-LDFLAGS  =
-LIBS     =
+CFLAGS   := -g -Wall -Wc++-compat -O2 $(CFLAGS)
 
 OBJS     = main.o vcfindex.o tabix.o \
            vcfstats.o vcfisec.o vcfmerge.o vcfquery.o vcffilter.o filter.o vcfsom.o \
@@ -48,7 +40,7 @@
            vcfcnv.o HMM.o vcfplugin.o consensus.o ploidy.o version.o \
            ccall.o em.o prob1.o kmin.o # the original samtools calling
 
-EXTRA_CPPFLAGS = -I. -I$(HTSDIR) -DPLUGINPATH=\"$(pluginpath)\"
+EXTRA_CPPFLAGS = -I. -DPLUGINPATH=\"$(pluginpath)\"
 GSL_LIBS       =
 
 # The polysomy command is not compiled by default because it brings dependency
@@ -57,7 +49,7 @@
 ifdef USE_GPL
     EXTRA_CPPFLAGS += -DUSE_GPL
     OBJS += polysomy.o peakfit.o
-    GSL_LIBS = -lgsl -lcblas
+    GSL_LIBS = -lgsl -lgslcblas
 endif
 
 prefix      = /usr/local
@@ -101,11 +93,11 @@
 .c.o:
 	$(CC) $(CFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS) -c -o $@ $<
 
-test: $(PROG) plugins test/test-rbuf $(BGZIP) $(TABIX)
-	./test/test.pl --exec bgzip=$(BGZIP) --exec tabix=$(TABIX)
+test: $(PROG) plugins test/test-rbuf
+	./test/test.pl --exec bgzip=bgzip --exec tabix=tabix
 
-test-plugins: $(PROG) plugins test/test-rbuf $(BGZIP) $(TABIX)
-	./test/test.pl --plugins --exec bgzip=$(BGZIP) --exec tabix=$(TABIX)
+test-plugins: $(PROG) plugins test/test-rbuf
+	./test/test.pl --plugins --exec bgzip=bgzip --exec tabix=tabix
 
 
 # Plugin rules
@@ -180,8 +172,8 @@
 test/test-rbuf: test/test-rbuf.o
 	$(CC) $(LDFLAGS) -o $@ $^ -lm $(LIBS)
 
-bcftools: $(HTSLIB) $(OBJS)
-	$(CC) -rdynamic $(LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(GSL_LIBS) $(LIBS)
+bcftools: $(OBJS)
+	$(CC) -rdynamic $(LDFLAGS) -o $@ $(OBJS) -lhts -lpthread -lz -lm -ldl $(GSL_LIBS) $(LIBS)
 
 doc/bcftools.1: doc/bcftools.txt
 	cd doc && a2x -adate="$(DOC_DATE)" -aversion=$(DOC_VERSION) --doctype manpage --format manpage bcftools.txt
Only in /tmp/makepkg/bcftools/src/bcftools-1.3.1-patched: Makefile.orig
Only in /tmp/makepkg/bcftools/src/bcftools-1.3.1-patched: Makefile.rej