layers, tags and make
This commit is contained in:
@@ -5,17 +5,23 @@ TARGET = absinthe
|
||||
SRC_FILES != find src/ -type f
|
||||
OBJ_FILES = $(SRC_FILES:src/%.c=build/%.o)
|
||||
|
||||
all: $(TARGET)
|
||||
all: proto $(TARGET)
|
||||
|
||||
proto:
|
||||
xdg-shell-protocol.h:
|
||||
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
|
||||
|
||||
wlr-layer-shell-unstable-v1-protocol.h:
|
||||
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
|
||||
|
||||
$(OBJ_FILES):
|
||||
mkdir -p $(@D)
|
||||
$(CC) $(CFLAGS) -o $@ -c $(@:build/%.o=src/%.c)
|
||||
proto: xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
|
||||
|
||||
$(TARGET): proto $(OBJ_FILES)
|
||||
.for _src in ${SRC_FILES}
|
||||
build/${_src:T:R}.o: ${_src}
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -c ${.ALLSRC} -o ${.TARGET}
|
||||
.endfor
|
||||
|
||||
$(TARGET): $(OBJ_FILES)
|
||||
$(CC) -o absinthe $(OBJ_FILES) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user