28 lines
865 B
Makefile
28 lines
865 B
Makefile
BUILD = build
|
|
|
|
CFLAGS += -Wall
|
|
LDLIBS = -lwayland-client -lrt -lcairo
|
|
|
|
$(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) $(LDLIBS) -o "$@" $(C_FILES)
|