Pysam wants several functions not included in the library
[samtools.git] / debian / patches / build-so
1 Index: samtools.debian/Makefile
2 ===================================================================
3 --- samtools.debian.orig/Makefile       2012-12-19 14:23:16.799622129 -0800
4 +++ samtools.debian/Makefile    2012-12-19 14:23:21.839621951 -0800
5 @@ -1,5 +1,5 @@
6  CC=                    gcc
7 -CFLAGS=                -g -Wall -O2 #-m64 #-arch ppc
8 +CFLAGS=                -g -Wall -O2 -fPIC #-m64 #-arch ppc
9  DFLAGS=                -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
10  KNETFILE_O=    knetfile.o
11  LOBJS=         bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam_view.o sam.o bam_index.o \
12 @@ -36,13 +36,13 @@
13  .PHONY:all lib clean cleanlocal
14  .PHONY:all-recur lib-recur clean-recur cleanlocal-recur install-recur
15  
16 -lib:libbam.a
17 +lib:libbam.so.1
18  
19  libbam.a:$(LOBJS)
20                 $(AR) -csru $@ $(LOBJS)
21  
22  samtools:lib-recur $(AOBJS)
23 -               $(CC) $(CFLAGS) -o $@ $(AOBJS) -Lbcftools $(LIBPATH) libbam.a -lbcf $(LIBCURSES) -lm -lz
24 +               $(CC) $(CFLAGS) -o $@ $(AOBJS) -Lbcftools $(LIBPATH) -L. -lbam -lbcf $(LIBCURSES) -lm -lz
25  
26  razip:razip.o razf.o $(KNETFILE_O)
27                 $(CC) $(CFLAGS) -o $@ razf.o razip.o $(KNETFILE_O) -lz
28 @@ -76,8 +76,9 @@
29  libbam.1.dylib-local:$(LOBJS)
30                 libtool -dynamic $(LOBJS) -o libbam.1.dylib -lc -lz
31  
32 -libbam.so.1-local:$(LOBJS)
33 +libbam.so.1:$(LOBJS)
34                 $(CC) -shared -Wl,-soname,libbam.so -o libbam.so.1 $(LOBJS) -lc -lz
35 +               ln -s $@ libbam.so
36  
37  dylib:
38                 @$(MAKE) cleanlocal; \