-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (37 loc) · 1.52 KB
/
Copy pathMakefile
File metadata and controls
54 lines (37 loc) · 1.52 KB
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
CARGO ?= cargo
NPM ?= npm
PREFIX ?= /usr
DESTDIR ?=
.PHONY: all build build-debug shell compositor frontend dev install uninstall clean package
all: build
build: shell compositor
build-debug:
$(MAKE) shell PROFILE=dev
$(MAKE) compositor PROFILE=dev
# --- shell (starthwde: SolidJS frontend + Tauri/Rust backend) ---------------
PROFILE ?= release
CARGO_PROFILE_FLAG := $(if $(filter release,$(PROFILE)),--release,)
frontend:
cd source-code/fronted && $(NPM) install --no-audit --no-fund && $(NPM) run build
shell: frontend
$(CARGO) build -p starthwde $(CARGO_PROFILE_FLAG)
# --- compositor (comphwde: Smithay Wayland/XWayland compositor) -------------
compositor:
$(CARGO) build -p comphwde $(CARGO_PROFILE_FLAG)
# --- dev loop -----------------------------------------------------------------
dev:
cd source-code/fronted && $(NPM) install --no-audit --no-fund && $(NPM) run build
$(CARGO) run -p starthwde -- dev
# --- packaging / install ------------------------------------------------------
# The actual install/uninstall logic lives in ./install.hl and ./remove.hl
# (plain bash scripts, runnable standalone too) - the Makefile just builds
# first and forwards PREFIX/DESTDIR.
install: build
./install.hl --skip-build --prefix "$(PREFIX)" --destdir "$(DESTDIR)"
uninstall:
./remove.hl --prefix "$(PREFIX)" --destdir "$(DESTDIR)"
package: build
cd source-code/backend/src-tauri && $(CARGO) tauri build
clean:
$(CARGO) clean
rm -rf source-code/fronted/dist source-code/fronted/node_modules