-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
160 lines (136 loc) · 3.62 KB
/
Makefile
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
PROG= PISA
all: $(PROG)
HTSDIR = third_party/htslib-1.10.2
include $(HTSDIR)/htslib.mk
HTSLIB = $(HTSDIR)/libhts.a
HTSVERSION = $(HTSDIR)/version.h
#FMLDIR = third_party/fermi-lite
#include $(FMLDIR)/fermi.mk
#FMLLIB = $(FMLDIR)/libfml.a
LIBA = src/liba.a
ZLIBDIR= third_party/zlib-1.2.11
include $(ZLIBDIR)/zlib.mk
LIBZ = $(ZLIBDIR)/libz.a
CC = gcc
CFLAGS = -Wall -O3 -D_FILE_OFFSET_BITS=64 -fopenmp
DFLAGS =
INCLUDES = -Isrc -I$(HTSDIR)/ -I. -I$(ZLIBDIR)
LIBS = -lbz2 -llzma -pthread -lm -lcurl
#all:$(PROG)
# See htslib/Makefile
PACKAGE_VERSION := $(shell git describe --tags)
.SUFFIXES:.c .o
.PHONY:all clean clean-all distclean install lib tags test testclean
force:
.c.o:
@printf "Compiling $<... \r"
@$(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@ || echo "Error in command: $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $<"
LIB_OBJ = src/barcode_list.o \
src/bam_anno_vcf.o \
src/bed.o \
src/number.o \
src/fastq.o \
src/kson.o \
src/json_config.o \
src/gtf.o \
src/region_index.o \
src/dict.o \
src/ksa.o \
src/bam_pool.o \
src/umi_corr.o \
src/dict.o \
src/read_tags.o \
src/sim_search.o \
src/fragment.o \
src/compactDNA.o \
src/bam_region.o \
src/dna_pool.o \
src/bam_files.o \
src/biostring.o \
src/read_anno.o \
src/kthread.o \
src/coverage.o
AOBJ = src/bam_anno.o \
src/bam_count.o \
src/bam_pick.o \
src/sam2bam.o \
src/bam_attr_count.o \
src/fastq_sort.o \
src/fastq_parse_barcode.o \
src/bam_tag_corr.o \
src/bam2fq.o \
src/bam_extract_tags.o \
src/bam_rmdup.o\
src/gene_fusion.o \
src/bam_depth.o \
src/usage.o \
src/addtags.o \
src/fragment_count.o \
src/fastq_stream.o \
src/fastq_parse2.o \
src/gtf_format.o \
src/callept.o \
src/bed_merge.o \
src/bed_anno.o \
src/gtf2bed.o \
src/bed_flatten.o
liba.a: $(LIB_OBJ)
@-rm -f src/$@
$(AR) -rcs src/$@ $(LIB_OBJ)
test: $(HTSLIB) $(HTSVERSION)
PISA: $(HTSLIB) $(LIBZ) liba.a $(AOBJ)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ src/main.c $(AOBJ) src/liba.a $(HTSLIB) $(LIBS) $(LIBZ)
git:
@-echo '#define PISA_VERSION "$(PACKAGE_VERSION)"' > pisa_version.h
@-git push
src/gtf_format.o: src/gtf_format.c
src/fastq_parse2.o: src/fastq_parse2.c
src/fastq_stream.o: src/fastq_stream.c
src/read_anno.o: src/read_anno.c
src/sim_search.o: src/sim_search.c
src/bam_depth.o: src/bam_depth.c
src/bam2fq.o: src/bam2fq.c
src/bam_anno.o: src/bam_anno.c
src/bam_count.o: src/bam_count.c
src/bam_pick.o: src/bam_pick.c
src/bam_anno_vcf.o: src/bam_anno_vcf.c
src/bam_tag_corr.o: src/bam_tag_corr.c
src/umi_corr.o: src/umi_corr.c
src/fastq_parse_barcode.o: src/fastq_parse_barcode.c
src/fastq_sort.o: src/fastq_sort.c
src/dict.o: src/dict.c
src/sam2bam.o: src/sam2bam.c
src/barcode_list.o: src/barcode_list.c
src/bed.o: src/bed.c
src/number.o: src/number.c
src/gtf.o: src/gtf.c
src/region_index.o: src/region_index.c
src/dict.o: src/dict.c
src/fastq.o: src/fastq.c
src/json_config.o: src/json_config.c
src/kson.o: src/kson.c
src/bam_attr_count.o: src/bam_attr_count.c
src/read_tags.o: src/read_tags.c
src/ksa.o: src/ksa.c
src/bam_pool.o: src/bam_pool.c
src/bam_extract_tags.o: src/bam_extract_tags.c
src/usage.o:src/usage.c
src/bam_rmdup.o:src/bam_rmdup.c
src/dna_pool.o:src/dna_pool.c
src/gene_fusion.o:src/gene_fusion.c
src/bam_files.o:src/bam_files.c
src/biostring.o:src/biostring.c
src/kthread.o:src/kthread.c
src/addtags.o:src/addtags.c
src/fragment.o:src/fragment_count.c
clean: testclean
-rm -f gmon.out *.o *~ $(PROG)
-rm -rf *.dSYM plugins/*.dSYM test/*.dSYM
-rm src/*.o src/liba.a
testclean:
-rm -f test/*.o test/*~ $(TEST_PROG)
distclean: clean
-rm -f TAGS
clean-all: clean clean-htslib
tags:
ctags -f TAGS src/*.[ch] $(HTSDIR)/*.c