diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-06 23:29:18 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-06 23:29:18 +0200 |
| commit | 63288c4d50dea63a5a403b86762cf66c9db35325 (patch) | |
| tree | 1874b283366216f6a91a0084a63a9c44da3d6c2b /Makefile | |
create green window using xdg-surface
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d34a6af --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +PROTOCOLS = xdg-shell-client-protocol.c +SRC = ${PROTOCOLS} swt.c drw.c util.c wayland.c +OBJ = ${SRC:.c=.o} +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 +LIBS = -lfreetype -lwayland-client -lrt -lxkbcommon -lm -lgrapheme + +all: swt + +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 + +.c.o: + gcc -c $< ${CFLAGS} + +${OBJ}: ${PROTOCOLS} config.h + +swt: ${OBJ} ${SRC} + gcc ${OBJ} -o swt ${LIBS} + +install: swt + install -D ./swt /usr/local/bin/swt + +run: swt + ./swt + +clean: + rm *.o swt ${PROTOCOLS} ${PROTOCOLS:.c=.h} |