annotate PsiCLASS-1.0.2/samtools-0.1.19/Makefile @ 0:903fc43d6227 draft default tip

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