Files

34 lines
779 B
Makefile
Raw Permalink Normal View History

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-13 13:25:46 +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-13 13:25:46 +07:00
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml $@
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
2026-05-13 13:25:46 +07:00
build/%.o: src/%.c
2026-05-10 20:06:05 +07:00
@mkdir -p build
2026-05-13 13:25:46 +07:00
$(CC) $(CFLAGS) -o $@ -c $<
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
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