This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
forked from dib-lab/khmer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
123 lines (98 loc) · 3.15 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Profile?
# Set this variable to true if you wish to profile the codes.
WANT_PROFILING=false
# Which profiling tool to use?
# Assuming you have TAU installed and setup properly,
# you can instrument codes with it to get detailed multi-threaded profiling.
# Otherwise, gprof is able to give you some information without threading info.
# Choose one of: gprof, TAU
PROFILER_OF_CHOICE=gprof
# Perform extra sanity checking?
# Set this variable to true
# if you wish the codes to perform extra sanity checking
# (to the possible detriment of performance).
WANT_EXTRA_SANITY_CHECKING=false
# Compile with debugging symbols?
# Set this variable to true
# if you wish the codes to be built with debugging symbols
# (increases code size and does not always produce accurate stepping in a debugger
# when optimization is turned on).
WANT_DEBUGGING=false
# Compile with tracing logic turned on?
# Set this variable to true if you want to use instrumentation provided
# in the sources for debugging purposes
# and are willing to accept the overhead such instrumentation introduces.
WITH_INTERNAL_TRACING=false
# Compile with performance metrics turned on?
# Set this variable to true if you want to use instrumentation provided
# in the sources for performance measurement purposes
# and are willing to accept the overhead such instrumentation introduces.
WITH_INTERNAL_METRICS=false
# Use Cython?
# Set this variable to true if you wish to build the Python wrapper
# with Cython rather than the directly using the Python C API.
# (Do not set this to true if you do not have Cython installed.)
USE_CYTHON=false
### NOTE: No user-servicable parts below this line! ###
CXXFLAGS=
CXX_WARNING_FLAGS=-Wall
CXX_OPTIMIZATION_FLAGS=-O3
CXX_SHARED_LIB_FLAGS=-fPIC
CXXFLAGS+= $(CXX_WARNING_FLAGS) $(CXX_OPTIMIZATION_FLAGS) $(CXX_SHARED_LIB_FLAGS)
LIBS=
ifeq ($(WANT_DEBUGGING), true)
CXX_DEBUG_FLAGS=-g
CXXFLAGS+= $(CXX_DEBUG_FLAGS)
else
CXX_DEBUG_FLAGS=
endif
ifeq ($(WANT_EXTRA_SANITY_CHECKING), true)
DEFINE_KHMER_EXTRA_SANITY_CHECKS=-DKHMER_EXTRA_SANITY_CHECKS
CXXFLAGS+= $(DEFINE_KHMER_EXTRA_SANITY_CHECKS)
else
DEFINE_KHMER_EXTRA_SANITY_CHECKS=
endif
ifeq ($(WANT_PROFILING), true)
ifeq ($(PROFILER_OF_CHOICE), TAU)
CXX=tau_cxx.sh
endif
ifeq ($(PROFILER_OF_CHOICE), gprof)
PROFILING_LIBS=-pg
CXXFLAGS+= -pg
LIBS+= $(PROFILING_LIBS)
endif
endif
ifeq ($(WITH_INTERNAL_TRACING), true)
CXXFLAGS+= -DWITH_INTERNAL_TRACING
endif
ifeq ($(WITH_INTERNAL_METRICS), true)
CXXFLAGS+= -DWITH_INTERNAL_METRICS
endif
ifeq ($(USE_CYTHON), true)
CYTHON_ENABLED_BOOL=True
else
CYTHON_ENABLED_BOOL=False
endif
# Place POSIX threads last in linking order, if needed.
ifneq ($(shell uname), Linux)
LIBS+= -pthread
endif
all: lib_files python_files
clean:
cd lib && make clean
cd python && make clean
cd tests && rm -rf khmertest_*
doc: FORCE
cd doc && make html
lib_files:
cd lib && \
make CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LIBS="$(LIBS)"
python_files: lib_files
cd python && \
make DEFINE_KHMER_EXTRA_SANITY_CHECKS="$(DEFINE_KHMER_EXTRA_SANITY_CHECKS)" \
CXX_DEBUG_FLAGS="$(CXX_DEBUG_FLAGS)" \
CYTHON_ENABLED_BOOL="$(CYTHON_ENABLED_BOOL)"
# python setup.py build_ext -i
test: all
nosetests -v -x
FORCE: