diff options
author | William McKinnon <[email protected]> | 2023-07-10 23:38:01 -0400 |
---|---|---|
committer | William McKinnon <[email protected]> | 2023-07-10 23:38:01 -0400 |
commit | 74e85d896e4e0964a93113cd9ef31bfb10747b28 (patch) | |
tree | 7c4a8cfacab090b24d267bb1a135aa3b9dfd42bc /tinywl/Makefile | |
parent | 79d7bc73d1f1540efb4f7c50bcbfff1113374b36 (diff) | |
parent | f8b869bd19c1b128fd3a4d5005abd297b07045c4 (diff) |
Add 'tinywl/' from commit 'f8b869bd19c1b128fd3a4d5005abd297b07045c4'
git-subtree-dir: tinywl
git-subtree-mainline: 79d7bc73d1f1540efb4f7c50bcbfff1113374b36
git-subtree-split: f8b869bd19c1b128fd3a4d5005abd297b07045c4
Diffstat (limited to 'tinywl/Makefile')
-rw-r--r-- | tinywl/Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tinywl/Makefile b/tinywl/Makefile new file mode 100644 index 0000000..68bac25 --- /dev/null +++ b/tinywl/Makefile @@ -0,0 +1,26 @@ +WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols) +WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner) +LIBS=\ + $(shell pkg-config --cflags --libs wlroots) \ + $(shell pkg-config --cflags --libs wayland-server) \ + $(shell pkg-config --cflags --libs xkbcommon) + +# wayland-scanner is a tool which generates C headers and rigging for Wayland +# protocols, which are specified in XML. wlroots requires you to rig these up +# to your build system yourself and provide them in the include path. +xdg-shell-protocol.h: + $(WAYLAND_SCANNER) server-header \ + $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ + +tinywl: tinywl.c xdg-shell-protocol.h + $(CC) $(CFLAGS) \ + -g -Werror -I. \ + -DWLR_USE_UNSTABLE \ + -o $@ $< \ + $(LIBS) + +clean: + rm -f tinywl xdg-shell-protocol.h xdg-shell-protocol.c + +.DEFAULT_GOAL=tinywl +.PHONY: clean |