forked from adam4813/Sigma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (34 loc) · 864 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
32
33
34
35
36
37
38
39
40
41
42
# Makefile for wrapping cmake commands
EXEC=build/debug/bin/Sigma
CMAKE_FLAGS = #empty on purpose. set from command line like 'make rebuild CMAKE_FLAGS="cmakecmd=value"
all: $(EXEC)
.PHONY: all
$(EXEC): src CMakeLists.txt
mkdir -p build/debug/bin
mkdir -p build/bin
cd build && cmake .. $(CMAKE_FLAGS) && make
cp test.sc build/debug/bin
cp test.sc build/bin
clean:
@if [ -d build ] ; \
then \
rm -r build; \
fi;
.PHONY: clean
debug:
make rebuild CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug"
.PHONY: debug
rebuild:
make clean
make all
.PHONY: rebuild
eclipse: CMakeLists.txt
make clean
mkdir build
cd build && cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
.PHONY: eclipse
codeblocks: CMakeLists.txt
make clean
mkdir build
cd build && cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
.PHONY: codeblocks