summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-01-04 20:22:33 +0100
committerxengineering <me@xengineering.eu>2023-01-06 14:22:53 +0100
commit29af5d65bc753adf3edad3028c7473124a0b000d (patch)
tree897dcc1f11d998e588e5dbf40796d708c25f9292
parentc1ab3b92c596694b760ca6d9a86ef6b50e5564e3 (diff)
downloadphonelock-29af5d65bc753adf3edad3028c7473124a0b000d.tar
phonelock-29af5d65bc753adf3edad3028c7473124a0b000d.tar.zst
phonelock-29af5d65bc753adf3edad3028c7473124a0b000d.zip
Generate Wayland protocol sources
According to the Wayland book this is the recommended way to get this code at build time.
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f855e96..da9db8c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,16 @@
all: build/phonelock
-build/phonelock: main.c
- mkdir -p build
+build/phonelock: build main.c wayland-client.h wayland-protocol.c
gcc -Wall -o build/phonelock main.c
+build:
+ mkdir -p build
+
+wayland-client.h:
+ wayland-scanner client-header < /usr/share/wayland/wayland.xml > $@
+
+wayland-protocol.c:
+ wayland-scanner private-code < /usr/share/wayland/wayland.xml > $@
+
clean:
- rm -rf build
+ rm -rf build wayland-client.h wayland-protocol.c