-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 1012 Bytes
/
Makefile
File metadata and controls
39 lines (27 loc) · 1012 Bytes
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
COMPILE=clang++
SOURCE_DIR=src
COMMON=${SOURCE_DIR}/rank-tree.cpp
COMMON+=${SOURCE_DIR}/stack-simulator.cpp
HEADERS=${SOURCE_DIR}/rank-tree.hpp
HEADERS+=${SOURCE_DIR}/stack-simulator.hpp
OPTIONS=-O3
stack-distance: ${COMMON} ${HEADERS} ${SOURCE_DIR}/main.cpp
${COMPILE} ${COMMON} ${OPTIONS} \
${SOURCE_DIR}/main.cpp \
-I${SOURCE_DIR} --std=c++11 -o stack-distance
tests: testdir/stack-simulator-test testdir/rank-tree-test
./testdir/rank-tree-test
./testdir/stack-simulator-test
testdir/stack-simulator-test: testdir ${COMMON} ${HEADERS} ${SOURCE_DIR}/stack-simulator-test.cpp
${COMPILE} ${COMMON} ${OPTIONS} \
${SOURCE_DIR}/stack-simulator-test.cpp \
-I${SOURCE_DIR} --std=c++11 -o testdir/stack-simulator-test
testdir/rank-tree-test: testdir ${COMMON} ${HEADERS} src/rank-tree-test.cpp
${COMPILE} ${COMMON} ${OPTIONS} \
${SOURCE_DIR}/rank-tree-test.cpp \
-I${SOURCE_DIR} --std=c++11 -o testdir/rank-tree-test
testdir:
mkdir -p testdir
clean-all:
rm -rf testdir
rm stack-distance