annotate pyPRADA_1.2/tools/samtools-0.1.16/Makefile @ 3:f17965495ec9 draft default tip

Uploaded
author siyuan
date Tue, 11 Mar 2014 12:14:01 -0400
parents acc2ca1a3ba4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
1 CC= gcc
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
2 CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
3 DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
4 KNETFILE_O= knetfile.o
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
5 LOBJS= bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
6 bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o bedidx.o \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
7 $(KNETFILE_O) bam_sort.o sam_header.o bam_reheader.o kprobaln.o bam_cat.o
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
8 AOBJS= bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
9 bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
10 bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
11 cut_target.o phase.o bam2depth.o
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
12 PROG= samtools
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
13 INCLUDES= -I.
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
14 SUBDIRS= . bcftools misc
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
15 LIBPATH=
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
16 LIBCURSES= -lcurses # -lXCurses
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
17
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
18 .SUFFIXES:.c .o
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
19
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
20 .c.o:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
21 $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
22
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
23 all-recur lib-recur clean-recur cleanlocal-recur install-recur:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
24 @target=`echo $@ | sed s/-recur//`; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
25 wdir=`pwd`; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
26 list='$(SUBDIRS)'; for subdir in $$list; do \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
27 cd $$subdir; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
28 $(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
29 INCLUDES="$(INCLUDES)" LIBPATH="$(LIBPATH)" $$target || exit 1; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
30 cd $$wdir; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
31 done;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
32
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
33 all:$(PROG)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
34
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
35 .PHONY:all lib clean cleanlocal
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
36 .PHONY:all-recur lib-recur clean-recur cleanlocal-recur install-recur
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
37
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
38 lib:libbam.a
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
39
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
40 libbam.a:$(LOBJS)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
41 $(AR) -cru $@ $(LOBJS)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
42
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
43 samtools:lib-recur $(AOBJS)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
44 $(CC) $(CFLAGS) -o $@ $(AOBJS) -Lbcftools $(LIBPATH) libbam.a -lbcf $(LIBCURSES) -lm -lz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
45
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
46 razip:razip.o razf.o $(KNETFILE_O)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
47 $(CC) $(CFLAGS) -o $@ razf.o razip.o $(KNETFILE_O) -lz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
48
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
49 bgzip:bgzip.o bgzf.o $(KNETFILE_O)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
50 $(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o $(KNETFILE_O) -lz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
51
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
52 razip.o:razf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
53 bam.o:bam.h razf.h bam_endian.h kstring.h sam_header.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
54 sam.o:sam.h bam.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
55 bam_import.o:bam.h kseq.h khash.h razf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
56 bam_pileup.o:bam.h razf.h ksort.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
57 bam_plcmd.o:bam.h faidx.h bam_maqcns.h glf.h bcftools/bcf.h bam2bcf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
58 bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
59 bam_lpileup.o:bam.h ksort.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
60 bam_tview.o:bam.h faidx.h bam_maqcns.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
61 bam_maqcns.o:bam.h ksort.h bam_maqcns.h kaln.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
62 bam_sort.o:bam.h ksort.h razf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
63 bam_md.o:bam.h faidx.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
64 glf.o:glf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
65 sam_header.o:sam_header.h khash.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
66 bcf.o:bcftools/bcf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
67 bam2bcf.o:bam2bcf.h errmod.h bcftools/bcf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
68 bam2bcf_indel.o:bam2bcf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
69 errmod.o:errmod.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
70 phase.o:bam.h khash.h ksort.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
71 bamtk.o:bam.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
72
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
73 faidx.o:faidx.h razf.h khash.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
74 faidx_main.o:faidx.h razf.h
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
75
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
76
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
77 libbam.1.dylib-local:$(LOBJS)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
78 libtool -dynamic $(LOBJS) -o libbam.1.dylib -lc -lz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
79
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
80 libbam.so.1-local:$(LOBJS)
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
81 $(CC) -shared -Wl,-soname,libbam.so -o libbam.so.1 $(LOBJS) -lc -lz
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
82
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
83 dylib:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
84 @$(MAKE) cleanlocal; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
85 case `uname` in \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
86 Linux) $(MAKE) CFLAGS="$(CFLAGS) -fPIC" libbam.so.1-local;; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
87 Darwin) $(MAKE) CFLAGS="$(CFLAGS) -fPIC" libbam.1.dylib-local;; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
88 *) echo 'Unknown OS';; \
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
89 esac
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
90
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
91
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
92 cleanlocal:
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
93 rm -fr gmon.out *.o a.out *.exe *.dSYM razip bgzip $(PROG) *~ *.a *.so.* *.so *.dylib
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
94
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
95 clean:cleanlocal-recur