diff options
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} |