-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (52 loc) · 1.3 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
CONT_NAME=powerboard-driver-dev-container
# Minimal Mode (C++, No Binding, No Example)
.PHONY: build-minimal
build-minimal:
rm -rf build/
rm -rf lib/
mkdir build/
make -C thirdparty/libi2c/
cd build/ && \
cmake -DBUILD_PYTHON=OFF -DBUILD_EXAMPLES=OFF .. && \
make --no-print-directory -j4
.PHONY: install
install-minimal:
cd build/ && \
make install
.PHONY: deps-minimal
deps-minimal:
export DEBIAN_FRONTEND=noninteractive && \
sudo apt-get install -y g++ make cmake python python-dev
# Full Mode (C++, Binding, Example)
.PHONY: build-full
build-full:
rm -rf build/
rm -rf lib/
mkdir build/
make -C thirdparty/libi2c/
cd build/ && \
cmake .. && \
make --no-print-directory -j4
.PHONY: install-full
install-full:
cd build/ && \
make install
python3 setup.py install
.PHONY: deps-full
deps-full:
export DEBIAN_FRONTEND=noninteractive && \
sudo apt-get install -y g++ make cmake python python-dev python3 python3-dev python3-pip
# Docker
.PHONY: docker-build
docker-build:
docker build -f docker/Dockerfile -t lmwafer/powerboard-driver-dev:1.0.0-3 docker/context
.PHONY: up
up:
docker-compose -f docker/docker-compose.yml up -d
clear && docker exec -it ${CONT_NAME} bash
.PHONY: down
down:
docker-compose -f docker/docker-compose.yml down
.PHONY: enter
enter:
docker exec -it ${CONT_NAME} bash