forked from rwang067/XPGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (30 loc) · 966 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
39
INCFLAGS = -I/usr/local/include/ -I./src/api/ -I./apps/
CPP = g++
CPPFLAGS = -g -O3 $(INCFLAGS) -fopenmp -Wall -Wno-strict-aliasing -Wno-unknown-pragmas
LDFLAGS = -fPIC -L./src/api/lib/
LINKERFLAGS = -lz -lpmem -lpmemobj -lnuma -lxpgraph
DEBUGFLAGS = -g -ggdb $(INCFLAGS)
HEADERS=$(shell find . -name '*.hpp')
NEW_LIB_PATH:=$(addsuffix ./src/api/lib/:, $(LD_LIBRARY_PATH))
all : lib clean main
lib:
cd ./src/api/ && $(MAKE)
clean:
@rm -rf bin/
main: main.cpp $(HEADERS)
@mkdir -p bin/
$(CPP) $(CPPFLAGS) $(LDFLAGS) main.cpp -o bin/main $(LINKERFLAGS)
# test ingest
testm:export LD_LIBRARY_PATH=$(NEW_LIB_PATH)
testm: lib clean main
@echo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)
./bin/main
# test recovery
testr:export LD_LIBRARY_PATH=$(NEW_LIB_PATH)
testr: lib main
@echo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)
./bin/main -j 3
testgdb:export LD_LIBRARY_PATH=$(NEW_LIB_PATH)
testgdb: lib clean main
@echo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)
gdb ./bin/main