forked from curv3d/curv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (44 loc) · 1.28 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
ifeq ($(shell uname -o),Msys)
# By default, CMake chooses MSVC as the generator under Msys
# Overwrite this behavior to choose Msys Makefiles
cmake_args := -G"MSYS Makefiles"
else
cmake_arsgs := ""
endif
release:
rm -rf CMakeCache.txt CMakeFiles
mkdir -p release
cd release; cmake $(cmake_args) -DCMAKE_BUILD_TYPE=Release ..
cd release; $(MAKE)
install:
mkdir -p release
cd release; cmake $(cmake_args) -DCMAKE_BUILD_TYPE=Release ..
cd release; $(MAKE) install
upgrade:
git pull origin master
git submodule update --init
uninstall:
mkdir -p release
cd release; cmake $(cmake_args) -DCMAKE_BUILD_TYPE=Release ..
cd release; $(MAKE) uninstall
debug:
mkdir -p debug
cd debug; cmake $(cmake_args) -DCMAKE_BUILD_TYPE=Debug ..
cd debug; $(MAKE)
test:
mkdir -p debug
cd debug; cmake $(cmake_args) -DCMAKE_BUILD_TYPE=Debug ..
cd debug; $(MAKE) tests
clean:
rm -rf debug release libcurv/version.h
valgrind:
mkdir -p debug
cd debug; cmake $(cmake_args) -DCMAKE_BUILD_TYPE=Debug ..
cd debug; $(MAKE) tester
cd tests; valgrind ../debug/tester
valgrind-full:
mkdir -p debug
cd debug; cmake $(cmake_args)-DCMAKE_BUILD_TYPE=Debug ..
cd debug; $(MAKE) tester
cd tests; valgrind --leak-check=full ../debug/tester
.PHONY: release install upgrade uninstall test debug clean valgrind valgrind-full