2026-05-08 19:15:07 +07:00
|
|
|
include config.mk
|
|
|
|
|
|
2026-05-09 21:52:03 +07:00
|
|
|
TARGET = absinthe
|
|
|
|
|
|
|
|
|
|
SRC_FILES != find src/ -type f
|
|
|
|
|
OBJ_FILES = $(SRC_FILES:src/%.c=build/%.o)
|
|
|
|
|
|
|
|
|
|
all: $(TARGET)
|
2026-01-02 22:53:34 +07:00
|
|
|
|
|
|
|
|
proto:
|
2026-05-08 19:15:07 +07:00
|
|
|
$(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
|
2026-01-02 22:53:34 +07:00
|
|
|
|
2026-05-09 21:52:03 +07:00
|
|
|
$(OBJ_FILES):
|
|
|
|
|
mkdir -p $(@D)
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $(@:build/%.o=src/%.c)
|
|
|
|
|
|
|
|
|
|
$(TARGET): proto $(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
|
2026-04-28 18:46:46 +07:00
|
|
|
|
|
|
|
|
format:
|
2026-05-08 19:19:43 +07:00
|
|
|
find src/ -type f | xargs $(CLANG_FORMAT) -i
|
|
|
|
|
find include/ -type f | xargs $(CLANG_FORMAT) -i
|