-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
32 lines (23 loc) · 979 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
.PHONY: all tests clean
MAIN_SRC_FILES := seqdfs_vs_boost_dfs_main.cpp seqdfs_vs_boost_dfs_funcs_classes.cpp
MAIN_EXE_FILE := main
MAIN_UTEST_FILES := unit_tests_seqdfs.cpp seqdfs_vs_boost_dfs_funcs_classes.cpp
MAIN_TESTS_EXE_FILE := main_tests
MS_MIMALLOC_FOLDER := ms_mimalloc
MS_MIMALLOC_SO_OBJECT := $(MS_MIMALLOC_FOLDER)/out/secure/libmimalloc-secure.so
all: $(MAIN_SRC_FILES)
g++ -ggdb3 -O3 -std=c++11 $^ -o $(MAIN_EXE_FILE)
tests: $(MAIN_UTEST_FILES)
g++ -ggdb3 -O3 -std=c++11 $^ -o $(MAIN_TESTS_EXE_FILE)
clean:
rm -rf $(MAIN_EXE_FILE) $(MAIN_TESTS_EXE_FILE)
run: clean all
ulimit -s unlimited && ./$(MAIN_EXE_FILE)
run_mimalloc: clean all
if [ -z "$(shell find ./ | grep "./$(MS_MIMALLOC_SO_OBJECT)" | sort | head -n1)" ]; then \
./download_and_build_mimalloc.sh "$(MS_MIMALLOC_FOLDER)"; \
fi
ulimit -s unlimited && env MIMALLOC_SHOW_STATS=1 \
LD_PRELOAD=./$(MS_MIMALLOC_SO_OBJECT) ./$(MAIN_EXE_FILE)
run_tests: clean tests
./$(MAIN_TESTS_EXE_FILE)