From 29af5d65bc753adf3edad3028c7473124a0b000d Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 4 Jan 2023 20:22:33 +0100 Subject: Generate Wayland protocol sources According to the Wayland book this is the recommended way to get this code at build time. --- Makefile | 14 +++++++++++--- 1 file 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 -- cgit v1.2.3-70-g09d2