forked from smehringer/SViper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
64 lines (45 loc) · 1.51 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
SRCDIR := src
BUILDDIR := build
UTILITYDIR := utilities
INCLUDEDIR := include
SRCEXT := cpp
SOURCES := $(shell find $(SRCDIR) -type f -name utilities*.$(SRCEXT))
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
TARGETS := $(patsubst $(SRCDIR)/%,$(UTILITYDIR)/%,$(SOURCES:.$(SRCEXT)=))
# Use version > 4.9.2 of g++
CXX=g++
CC=$(CXX)
CXXFLAGS+=-std=c++14
# Set this to include SeqAn libraries, either system wide
# or download into current folder and set to:
SEQAN_LIB := seqan/include # include submodule
CXXFLAGS+=-I$(SEQAN_LIB) -DSEQAN_HAS_ZLIB=1
# set sviper inlcude path
CXXFLAGS+=-I$(INCLUDEDIR)
# linked libraries
LDLIBS=-lz -lpthread
# enable openMP
CXXFLAGS+=-fopenmp
# Enable warnings
CXXFLAGS+=-W -Wall -Wno-long-long -pedantic -Wno-variadic-macros -Wno-unused-result
# DEBUG build
DEBUGCXXFLAGS+=$(CXXFLAGS)
DEBUGCXXFLAGS+=-g -O0 -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=1
# RELEASE build
RELEASECXXFLAGS+=$(CXXFLAGS)
RELEASECXXFLAGS+=-O3 -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=0 -DNDEBUG
all: sviper
debug: $(SRCDIR)/sviper.cpp
$(CXX) $(DEBUGCXXFLAGS) -o sviper_debug $(SRCDIR)/sviper.cpp $(LDLIBS)
sviper: $(SRCDIR)/sviper.cpp
$(CXX) $(RELEASECXXFLAGS) -o sviper $(SRCDIR)/sviper.cpp $(LDLIBS)
utilities: $(TARGETS)
$(UTILITYDIR)/%: $(SRCDIR)/%.cpp
@mkdir -p $(UTILITYDIR)
$(CXX) $(RELEASECXXFLAGS) $(LDLIBS) -o $@ $<
clean:
rm -f sviper
rm -f sviper_debug
@echo Cleaning executables in utilities
$(shell find utilities -type f -regex '^[^.]+' -delete)
.PHONY: clean