forked from Eeems-Org/oxide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
93 lines (77 loc) · 2.57 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
all: release
DEVICE_IP ?= "10.11.99.1"
# DEVICE_IP ?= "192.168.0.34"
SSH_DIR ?= $(HOME)/.ssh
# SSH_DIR ?= $(shell cygpath -w ~/.ssh)
# SSH_DIR ?= G:\cygwin64\home\Eeems\.ssh
QTCREATOR_RUN_ARGS ?= --gpus all
# QTCREATOR_RUN_ARGS ?=
ifeq ($(OS),Windows_NT)
BUILD_DIR ?= $(shell cygpath -w `pwd`)
DISPLAY ?= host.docker.internal:0.0
DISPLAY_ARGS ?=
else
BUILD_DIR ?= $(shell pwd)
DISPLAY ?= unix$(DISPLAY)
DISPLAY_ARGS ?= -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd
endif
.PHONY: docker-qtcreator
docker-qtcreator:
cd docker-toolchain/qtcreator && docker build \
--tag rm-qtcreator .
qtcreator: docker-qtcreator
xhost +SI:localuser:root > /dev/null
docker start -a qtcreator || \
docker run \
$(QTCREATOR_RUN_ARGS) \
--name qtcreator \
-v '$(BUILD_DIR):/root/project:rw' \
-v '$(SSH_DIR):/root/.ssh' \
-v '$(BUILD_DIR)/docker-toolchain/qtcreator/files/config:/root/.config' \
-w /root/project \
-e DISPLAY=$(DISPLAY) \
$(DISPLAY_ARGS) \
rm-qtcreator:latest
clean:
rm -rf .build
rm -rf release
release: clean
$(MAKE) build
mkdir -p release
INSTALL_ROOT=../../release $(MAKE) -C .build/process-manager install
INSTALL_ROOT=../../release $(MAKE) -C .build/system-service install
INSTALL_ROOT=../../release $(MAKE) -C .build/settings-manager install
INSTALL_ROOT=../../release $(MAKE) -C .build/screenshot-tool install
INSTALL_ROOT=../../release $(MAKE) -C .build/launcher install
INSTALL_ROOT=../../release $(MAKE) -C .build/lockscreen install
build: tarnish erode rot oxide decay fret
erode:
mkdir -p .build/process-manager
cp -r applications/process-manager/* .build/process-manager
cd .build/process-manager && qmake erode.pro
$(MAKE) -C .build/process-manager all
tarnish:
mkdir -p .build/system-service
cp -r applications/system-service/* .build/system-service
cd .build/system-service && qmake tarnish.pro
$(MAKE) -C .build/system-service all
rot: tarnish
mkdir -p .build/settings-manager
cp -r applications/settings-manager/* .build/settings-manager
cd .build/settings-manager && qmake rot.pro
$(MAKE) -C .build/settings-manager all
fret: tarnish
mkdir -p .build/screenshot-tool
cp -r applications/screenshot-tool/* .build/screenshot-tool
cd .build/screenshot-tool && qmake fret.pro
$(MAKE) -C .build/screenshot-tool all
oxide: tarnish
mkdir -p .build/launcher
cp -r applications/launcher/* .build/launcher
cd .build/launcher && qmake oxide.pro
$(MAKE) -C .build/launcher all
decay: tarnish
mkdir -p .build/lockscreen
cp -r applications/lockscreen/* .build/lockscreen
cd .build/lockscreen && qmake decay.pro
$(MAKE) -C .build/lockscreen all