annotate Makefile @ 39:1e5b1f1b46c1 draft default tip

Uploaded
author malbuquerque
date Tue, 20 Jan 2015 19:36:31 -0500
parents 226f241f0c92
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
1 DEBUG ?= 0
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
2 PARALLEL ?= 0
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
3
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
4 # External Libraries
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
5 BOOST_ROOT ?= /g/solexa/bin/software/boost_1_53_0/
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
6 BAMTOOLS_ROOT ?= /g/solexa/bin/software/bamtools-2.3.0/
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
7 SEQTK_ROOT ?= /g/solexa/bin/software/kseq/
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
8
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
9 # Flags
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
10 CXX=g++
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
11 CXXFLAGS += -isystem ${BOOST_ROOT}/include -isystem ${BAMTOOLS_ROOT}/include -isystem ${SEQTK_ROOT} -pedantic -W -Wall -Wno-unknown-pragmas
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
12 LDFLAGS += -L${BOOST_ROOT}/lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time -L${BAMTOOLS_ROOT}/lib -lbamtools -lz -Wl,-rpath,${BAMTOOLS_ROOT}/lib,-rpath,${BOOST_ROOT}/lib
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
13
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
14 # Additional flags for release/debug
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
15 ifeq (${PARALLEL}, 1)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
16 CXXFLAGS += -fopenmp -DOPENMP
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
17 else
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
18 CXXFLAGS += -DNOPENMP
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
19 endif
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
20
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
21 # Additional flags for release/debug
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
22 ifeq (${DEBUG}, 1)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
23 CXXFLAGS += -g -O0 -fno-inline -DDEBUG
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
24 else ifeq (${DEBUG}, 2)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
25 CXXFLAGS += -g -O0 -fno-inline -DPROFILE
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
26 LDFLAGS += -lprofiler -ltcmalloc
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
27 else
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
28 CXXFLAGS += -O9 -DNDEBUG
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
29 #LDFLAGS += --static
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
30 endif
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
31
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
32 # External sources
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
33 HTSLIBSOURCES = $(wildcard src/htslib/*.c) $(wildcard src/htslib/*.h)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
34 BAMTOOLSSOURCES = $(wildcard src/bamtools/src/api/*.h) $(wildcard src/bamtools/src/api/*.cpp)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
35 DELLYSOURCES = $(wildcard src/*.h) $(wildcard src/*.cpp)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
36
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
37 # Targets
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
38 TARGETS = src/delly src/extract src/cov src/iover src/stats
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
39
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
40 all: $(TARGETS)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
41
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
42 src/delly: $(DELLYSOURCES)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
43 $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
44
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
45 src/extract: $(DELLYSOURCES)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
46 $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
47
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
48 src/cov: $(DELLYSOURCES)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
49 $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
50
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
51 src/iover: $(DELLYSOURCES)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
52 $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
53
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
54 src/stats: $(DELLYSOURCES)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
55 $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
56
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
57 clean:
226f241f0c92 Uploaded
malbuquerque
parents:
diff changeset
58 rm -f $(TARGETS) $(TARGETS:=.o)