Files
absinthe/GNUmakefile
T

34 lines
779 B
Makefile
Raw Normal View History

2026-05-10 20:06:05 +07:00
include config.mk
TARGET = absinthe
SRC_FILES != find src/ -type f
OBJ_FILES = $(SRC_FILES:src/%.c=build/%.o)
all: proto $(TARGET)
xdg-shell-protocol.h:
2026-05-11 11:20:12 +07:00
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
2026-05-10 20:06:05 +07:00
wlr-layer-shell-unstable-v1-protocol.h:
2026-05-11 11:20:12 +07:00
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml $@
2026-05-10 20:06:05 +07:00
proto: xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
build/%.o: src/%.c
@mkdir -p build
$(CC) $(CFLAGS) -o $@ -c $<
$(TARGET): $(OBJ_FILES)
$(CC) -o absinthe $(OBJ_FILES) $(LDFLAGS)
clean:
rm -rf build/
rm absinthe
rm xdg-shell-protocol.h
rm wlr-layer-shell-unstable-v1-protocol.h
format:
find src/ -type f | xargs $(CLANG_FORMAT) -i
find include/ -type f | xargs $(CLANG_FORMAT) -i