-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
81 lines (62 loc) · 1.58 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
#compiler
CXX=g++
#compiler flags
COPTI= -O3
CDEBG= -g
CWARN= -Wall -Wextra -Wno-sign-compare
CBAMH= -D_LIBBAM
CSHV1=
#linker flags
LOPTI= -O3
LDEBG= -g
LSTDD= -lm -lpthread -lboost_iostreams -lboost_program_options
LSTDS= -Wl,-Bstatic -lboost_iostreams -lz -lbz2 -Wl,-Bdynamic -lm -lpthread
LCL3S= -Wl,-Bstatic -lz -lbz2 -Wl,-Bdynamic -lm -lpthread
LBAMD= -lbam -lz
#executable file
EFILE= bin/makeBGLCHUNKS
#header files
HFILE= $(shell find src -name *.h)
#source files
CFILE= $(shell find src -name *.cpp)
#source path
VPATH= $(shell for file in `find src -name *.cpp`; do echo $$(dirname $$file); done)
#include path
ISTDP= -Isrc
IBAMP= -Ilib
ICL3P= -I/users/delaneau/BOOST/include
#library path
LSTDP= -Llib
#object files
OFILE= $(shell for file in `find src -name *.cpp`; do echo obj/$$(basename $$file .cpp).o; done)
OBOST=
#default
all: dynamic
#dynamic release
dynamic: CFLAG=$(COPTI) $(CWARN) $(CSHV1)
dynamic: LFLAG=$(LOPTI) $(LSTDD)
dynamic: IFLAG=$(ISTDP)
dynamic: $(EFILE)
#static release
static: CFLAG=$(COPTI) $(CWARN) $(CSHV1)
static: LFLAG=$(LOPTI) $(LSTDS)
static: IFLAG=$(ISTDP)
static: $(EFILE)
#cluster release
cluster: CFLAG=$(COPTI) $(CWARN) $(CSHV1)
cluster: LFLAG=$(LOPTI) $(LCL3S)
cluster: IFLAG=$(ISTDP) $(ICL3P)
cluster: OBOST=~/BOOST/lib/libboost_iostreams.a ~/BOOST/lib/libboost_program_options.a
cluster: $(EFILE)
$(EFILE): $(OFILE)
$(CXX) $^ $(OBOST) -o $@ $(LFLAG)
obj/%.o: %.cpp $(HFILE)
$(CXX) -o $@ -c $< $(CFLAG) $(IFLAG)
clean:
rm -f obj/*.o $(EFILE)
test:
cp $(EFILE) ~/$(EFILE).v10
oxford:
cp $(EFILE) ~/bin/.
install:
cp $(EFILE) /usr/local/bin/.