summarylogtreecommitdiffstats
path: root/makefile-system-htslib.patch
blob: 737ab0d61d5d4a89844288b58668d90309c3ff59 (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
72
73
74
75
76
77
78
diff -aur bcftools-1.2/Makefile bcftools-1.2-patched/Makefile
--- bcftools-1.2/Makefile	2015-02-02 16:40:17.000000000 +0100
+++ bcftools-1.2-patched/Makefile	2015-02-04 12:33:10.627010914 +0100
@@ -29,11 +29,9 @@
 all: $(PROG) $(TEST_PROG)
 
 # Adjust $(HTSDIR) to point to your top-level htslib directory
-HTSDIR = ../htslib
-include $(HTSDIR)/htslib.mk
-HTSLIB = $(HTSDIR)/libhts.a
-BGZIP  = $(HTSDIR)/bgzip
-TABIX  = $(HTSDIR)/tabix
+HTSDIR = /usr/include
+BGZIP  = bgzip
+TABIX  = tabix
 
 CC       = gcc
 CFLAGS   = -g -Wall -Wc++-compat -O2
@@ -52,7 +50,7 @@
 ifdef USE_GPL
     CFLAGS += -DUSE_GPL
     OBJS   += polysomy.o
-    LDLIBS  = -lgsl -lcblas
+    LDLIBS  = -lgsl -lgslcblas
 endif
 
 prefix      = /usr/local
@@ -90,10 +88,10 @@
 .c.o:
 	$(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
 
-test: $(PROG) plugins test/test-rbuf $(BGZIP) $(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-plugins: $(PROG) plugins test/test-rbuf
 	./test/test.pl --plugins --exec bgzip=$(BGZIP) --exec tabix=$(TABIX)
 
 
@@ -102,8 +100,8 @@
 PLUGINS = $(PLUGINC:.c=.so)
 PLUGINM = $(PLUGINC:.c=.mk)
 
-%.so: %.c version.h version.c $(HTSDIR)/libhts.so
-	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -L$(HTSDIR) -lhts
+%.so: %.c version.h version.c
+	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -lhts
 
 -include $(PLUGINM)
 
@@ -158,8 +156,8 @@
 test/test-rbuf: test/test-rbuf.o
 	$(CC) $(CFLAGS) -o $@ -lm -ldl $<
 
-bcftools: $(HTSLIB) $(OBJS)
-	$(CC) $(CFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(LDLIBS)
+bcftools: $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(OBJS) -lpthread -lz -lm -ldl -lhts $(LDLIBS)
 
 doc/bcftools.1: doc/bcftools.txt
 	cd doc && a2x -adate="$(DOC_DATE)" -aversion=$(DOC_VERSION) --doctype manpage --format manpage bcftools.txt
diff -aur bcftools-1.2/plugins/fixploidy.mk bcftools-1.2-patched/plugins/fixploidy.mk
--- bcftools-1.2/plugins/fixploidy.mk	2015-02-02 16:40:17.000000000 +0100
+++ bcftools-1.2-patched/plugins/fixploidy.mk	2015-02-04 12:23:15.376535358 +0100
@@ -1,2 +1,2 @@
-plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so
-	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -L$(HTSDIR) -lhts
+plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c
+	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -lhts
diff -aur bcftools-1.2/plugins/vcf2sex.mk bcftools-1.2-patched/plugins/vcf2sex.mk
--- bcftools-1.2/plugins/vcf2sex.mk	2015-02-02 16:40:17.000000000 +0100
+++ bcftools-1.2-patched/plugins/vcf2sex.mk	2015-02-04 12:25:51.240884001 +0100
@@ -1,2 +1,2 @@
-plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so
-	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -L$(HTSDIR) -lhts
+plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c
+	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -lhts