forked from kehrlab/PopIns2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (44 loc) · 1.78 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
TARGET = popins2
BUILD_DIR = ./build
SRC_DIR = ./src
SRCS := $(shell find $(SRC_DIR) -type f -name *.cpp)
OBJS := $(patsubst $(SRC_DIR)/%,$(BUILD_DIR)/%,$(SRCS:.cpp=.o))
# Compiler
CXX = g++ -std=c++14
CC = $(CXX)
# SeqAn
SEQAN_LIB = ./external/seqan-library-2.2.0/include/
# Include config
-include popins2.config
TOOLS=-DSAMTOOLS=\"$(SAMTOOLS)\" -DBWA=\"$(BWA)\" -DSICKLE=\"$(SICKLE)\" -DVELVETH=\"$(VELVETH)\" -DVELVETG=\"$(VELVETG)\" -DMINIA=\"$(PWD)/$(MINIA)\" -DSPADES=\"$(SPADES)\"
# Date and version number from git
DATE := on $(shell git log --pretty=format:"%cd" --date=iso | cut -f 1,2 -d " " | head -n 1)
VERSION := 0.13.0-$(shell git log --pretty=format:"%h" --date=iso | head -n 1)
CXXFLAGS += -DDATE=\""$(DATE)"\" -DVERSION=\""$(VERSION)"\"
# Compiler flags
CXXFLAGS += -DSEQAN_HAS_ZLIB=1 -DSEQAN_DISABLE_VERSION_CHECK
CXXFLAGS += -W -Wall -pedantic
CXXFLAGS += -Wno-long-long -Wno-variadic-macros -Wno-unused-result
CXXFLAGS += -march=native -DMAX_KMER_SIZE=64
CXXFLAGS += -I$(SEQAN_LIB)
# Linker flags
LDLIBS = -lbifrost -pthread -lz -rdynamic -DMAX_KMER_SIZE=64
# MacOS users might have to comment out the next line
LDLIBS += -lrt
# DEBUG build
#CXXFLAGS += -g -pg -O0 -DDEBUG -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=1
# VERBOSE build
#CXXFLAGS += -O3 -DDEBUG -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=0
# RELEASE build
CXXFLAGS += -O3 -DSEQAN_ENABLE_TESTING=0 -DSEQAN_ENABLE_DEBUG=0 -Wno-implicit-fallthrough -Wno-maybe-uninitialized
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $@ $(LDLIBS)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
$(CXX) $(CXXFLAGS) $(TOOLS) -c $< -o $@
clean:
rm -f $(OBJS) $(TARGET)
purge:
rm -f $(OBJS) $(TARGET) *.gfa *.bfg_colors *.fasta *.csv popins2*log
metaclean:
rm -f $(TARGET) *.gfa *.bfg_colors *.fasta *.csv popins2*log