From dace7dca77e9539b5cb459f79c1154d11b3030fe Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 23 Mar 2023 20:28:57 +0100 Subject: first version of wlock --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6d998b3 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +include config.mk + +PROTOCOLS = wlr-layer-shell-protocol.c xdg-shell-protocol.c +SRC = wlock.c util.c drw.c wayland.c +OBJ = ${SRC:.c=.o} ${PROTOCOLS:.c=.o} +WLR_LAYER_SHELL = ./protocols/wlr-layer-shell-unstable.xml + +default_target: wlock + +wlr-layer-shell-protocol.h: + wayland-scanner client-header < ${WLR_LAYER_SHELL} > $@ + +wlr-layer-shell-protocol.c: wlr-layer-shell-protocol.h + wayland-scanner private-code < ${WLR_LAYER_SHELL} > $@ + +xdg-shell-protocol.h: + wayland-scanner client-header < ${XDG_SHELL} > $@ + +xdg-shell-protocol.c: xdg-shell-protocol.h + wayland-scanner private-code < ${XDG_SHELL} > $@ + +.c.o: + ${CC} -c $< ${CPPFLAGS} + +${OBJ}: ${PROTOCOLS} config.h + +wlock: ${OBJ} + ${CC} -o $@ ${OBJ} ${LDFLAGS} + +install: wlock + install wlock /usr/local/bin/ + chmod u+s /usr/local/bin/wlock + +clean: + rm ${OBJ} wlock ${PROTOCOLS:.c=.h} ${PROTOCOLS} -- cgit v1.2.3-70-g09d2