glonkers/Makefile
2026-02-28 03:48:51 +01:00

32 lines
1.3 KiB
Makefile

LIBS=opengl wayland-client egl wayland-egl
CFLAGS+=-g -Wall -Wextra $(shell pkg-config --cflags $(LIBS))
LDLIBS+=$(shell pkg-config --libs $(LIBS)) -lwayland-cursor
WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
glonkers: wlr-layer-shell-unstable-v1-protocol.o xdg-shell-protocol.o renderer.o wayland.o
glonkers.o: wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h renderer.h wayland.h
renderer.o: renderer.h
wayland.o: wayland.h
xdg-shell-protocol.h:
$(WAYLAND_SCANNER) client-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c:
$(WAYLAND_SCANNER) private-code $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.o: xdg-shell-protocol.h
wlr-layer-shell-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) client-header protocols/wlr-layer-shell-unstable-v1.xml $@
wlr-layer-shell-unstable-v1-protocol.c:
$(WAYLAND_SCANNER) private-code protocols/wlr-layer-shell-unstable-v1.xml $@
wlr-layer-shell-unstable-v1-protocol.o: wlr-layer-shell-unstable-v1-protocol.h
PREFIX ?= /usr/local
install: glonkers
install -D -t $(DESTDIR)$(PREFIX)/bin glonkers
install -D -t $(DESTDIR)$(PREFIX)/share/man/man1 glonkers.1
clean:
rm -f *.o xdg-shell-protocol* wlr-layer-shell-unstable* glonkers