-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 731 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 731 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
.PHONY: all release debug clean install clean-debug clean-release
CMAKE_FLAGS=
ifeq ($(OS),Windows_NT)
ifeq ($(TERM),xterm)
CMAKE_FLAGS= -G"MSYS Makefiles"
endif
endif
all: release
release:
@mkdir -p Release
cd Release && cmake $(CMAKE_FLAGS) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/bin .. && make
debug:
@mkdir -p Debug
@cd Debug && cmake $(CMAKE_FLAGS) -DCMAKE_BUILD_TYPE=Debug .. && make
install:
@cd Release && make install
clean: clean-debug clean-release
clean-release:
@if [ -f Release/Makefile ]; then cd Release && make clean; fi
@if [ -d Release ]; then rm -rf Release; fi
clean-debug:
@if [ -f Debug/Makefile ]; then cd Debug && make clean; fi
@if [ -d Debug ]; then rm -rf Debug; fi