wl-overlay/makefile

42 lines
1.2 KiB
Makefile

BUILD = build
CFLAGS += -Wall
# Pango and dependencies
CFLAGS += $(shell pkg-config --cflags pangocairo)
LDLIBS += $(shell pkg-config --libs pangocairo)
#CFLAGS += $(shell pkg-config --cflags glib-2.0)
#LDLIBS += $(shell pkg-config --libs glib-2.0)
#CFLAGS += $(shell pkg-config --cflags harfbuzz)
#LDLIBS += $(shell pkg-config --libs harfbuzz)
LDLIBS += -lwayland-client
LDLIBS += -lrt
LDLIBS += -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) $(INC) $(LDFLAGS) $(LDLIBS) -o "$@" $(C_FILES)