-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (39 loc) · 1.12 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
IMAGE?=cpcsdk/crossdev
VERSION?=4.1.22
INSTALL_ROOT?=/usr/local
# Build the docker container
build:
docker build -t $(IMAGE) .
$(MAKE) tag
# Create the tag of the current version and push it to the docker hub
push:
docker push $(IMAGE):$(VERSION)
tag:
docker tag \
$$( docker images | grep cpcsdk/crossdev | grep latest | sed -e 's/.*latest\W*//' -e 's/\(\w*\).*/\1/') \
$(IMAGE):$(VERSION)
test:
cd examples/experts && \
./bootstrap.sh make distclean && \
./bootstrap.sh make ALL && \
./bootstrap.sh test
open:
docker run -e DISPLAY=$(DISPLAY) \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /dev/snd:/dev/snd \
-v /dev/shm:/dev/shm \
-v /etc/machine-id:/etc/machine-id \
-v /run/user/$$(id -u)/pulse:/run/user/$$(id -u)/pulse \
-v /var/lib/dbus:/var/lib/dbus \
-v ~/.pulse:/home/arnold/.pulse \
--privileged \
--rm=true \
-e LOCAL_USER_ID=$$(id -u $$USER) \
-v "$$(pwd):/home/arnold/project" \
-w /home/arnold/project \
-i -t $(IMAGE)
# Install on the host machine the scripts
install_wrappers:
for file in wrappers/* ; do \
sudo cp $$file $(INSTALL_ROOT)/bin ; \
done