-
Notifications
You must be signed in to change notification settings - Fork 45
/
Makefile
65 lines (52 loc) · 1.23 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.PHONY: all
.PHONY: docs
threads=1
config=Release
PWD=$(shell pwd)
all: build docs
check-config:
@echo "---check-config---"
@if [ -z `echo ${config} | grep 'Release\|Debug'` ]; then \
echo "[x] config parameter ${config} is invalid" 1>&2; \
exit 1; \
fi
build: check-config
cmake -B build ${args}
cmake --build build --config ${config} --parallel
cmake --install build --prefix build/install --config ${config}
python-whl:
python3 -m pip wheel -v -w ${PWD}/build/ .
docs:
mkdir -p build/docs/html/docs/
cp -r docs/img/ build/docs/html/docs/
(cat Doxyfile; echo "NUM_PROC_THREADS=${threads}") | doxygen -
docs-update:
rm -rf docs/html/
cp -r build/docs/html/ docs/
pkg:
cd build/ && \
cpack
dist:
cd build/ && \
make package_source
install:
cd build/ && \
make install && \
ldconfig
uninstall:
cd build/ && \
make uninstall
clean:
rm -rf build/
rm -rf deps/build/
rm -rf dist/
rm -rf pybinlex.egg-info/
rm -f *.so
rm -f *.whl
rm -f docker-compose.yml
rm -rf config/
rm -rf venv/
clean-docker:
@docker stop $(shell docker ps -a -q) 2>/dev/null || echo > /dev/null
@docker rm $(shell docker ps -a -q) 2>/dev/null || echo > /dev/null
@docker rmi $(shell docker images -a -q) 2>/dev/null || echo > /dev/null