-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.cvs
35 lines (26 loc) · 875 Bytes
/
Makefile.cvs
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
DEFAULT_BUILD_DIR := ${shell pwd}/cmake-build-output
DEFAULT_DEBUG_INSTALL_DIR := ${shell pwd}/output
DEFAULT_INSTALL_DIR := /usr
DEFAULT_SOURCE_DIR := ${shell pwd}
default: all
all: build make install
build:
mkdir -p ${DEFAULT_BUILD_DIR}
cd ${DEFAULT_BUILD_DIR}; cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${DEFAULT_INSTALL_DIR} ${DEFAULT_SOURCE_DIR}
debug-build:
mkdir -p ${DEFAULT_BUILD_DIR}
cd ${DEFAULT_BUILD_DIR}; cmake -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=${DEFAULT_DEBUG_INSTALL_DIR} \
-DDEBUG_MODE:BOOL=ON \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-G "CodeBlocks - Unix Makefiles" \
${DEFAULT_SOURCE_DIR}
make:
cd ${DEFAULT_BUILD_DIR}; $(MAKE)
install: make
cd ${DEFAULT_BUILD_DIR}; $(MAKE) install
clean:
cmake --build ${DEFAULT_BUILD_DIR} --target clean
distclean:
rm -rf ${DEFAULT_BUILD_DIR}