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)
|
|
|
|
|
|
2026-05-10 20:06:05 +07:00
|
|
|
all: proto $(TARGET)
|
2026-01-02 22:53:34 +07:00
|
|
|
|
2026-05-10 20:06:05 +07:00
|
|
|
xdg-shell-protocol.h:
|
2026-05-08 19:15:07 +07:00
|
|
|
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
|
2026-05-10 20:06:05 +07:00
|
|
|
|
|
|
|
|
wlr-layer-shell-unstable-v1-protocol.h:
|
2026-05-08 19:15:07 +07:00
|
|
|
$(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-10 20:06:05 +07:00
|
|
|
proto: xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
|
|
|
|
|
|
|
|
|
|
.for _src in ${SRC_FILES}
|
|
|
|
|
build/${_src:T:R}.o: ${_src}
|
|
|
|
|
@mkdir -p build
|
|
|
|
|
$(CC) $(CFLAGS) -c ${.ALLSRC} -o ${.TARGET}
|
|
|
|
|
.endfor
|
2026-05-09 21:52:03 +07:00
|
|
|
|
2026-05-10 20:06:05 +07:00
|
|
|
$(TARGET): $(OBJ_FILES)
|
2026-05-09 21:52:03 +07:00
|
|
|
$(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
|