-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (29 loc) · 1.08 KB
/
Copy pathmakefile
File metadata and controls
44 lines (29 loc) · 1.08 KB
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
.PHONY: all xcode unix test tests clean
all: unix
xcode:
#@echo "making... ${JOBS} $(MAKEFLAGS) "
@if [ ! -d "./build_xcode" ]; then mkdir build_xcode; fi
@cmake -G Xcode -S ./ -B ./build_xcode || cmake3 -G Xcode -S ./ -B ./build_xcode
#@make -j4 -C ./build
#@if [ ! -d "./bin" ]; then mkdir bin; fi
#@cp -p ./build/bin/* ./bin
unix: CMakeLists.txt
#@echo "making... ${JOBS} $(MAKEFLAGS) "
@if [ ! -d "./build" ]; then mkdir build; fi
@cmake -S ./ -B ./build || cmake3 -S ./ -B ./build
@make -j4 -C ./build
@if [ ! -d "./bin" ]; then mkdir bin; fi
@cp -p ./build/bin/* ./bin
test: tests
tests: CMakeLists.txt
@if [ ! -d "./build" ]; then mkdir build; fi
@cmake -S ./ -B ./build -DGROOT_BUILD_TESTS=ON || cmake3 -S ./ -B ./build -DGROOT_BUILD_TESTS=ON
@make -j4 -C ./build
@if [ ! -d "./bin" ]; then mkdir bin; fi
@cp -p ./build/bin/* ./bin
@ctest --test-dir ./build/tests --output-on-failure
clean:
@echo "cleaning..."
@if [ -d "./build" ]; then rm -rf build; fi
@if [ -d "./build_xcode" ]; then rm -rf build_xcode; fi
@if [ -d "./bin" ]; then rm -rf bin; fi