micro-wm/Makefile

22 lines
855 B
Makefile
Raw Normal View History

2023-10-31 15:01:36 +00:00
CFLAGS:=-O0 -pedantic -Wall -Wextra -DWLR_USE_UNSTABLE -Wno-unused-parameter -g
2023-10-30 12:00:27 +00:00
LDFLAGS:=$(shell pkg-config --libs wlroots wayland-server)
CC:=tcc
2023-10-28 15:14:49 +00:00
WAYLAND_SCANNER:=$(shell pkg-config --variable=wayland_scanner wayland-scanner)
WAYLAND_PROTOCOLS:=$(shell pkg-config --variable=pkgdatadir wayland-protocols)
2023-10-31 15:01:36 +00:00
all: xdg-shell-protocol.h xdg-shell-protocol.c wlr-layer-shell-unstable-v1-protocol.h
2023-10-28 15:14:49 +00:00
$(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 $@
2023-10-31 15:01:36 +00:00
xdg-shell-protocol.c:
$(WAYLAND_SCANNER) private-code $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml src/$@
2023-10-28 15:14:49 +00:00
wlr-layer-shell-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) server-header protocols/wlr-layer-shell-unstable-v1.xml $@
clean:
2023-10-31 15:01:36 +00:00
rm micro-wm *-protocol.h src/*-protocol.c