-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
31 lines (21 loc) · 699 Bytes
/
GNUmakefile
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
CMAKE_ALT1 := /usr/local/bin/cmake
CMAKE_ALT2 := /Applications/CMake.app/Contents/bin/cmake
CMAKE := $(shell \
which cmake 2>/dev/null || \
([ -e ${CMAKE_ALT1} ] && echo "${CMAKE_ALT1}") || \
([ -e ${CMAKE_ALT2} ] && echo "${CMAKE_ALT2}") \
)
all: Release
Debug: build
(cd build && ${CMAKE} -DCMAKE_BUILD_TYPE=$@ .. && make)
MinSizeRel: build
(cd build && ${CMAKE} -DCMAKE_BUILD_TYPE=$@ .. && make)
Release: build
(cd build && ${CMAKE} -DCMAKE_BUILD_TYPE=$@ .. && make)
RelWithDebugInfo: build
(cd build && ${CMAKE} -DCMAKE_BUILD_TYPE=$@ .. && make)
build:
mkdir -p build
clean:
((cd build && make clean) 2>&- || true)
.PHONY: all Debug MinSizeRel Release RelWithDebugInfo clean