-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
48 lines (37 loc) · 977 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
43
44
45
46
47
48
.PHONY: all sts-online setup-cmake clean doc test debug release
BUILD = _build/release
EXE = sts-online
all: release
release: BUILD=_build/release
release: BUILD_TYPE=Release
release: setup-cmake
release: $(EXE)
debug: BUILD=_build/debug
debug: BUILD_TYPE = Debug
debug: setup-cmake
debug: $(EXE)
$(EXE): setup-cmake
+make -C$(BUILD) $@
test: BUILD=_build/debug
test: BUILD_TYPE = Debug
test: BUILD_TESTING = -DBUILD_TESTING=ON
test: setup-cmake
+make -C$(BUILD) run-tests
$(BUILD)/test/run-tests
setup-cmake: CMakeLists.txt
mkdir -p $(BUILD)
cd $(BUILD) && cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BUILD_TESTING} ../..
doc:
doxygen Doxyfile
clean:
rm -rf $(BUILD) doc/*
style:
astyle -A3 \
--pad-oper \
--unpad-paren \
--keep-one-line-blocks \
--keep-one-line-statements \
--suffix=none \
--formatted \
--lineend=linux \
`find src -regextype posix-extended -regex ".*\.(cc|h|hpp)$$"`