-
Notifications
You must be signed in to change notification settings - Fork 84
/
Makefile
47 lines (37 loc) · 942 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
.PHONY: build
build:
[ -d build ] || cmake -B build
cmake --build build --parallel
.PHONY: ninja
ninja:
[ -d build ] || cmake -B build -G Ninja
make build
.PHONY: release
release:
[ -d build ] || cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
.PHONY: dist
dist: build
cmake --install build --prefix dist
.PHONY: test
test: build
cmake --build build --parallel -t retest
build/test/retest -rv
.PHONY: clean
clean:
@rm -Rf build dist CMakeCache.txt CMakeFiles
###############################################################################
#
# Documentation section
#
DOX_DIR=../re-dox
$(DOX_DIR):
@mkdir $@
$(DOX_DIR)/Doxyfile: mk/Doxyfile Makefile
@cp $< $@
@perl -pi -e 's/PROJECT_NUMBER\s*=.*/PROJECT_NUMBER = $(VERSION)/' \
$(DOX_DIR)/Doxyfile
.PHONY:
dox: $(DOX_DIR) $(DOX_DIR)/Doxyfile
@doxygen $(DOX_DIR)/Doxyfile 2>&1 | grep -v DEBUG_ ; true
echo "Doxygen docs in $(DOX_DIR)"