diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-03-23 20:28:57 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-03-23 20:28:57 +0100 |
| commit | dace7dca77e9539b5cb459f79c1154d11b3030fe (patch) | |
| tree | fbd3bc83e15c7b8d7e41dc351a7a50cfc0164c2f /Makefile | |
first version of wlock
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
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} |