annotate package/Makefile @ 6:7058d37cf97e draft

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