transfer RENA project deps+make to enby
This commit is contained in:
parent
a16720e92f
commit
b479742884
4 changed files with 141 additions and 0 deletions
51
Makefile
Normal file
51
Makefile
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
.DEFAULT_GOAL := all
|
||||
|
||||
include config.mk
|
||||
|
||||
# === BUILD ENVIRONMENT ===
|
||||
BIN := bin
|
||||
BUILD := build
|
||||
|
||||
LIB := lib
|
||||
|
||||
# === MACRO DEFINITIONS ===
|
||||
define objpath
|
||||
$(addprefix $(BUILD)/,
|
||||
$(addsuffix .o,
|
||||
$(basename $(1))))
|
||||
endef
|
||||
define mkobj
|
||||
$(foreach DEP, $?,
|
||||
mkdir -p $(dir $(call objpath, $(DEP)))
|
||||
$(CC) $(CFLAGS) $1 -o $(call objpath, $(DEP)) -c $(DEP))
|
||||
|
||||
$(LD) -r $(LDFLAGS) -o $@ $(call objpath, $?)
|
||||
endef
|
||||
|
||||
# === BUILD TARGETS ===
|
||||
all:
|
||||
|
||||
.PHONY: tests
|
||||
tests: $(BIN) $(BIN)/test-imgui-sdl3glfw3 $(BIN)/test-custom
|
||||
|
||||
$(BIN)/test-imgui-sdl3glfw3:
|
||||
$(CXX) -o $@ sandbox/$(notdir $@).cpp -Ideps -Ideps/imgui -Ldeps -limgui -lSDL3 -lGL -lm
|
||||
$(BIN)/test-custom:
|
||||
$(CXX) -o $@ sandbox/$(notdir $@).cpp -Ideps -Ideps/imgui -Ldeps -limgui -lSDL3 -lGL -lm
|
||||
$(BUILD) $(BIN):
|
||||
mkdir -p $@
|
||||
|
||||
# === DEVELOPMENT TARGETS ===
|
||||
# .PHONY: debug run test
|
||||
# debug:
|
||||
# $(MAKE) all \
|
||||
# CFLAGS="$(CFLAGS) $(CFLAGS_DBG)" \
|
||||
# CLDFLAGS="$(CLDFLAGS) $(CLDFLAGS_DBG)"
|
||||
# run: debug
|
||||
# - command $(BIN)/pw-test
|
||||
# test: clean run
|
||||
|
||||
# === UTILITY TARGETS ===
|
||||
.PHONY: clean
|
||||
clean:
|
||||
- rm -rf $(BUILD) $(BIN) vgcore.* &>/dev/null logs/
|
||||
Loading…
Add table
Add a link
Reference in a new issue