-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
65 lines (56 loc) · 3.75 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
CXX:= g++
FLAGS:= -O3 -ggdb -std=c++17 -mrtm -fopenmp -mavx2 -mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd -msse -msse2 -DUSE_PMEM
NORMAP_RPATH:=-Wl,-rpath=/home/cwk/cwk/pmdklib/lib:/home/cwk/cwk/ZZBTree
TBB_RPATH:=-Wl,-rpath=/home/cwk/cwk/oneTBB/build/gnu_10.3_cxx11_64_release:/home/cwk/cwk/pmdklib/lib:/home/cwk/cwk/ZZBTree:/home/cwk/cwk/ZZBTree/third/CLHT:/home/cwk/cwk/ZZBTree:/home/cwk/cwk/ZZBTree/third/CLHT/external/lib
LIBS:= -lpmem -lpmemobj -ljemalloc -ltbb -lclht -lssmem -pthread # -lpcm
LIBS_DIR:= -L. -L../pmdklib/lib -L../jemalloc/lib -L./third/CLHT -L./third/CLHT/external/lib
TBB_LIB:=-L../oneTBB/build/gnu_10.3_cxx11_64_release
INCLUDE_DIR:=-I./include -I../pmdklib/include -I./third/CLHT/include -I./third/pcm# -I../../pibench/include
TBB_DIR:=-I../oneTBB/include
LIB_TARGET:= libnyx_seele.so
# LIB_SRCS:= nyx_na.cpp n_alc.cpp pm_util.cpp # elf_seele.cpp # search.cpp
VAR_SRCS:= zbtree.cpp n_alc.cpp pm_util.cpp
MAIN_SRCS:= main.cpp
check_key:=$(ARG1) # -DCHECK_KEY
avx_512:=$(ARG2) # -DAVX_512
all: single_wrapper_so exe_out # pibench_wrapper_so
fptree_so:
make -C trees/fptree
cp trees/fptree/libfptree.so .
$(CXX) $(FLAGS) $(TBB_RPATH) -DUSE_FPTREE $(check_key) $(avx_512) main.cpp $(LIBS_DIR) $(TBB_LIB) $(TBB_DIR) $(INCLUDE_DIR) -I./trees/fptree $(LIBS) -lfptree -o main
nbtree_so:
make -C trees/nbtree
cp trees/nbtree/libnbtree.so .
$(CXX) $(FLAGS) $(NORMAP_RPATH) -DUSE_NBTREE $(check_key) $(avx_512) main.cpp $(LIBS_DIR) $(INCLUDE_DIR) -I./trees/nbtree/include $(LIBS) -lnbtree -o main
fast_so:
make -C trees/fastfair
cp trees/fastfair/libfast.so .
$(CXX) $(FLAGS) $(TBB_RPATH) -DUSE_FASTFAIR $(check_key) $(avx_512) main.cpp $(LIBS_DIR) $(TBB_LIB) $(TBB_DIR) $(INCLUDE_DIR) -I./trees/fastfair $(LIBS) -lfast -o main
roart_so:
make -C trees/ROART
cp trees/ROART/libroart.so .
$(CXX) $(FLAGS) $(TBB_RPATH) -DUSE_ROART $(check_key) $(avx_512) main.cpp $(check_key) $(LIBS_DIR) $(TBB_LIB) $(TBB_DIR) $(INCLUDE_DIR) -I./trees/ROART/ART -I./trees/ROART/nvm_mgr $(LIBS) -lroart -o main
dptree_so:
make -C trees/DPTree
cp trees/DPTree/libdptree.so .
$(CXX) $(FLAGS) $(TBB_RPATH) -DUSE_DPTREE $(check_key) $(avx_512) main.cpp $(check_key) $(LIBS_DIR) $(TBB_LIB) $(TBB_DIR) $(INCLUDE_DIR) -I./trees/DPTree/include -I./trees/DPTree/misc $(LIBS) -ldptree -o main
utree_so:
make -C trees/utree
cp trees/utree/libutree.so .
$(CXX) $(FLAGS) $(TBB_RPATH) -DUSE_UTREE $(check_key) $(avx_512) main.cpp $(LIBS_DIR) $(TBB_LIB) $(TBB_DIR) $(INCLUDE_DIR) -I./trees/utree $(LIBS) -lutree -o main
pactree_so:
cp trees/pactree/build/src/libpactree.so .
$(CXX) $(FLAGS) $(TBB_RPATH) -DUSE_PACTREE $(check_key) $(avx_512) main.cpp $(LIBS_DIR) $(TBB_LIB) $(TBB_DIR) $(INCLUDE_DIR) -I./trees/pactree/src -I./trees/pactree/include $(LIBS) -lpactree -o main
bztree_so:
cp ./trees/bztree/build/libbztree.so .
cp ./trees/bztree/build/pmwcas/src/PMWCAS-build/libpmwcas.so .
$(CXX) $(FLAGS) $(BZTREE_RPATH) -DUSE_BZTREE $(check_key) $(avx_512) -fpermissive -L. -I./trees/bztree \
-I./trees/bztree/build/pmwcas/src/PMWCAS -I./trees/bztree/build/pmwcas/src/PMWCAS/src -I./trees/bztree/build/pmwcas/src/PMWCAS/src/mwcas \
-I./trees/bztree/build/pmwcas/src/PMWCAS/src/common -I./trees/bztree/build/pmwcas/src/PMWCAS/src/environment -I./trees/bztree/build/pmwcas/src/PMWCAS/include -L./trees/bztree/build/pmwcas/src/PMWCAS-build \
-L./trees/bztree/build main.cpp -o main -lpmem -lpmemobj -lpmwcas -lbztree
single_wrapper_so:
$(CXX) $(FLAGS) $(TBB_RPATH) $(check_key) $(avx_512) -shared $(VAR_SRCS) $(LIBS_DIR) $(TBB_LIB) $(INCLUDE_DIR) $(TBB_DIR) $(LIBS) -fPIC -o $(LIB_TARGET)
exe_out:
$(CXX) $(FLAGS) $(TBB_RPATH) main.cpp $(check_key) $(avx_512) $(VAR_SRCS) $(LIBS_DIR) $(TBB_LIB) $(INCLUDE_DIR) $(TBB_DIR) $(LIBS) -lnyx_seele -o main
clean:
rm -rf *.so main output libnyx_seele.so libnyx_pibench.so