Rearrange & setup

This commit is contained in:
2026-05-03 23:00:41 +01:00
parent f953f72322
commit 9e85763f9e
12 changed files with 125 additions and 28 deletions
+13 -3
View File
@@ -38,6 +38,10 @@ CFLAGS_RELEASE := \
PCH_CFLAGS_DEBUG := $(CFLAGS_DEBUG) -x c++-header
PCH_CFLAGS_RELEASE := $(CFLAGS_RELEASE) -x c++-header
# ---------------- LIBS ----------------
LIBS := ./libs/mruby/build/host/lib/libmruby.a
# ---------------- SOURCES ----------------
SRC := $(wildcard $(SRC_DIR)/*.cc) $(wildcard $(SRC_DIR)/**/*.cc)
@@ -50,7 +54,7 @@ DEP_RELEASE := $(OBJ_RELEASE:.o=.d)
# ---------------- TARGETS ----------------
.PHONY: all debug release clean
.PHONY: all debug release clean setup
all: debug
@@ -58,6 +62,12 @@ debug: $(TARGET_DEBUG)
release: $(TARGET_RELEASE)
# ---------------- CLANGD ----------------
setup: setup.rb
@echo "Setting up clangd configuration..."
ruby setup.rb
# ---------------- PCH ----------------
$(PCH_DEBUG): $(INCLUDE_DIR)/pch.h
@@ -72,11 +82,11 @@ $(PCH_RELEASE): $(INCLUDE_DIR)/pch.h
$(TARGET_DEBUG): $(PCH_DEBUG) $(OBJ_DEBUG)
mkdir -p $(BIN_DIR)
$(CXX) $(CFLAGS_DEBUG) -o $@ $(OBJ_DEBUG) $(SDL_LIBS_DEBUG)
$(CXX) $(CFLAGS_DEBUG) -o $@ $(OBJ_DEBUG) $(SDL_LIBS_DEBUG) $(LIBS)
$(TARGET_RELEASE): $(PCH_RELEASE) $(OBJ_RELEASE)
mkdir -p $(BIN_DIR)
$(CXX) $(CFLAGS_RELEASE) -o $@ $(OBJ_RELEASE) $(SDL_LIBS_RELEASE)
$(CXX) $(CFLAGS_RELEASE) -o $@ $(OBJ_RELEASE) $(SDL_LIBS_RELEASE) $(LIBS)
# ---------------- COMPILE ----------------