2019-12-12 22:24:46 +03:00
|
|
|
WAYLAND=`pkg-config wayland-client --cflags --libs`
|
2020-05-17 22:07:21 +03:00
|
|
|
WAYLAND_SCANNER=wayland-scanner
|
|
|
|
WAYLAND_PROTOCOLS_DIR=/usr/share/wayland-protocols
|
|
|
|
|
2019-12-12 22:24:46 +03:00
|
|
|
CFLAGS?=-std=c11 -Wall -Werror -O3 -fvisibility=hidden
|
|
|
|
|
2020-05-17 22:07:21 +03:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
demo: main.c xdg-shell.c xdg-shell.h
|
2019-12-12 22:24:46 +03:00
|
|
|
$(CC) -o demo *.c $(WAYLAND) -lrt -lm
|
|
|
|
|
2020-05-17 22:07:21 +03:00
|
|
|
xdg-shell.c:
|
|
|
|
$(WAYLAND_SCANNER) code $(WAYLAND_PROTOCOLS_DIR)/stable/xdg-shell/xdg-shell.xml xdg-shell.c
|
|
|
|
|
|
|
|
xdg-shell.h:
|
|
|
|
$(WAYLAND_SCANNER) client-header $(WAYLAND_PROTOCOLS_DIR)/stable/xdg-shell/xdg-shell.xml xdg-shell.h
|
2019-12-12 22:24:46 +03:00
|
|
|
|
|
|
|
clean:
|
2020-05-17 22:07:21 +03:00
|
|
|
$(RM) demo xdg-shell.c xdg-shell.h
|