-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
61 lines (50 loc) · 1.84 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
CXX = g
CXXFLAGS= -O3 -g #-pg #-Wall #-O3
LINKPATH= -I./samtools-0.1.19 -L./samtools-0.1.19 -I./htslib-1.15.1/ -L./htslib-1.15.1/
LINKFLAGS = -lpthread -lz
DEBUG=
OBJECTS =
# Change to 1 if need to parse CRAM file
htslib=0
BAMFLAGS =
ifeq ($(htslib),1)
CXXFLAGS = -DHTSLIB
BAMFLAGS = -lhts
else
BAMFLAGS = -lbam
endif
#asan=1
ifneq ($(asan),)
CXXFLAGS =-fsanitize=address
LDFLAGS =-fsanitize=address -ldl
endif
all: fastq-extractor bam-extractor genotyper analyzer
genotyper: Genotyper.o
$(CXX) -o $@ $(LINKPATH) $(CXXFLAGS) $< $(LINKFLAGS)
analyzer: Analyzer.o
$(CXX) -o $@ $(LINKPATH) $(CXXFLAGS) $< $(LINKFLAGS)
bam-extractor: BamExtractor.o
if [ $(htslib) -eq 1 ] ; then \
if [ ! -f ./htslib-1.15.1/libhts.a ] ; \
then \
cd htslib-1.15.1 ; \
cd htscodecs ; autoreconf -i ; ./configure ; make ; \
cd .. \
autoreconf -i ; ./configure ; make ; \
fi \
else \
if [ ! -f ./samtools-0.1.19/libbam.a ] ; \
then \
cd samtools-0.1.19 ; make ;\
fi \
fi ;
$(CXX) -o $@ $(LINKPATH) $(CXXFLAGS) $< $(LINKFLAGS) $(BAMFLAGS)
fastq-extractor: FastqExtractor.o
$(CXX) -o $@ $(LINKPATH) $(CXXFLAGS) $< $(LINKFLAGS)
Genotyper.o: Genotyper.cpp Genotyper.hpp AlignAlgo.hpp ReadFiles.hpp kseq.h SeqSet.hpp KmerIndex.hpp SimpleVector.hpp defs.h KmerCode.hpp KmerCount.hpp
Analyzer.o: Analyzer.cpp Genotyper.hpp AlignAlgo.hpp ReadFiles.hpp kseq.h SeqSet.hpp KmerIndex.hpp SimpleVector.hpp defs.h KmerCode.hpp KmerCount.hpp VariantCaller.hpp BarcodeSummary.hpp
BamExtractor.o: BamExtractor.cpp alignments.hpp defs.h SeqSet.hpp
FastqExtractor.o: FastqExtractor.cpp ReadFiles.hpp defs.h SeqSet.hpp BarcodeCorrector.hpp SimpleVector.hpp
#Alignment.o: Alignment.cpp Alignment.h SimpleVector.h defs.h StatsTests.h KmerTree.h ReadSet.h KmerIndex.h poa.h
clean:
rm -f *.o *.gch genotyper analyzer bam-extractor fastq-extractor