diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0d5a311 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +WLR_LAYER_SHELL=protocol/wlr-layer-shell-unstable.xml +XDG_SHELL=/usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml +DWL_IPC=protocol/dwl-bar-ipc-unstable-v1.xml +PROTOCOLS=wlr-layer-shell-protocol.c xdg-shell-protocol.c dwl-bar-ipc-protocol.c +SRC=dmenu-wl.c drw.c util.c wayland.c +OBJ=${SRC:.c=.o} ${PROTOCOLS:.c=.o} +LDFLAGS=-lfreetype -lwayland-client -lrt -lxkbcommon -lm -lgrapheme +CFLAGS=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread +CC=gcc + +default_target: options dmenu-wl + +options: + @echo ${OBJ} + +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} > $@ + +dwl-bar-ipc-protocol.h: + wayland-scanner client-header < ${DWL_IPC} > $@ + +dwl-bar-ipc-protocol.c: dwl-bar-ipc-protocol.h + wayland-scanner private-code < ${DWL_IPC} > $@ + +.c.o: + ${CC} -c $< ${CFLAGS} + +${OBJ}: ${PROTOCOLS} config.h + +dmenu-wl: ${OBJ} + ${CC} -o $@ ${OBJ} ${LDFLAGS} + +clean: + rm ${OBJ} dmenu-wl ${PROTOCOLS} ${PROTOCOLS:.c=.h} |