config.mk and bsd-compatable make

This commit is contained in:
2026-05-08 19:15:07 +07:00
parent 0971ee551e
commit daa92410a7
3 changed files with 38 additions and 9 deletions
+5 -8
View File
@@ -1,16 +1,13 @@
include config.mk
all: compile
proto:
wayland-scanner server-header $(shell pkg-config --variable=pkgdatadir wayland-protocols)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
wayland-scanner server-header ./protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
compile: proto
gcc -o absinthe src/* \
-Wall -Wextra -Wpedantic \
-DXWAYLAND \
-I./ -I./include -DWLR_USE_UNSTABLE $(shell pkg-config wlroots-0.20 --libs --cflags) -lwayland-server -lxkbcommon \
-O3 \
-g
cc -o absinthe src/* $(CFLAGS) $(LDFLAGS)
format:
find src/ -type f -print0 | xargs -0 clang-format -i