This commit is contained in:
Your Name 2023-10-31 18:01:36 +03:00
parent 9081bd6d9c
commit b5fba46c63
3 changed files with 52 additions and 29 deletions

View file

@ -1,18 +1,21 @@
CFLAGS:=-s -O0 -pedantic -Wall -Wextra -DWLR_USE_UNSTABLE -Wno-unused-parameter
CFLAGS:=-O0 -pedantic -Wall -Wextra -DWLR_USE_UNSTABLE -Wno-unused-parameter -g
LDFLAGS:=$(shell pkg-config --libs wlroots wayland-server)
CC:=tcc
WAYLAND_SCANNER:=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
WAYLAND_PROTOCOLS:=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
all: xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
all: xdg-shell-protocol.h xdg-shell-protocol.c wlr-layer-shell-unstable-v1-protocol.h
$(CC) $(CFLAGS) $(LDFLAGS) src/*.c -Iinclude/ -I. -o micro-wm
xdg-shell-protocol.h:
$(WAYLAND_SCANNER) server-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 src/$@
wlr-layer-shell-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) server-header protocols/wlr-layer-shell-unstable-v1.xml $@
clean:
rm micro-wm *-protocol.h
rm micro-wm *-protocol.h src/*-protocol.c