diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-22 18:40:22 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-22 18:40:22 +0200 |
| commit | f14acf7306b022c1d0dd98f5fd654dbdc38e64e5 (patch) | |
| tree | 562e30fdad694f11fc1075b353be6d22d9094171 /Makefile | |
create ffbg
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c172b55 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +PROTOCOLS = xdg-shell-client-protocol.c wlr-layer-shell-protocol.c xdg-output-unstable-v1-client-protocol.c +SRC = ${PROTOCOLS} ffbg.c drw.c util.c wayland.c +OBJ = ${SRC:.c=.o} +CFLAGS = +LIBS = -lwayland-client -lrt -lm + +all: ffbg + +config.h: + cp config.def.h config.h + +xdg-shell-client-protocol.h: + wayland-scanner client-header < /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml > xdg-shell-client-protocol.h + +xdg-shell-client-protocol.c: xdg-shell-client-protocol.h + wayland-scanner private-code < /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml > xdg-shell-client-protocol.c + +xdg-output-unstable-v1-client-protocol.h: + wayland-scanner client-header < /usr/share/wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml > xdg-output-unstable-v1-client-protocol.h + +xdg-output-unstable-v1-client-protocol.c: xdg-output-unstable-v1-client-protocol.h + wayland-scanner private-code < /usr/share/wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml > xdg-output-unstable-v1-client-protocol.c + +wlr-layer-shell-protocol.h: + wayland-scanner client-header < protocols/wlr-layer-shell-unstable.xml > wlr-layer-shell-protocol.h + +wlr-layer-shell-protocol.c: wlr-layer-shell-protocol.h + wayland-scanner private-code < protocols/wlr-layer-shell-unstable.xml > wlr-layer-shell-protocol.c + +.c.o: + gcc -c $< ${CFLAGS} + +${OBJ}: ${PROTOCOLS} config.h + +ffbg: ${OBJ} ${SRC} + gcc ${OBJ} -o ffbg ${LIBS} + +install: ffbg + install -D ./ffbg /usr/local/bin/ffbg + +run: ffbg + ./ffbg + +clean: + rm *.o ffbg ${PROTOCOLS} ${PROTOCOLS:.c=.h} |