-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
38 lines (27 loc) · 1023 Bytes
/
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
#IS_ICPC:= $(shell command -v icpc 2> /dev/null)
# STATIC_FLAG:= -static -static-intel
ifdef IS_ICPC
CXX:=icpc
#CXXFLAGS:= -O0 -std=c++11 -funroll-loops -ggdb -pg -qopenmp
CXXFLAGS:= -O3 -xHost -std=c++11 -qopenmp
else
CXX:=g++
CXXFLAGS:= -O3 -std=c++11 -fopenmp -mtune=native -ggdb -g
endif
SRC_DIR:=src
LD_INC_FLAGS:= -Imkmh -Imkmh/murmur3 -I. -Ikseq_reader
LD_LIB_FLAGS:= -Lmkmh/murmur3 -Lmkmh -L. -Lkseq_reader -lmkmh -lz -lmurmur3 -lksr
rkmh: $(SRC_DIR)/rkmh.o $(SRC_DIR)/equiv.hpp mkmh/libmkmh.a kseq_reader/libksr.a
$(CXX) $(CXXFLAGS) -o $@ $< $(LD_INC_FLAGS) $(LD_LIB_FLAGS)
$(SRC_DIR)/rkmh.o: $(SRC_DIR)/rkmh.cpp $(SRC_DIR)/equiv.hpp mkmh/libmkmh.a
$(CXX) $(CXXFLAGS) -c -o $@ $< $(LD_INC_FLAGS) $(LD_LIB_FLAGS)
kseq_reader/libksr.a: kseq_reader/kseq_reader.cpp kseq_reader/kseq_reader.hpp
cd kseq_reader && $(MAKE)
mkmh/libmkmh.a:
cd mkmh && $(MAKE) libmkmh.a
.PHONY: clean clobber lib static
clean:
$(RM) $(SRC_DIR)/*.o
cd mkmh && $(MAKE) clean
cd kseq_reader && $(MAKE) clean
$(RM) rkmh