wl-overlay/makefile
2022-09-07 21:02:11 +02:00

38 lines
1.1 KiB
Makefile

BUILD = build
CFLAGS += -Wall
CFLAGS += $(shell pkg-config --cflags pangocairo)
LDLIBS += $(shell pkg-config --libs pangocairo)
CFLAGS += $(shell pkg-config --cflags cairo)
LDLIBS += $(shell pkg-config --libs cairo)
CFLAGS += $(shell pkg-config --cflags wayland-client)
LDLIBS += $(shell pkg-config --libs wayland-client)
LDLIBS += -lrt
$(shell mkdir -p $(BUILD))
.PHONY: all clean
all: build/wl-overlay
clean:
rm -rf $(BUILD)/*
xdg-shell-client-protocol.h: /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml
wayland-scanner client-header < "$^" > "$@"
build/xdg-shell-protocol.c: /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml
wayland-scanner private-code < "$^" > "$@"
wlr-layer-shell-protocol.h: wlr-layer-shell-unstable-v1.xml
wayland-scanner client-header < "$^" > "$@"
build/wlr-layer-shell-protocol.c: wlr-layer-shell-unstable-v1.xml
wayland-scanner private-code < "$^" > "$@"
C_FILES = wl-overlay.c build/xdg-shell-protocol.c build/wlr-layer-shell-protocol.c
build/wl-overlay: $(C_FILES) xdg-shell-client-protocol.h wlr-layer-shell-protocol.h
$(CC) $(CFLAGS) $(INC) $(LDFLAGS) $(LDLIBS) -o "$@" $(C_FILES)