-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
101 lines (76 loc) · 2.54 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
PREFIX ?=.
TARGETS = bin/danbing-tk bin/vntr2kmers_thread bin/genPanKmers bin/ktools bin/danbing-tk-pred
TARGETSg = bin/danbing-tk_g bin/vntr2kmers_thread_g bin/genPanKmers_g bin/ktools_g bin/danbing-tk-pred_g
#TARGETS = seq2num num2seq rvseq bam2pe
CXX ?= g++
LDLIBS = -pthread
dir_guard = @mkdir -p $(@D)
INC=$(PREFIX)/include
CPPFLAGS = -std=c++11 -I $(INC) -I $(INC)/eigen3
INCFILES = $(INC)/cereal $(INC)/eigen3
all: $(INCFILES) $(TARGETS)
allg: $(INCFILES) $(TARGETS) $(TARGETSg)
# copy INCLUDE files to ./include
$(INCFILES):
mkdir -p $(INC)
if [ ! -f $(INC)/cereal ]; then cp -r cereal/include/cereal $(INC); fi
mkdir -p $(INC)/eigen3
if [ ! -f $(INC)/eigen3 ]; then cp -r Eigen/Eigen $(INC)/eigen3; fi
# dependencies between programs and .o files
bin/danbing-tk: src/aQueryFasta_thread.cpp
$(dir_guard)
$(CXX) $(LDLIBS) $(CPPFLAGS) -O3 -o bin/danbing-tk src/aQueryFasta_thread.cpp
bin/danbing-tk_g: src/aQueryFasta_thread.cpp
$(dir_guard)
$(CXX) $(LDLIBS) $(CPPFLAGS) -g -o bin/danbing-tk_g src/aQueryFasta_thread.cpp
bin/danbing-tk-pred: src/pred.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -O3 -o bin/danbing-tk-pred src/pred.cpp
bin/danbing-tk-pred_g: src/pred.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -g -o bin/danbing-tk-pred_g src/pred.cpp
bin/ktools: src/kmertools.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -O3 -o bin/ktools src/kmertools.cpp
bin/ktools_g: src/kmertools.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -g -o bin/ktools_g src/kmertools.cpp
bin/vntr2kmers_thread: src/VNTR2kmers_thread.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -O3 -o bin/vntr2kmers_thread src/VNTR2kmers_thread.cpp
bin/vntr2kmers_thread_g: src/VNTR2kmers_thread.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -g -o bin/vntr2kmers_thread_g src/VNTR2kmers_thread.cpp
bin/genPanKmers: src/genPanKmers.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -O3 -o bin/genPanKmers src/genPanKmers.cpp
bin/genPanKmers_g: src/genPanKmers.cpp
$(dir_guard)
$(CXX) $(CPPFLAGS) -g -o bin/genPanKmers_g src/genPanKmers.cpp
bin/seq2num: src/seq2num.cpp
$(dir_guard)
$(CXX) -O3 -o bin/seq2num src/seq2num.cpp
bin/num2seq: src/num2seq.cpp
$(dir_guard)
$(CXX) -O3 -o bin/num2seq src/num2seq.cpp
bin/rvseq: src/rvseq.cpp
$(dir_guard)
$(CXX) -O3 -o bin/rvseq src/rvseq.cpp
bin/bam2pe: src/bam2pe.cpp
$(dir_guard)
$(CXX) -O3 -o bin/bam2pe src/bam2pe.cpp
#
# generic build rules
#
#$(TARGETS):
# $(CXX) $^ -o $@
#.PHONY: install
install: $(TARGETS)
mkdir -p $(PREFIX)/bin
cp $^ $(PREFIX)/bin/.
#uninstall: $(TARGETS)
# for TARGET in $(TARGETS); do \
# rm $(PREFIX)/bin/$$TARGET; \
# done
clean:
rm -f *.o *~ $(TARGETS)