forked from vcflib/vcflib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.old
165 lines (134 loc) · 4.01 KB
/
Makefile.old
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
161
162
163
164
165
#OBJ_DIR = ./
HEADERS = src/Variant.h \
src/split.h \
src/join.h
SOURCES = src/Variant.cpp \
src/split.cpp
OBJECTS= $(SOURCES:.cpp=.o)
# TODO
#vcfstats.cpp
BIN_SOURCES = src/vcfecho.cpp \
src/vcfaltcount.cpp \
src/vcfhetcount.cpp \
src/vcfhethomratio.cpp \
src/vcffilter.cpp \
src/vcf2tsv.cpp \
src/vcfgenotypes.cpp \
src/vcfannotategenotypes.cpp \
src/vcfcommonsamples.cpp \
src/vcfremovesamples.cpp \
src/vcfkeepsamples.cpp \
src/vcfsamplenames.cpp \
src/vcfgenotypecompare.cpp \
src/vcffixup.cpp \
src/vcfclassify.cpp \
src/vcfsamplediff.cpp \
src/vcfremoveaberrantgenotypes.cpp \
src/vcfrandom.cpp \
src/vcfparsealts.cpp \
src/vcfstats.cpp \
src/vcfflatten.cpp \
src/vcfprimers.cpp \
src/vcfnumalt.cpp \
src/vcfcleancomplex.cpp \
src/vcfintersect.cpp \
src/vcfannotate.cpp \
src/vcfallelicprimitives.cpp \
src/vcfoverlay.cpp \
src/vcfaddinfo.cpp \
src/vcfkeepinfo.cpp \
src/vcfkeepgeno.cpp \
src/vcfafpath.cpp \
src/vcfcountalleles.cpp \
src/vcflength.cpp \
src/vcfdistance.cpp \
src/vcfrandomsample.cpp \
src/vcfentropy.cpp \
src/vcfglxgt.cpp \
src/vcfroc.cpp \
src/vcfcheck.cpp \
src/vcfstreamsort.cpp \
src/vcfuniq.cpp \
src/vcfuniqalleles.cpp \
src/vcfremap.cpp \
src/vcf2fasta.cpp \
src/vcfsitesummarize.cpp \
src/vcfbreakmulti.cpp \
src/vcfcreatemulti.cpp \
src/vcfevenregions.cpp \
src/vcfcat.cpp \
src/vcfgenosummarize.cpp \
src/vcfgenosamplenames.cpp \
src/vcfgeno2haplo.cpp \
src/vcfleftalign.cpp \
src/vcfcombine.cpp \
src/vcfgeno2alleles.cpp \
src/vcfindex.cpp \
src/vcf2dag.cpp \
src/vcfsample2info.cpp \
src/vcfqual2info.cpp \
src/vcfinfo2qual.cpp \
src/vcfglbound.cpp \
src/vcfinfosummarize.cpp
# when we can figure out how to build on mac
# src/vcfsom.cpp
#BINS = $(BIN_SOURCES:.cpp=)
BINS = $(addprefix bin/,$(notdir $(BIN_SOURCES:.cpp=)))
SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=))
TABIX = tabixpp/tabix.o
FASTAHACK = fastahack/Fasta.o
SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o
REPEATS = smithwaterman/Repeats.o
INDELALLELE = smithwaterman/IndelAllele.o
DISORDER = smithwaterman/disorder.o
LEFTALIGN = smithwaterman/LeftAlign.o
FSOM = fsom/fsom.o
FILEVERCMP = filevercmp/filevercmp.o
INCLUDES = -I. -Itabixpp/htslib/ -L. -Ltabixpp/ -Ltabixpp/htslib/
LDFLAGS = -lvcflib -lhts -lpthread -lz -lm
all: $(OBJECTS) $(BINS)
CXX = g++
CXXFLAGS = -O3 -D_FILE_OFFSET_BITS=64
#CXXFLAGS = -O2
#CXXFLAGS = -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual
SSW = src/ssw.o src/ssw_cpp.o
ssw.o: src/ssw.h
ssw_cpp.o:src/ssw_cpp.h
openmp:
$(MAKE) CXXFLAGS="$(CXXFLAGS) -fopenmp -D HAS_OPENMP"
profiling:
$(MAKE) CXXFLAGS="$(CXXFLAGS) -g" all
gprof:
$(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all
$(OBJECTS): $(SOURCES) $(HEADERS) $(TABIX)
$(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS)
$(TABIX):
cd tabixpp && $(MAKE)
$(SMITHWATERMAN):
cd smithwaterman && $(MAKE)
$(DISORDER): $(SMITHWATERMAN)
$(REPEATS): $(SMITHWATERMAN)
$(LEFTALIGN): $(SMITHWATERMAN)
$(INDELALLELE): $(SMITHWATERMAN)
$(FASTAHACK):
cd fastahack && $(MAKE)
#$(FSOM):
# cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm
$(FILEVERCMP):
cd filevercmp && make
$(SHORTBINS):
$(MAKE) bin/$@
$(BINS): $(BIN_SOURCES) libvcflib.a $(OBJECTS) $(SMITHWATERMAN) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP)
$(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(LDFLAGS) $(CXXFLAGS)
libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) $(TABIX)
ar rs libvcflib.a $(OBJECTS) smithwaterman/sw.o $(FASTAHACK) $(SSW) $(FILEVERCMP) $(TABIX)
test: $(BINS)
@prove -Itests/lib -w tests/*.t
clean:
rm -f $(BINS) $(OBJECTS)
rm -f ssw_cpp.o ssw.o
rm -f libvcflib.a
cd tabixpp && make clean
cd smithwaterman && make clean
cd fastahack && make clean
.PHONY: clean all test