Fix loop to be more accuratly timed, and added custom ruby libs inclusion setup
This commit is contained in:
@@ -14,6 +14,7 @@ CXX := $(CCACHE) clang++
|
||||
CC := $(CCACHE) clang
|
||||
|
||||
# ---------------- SDL3 ----------------
|
||||
|
||||
SDL_CFLAGS := $(shell pkg-config --cflags sdl3 sdl3-ttf sdl3-image)
|
||||
SDL_LIBS_DEBUG := $(shell pkg-config --libs sdl3 sdl3-ttf sdl3-image)
|
||||
SDL_LIBS_RELEASE := $(shell pkg-config --libs sdl3 sdl3-ttf sdl3-image)
|
||||
@@ -42,9 +43,11 @@ PCH_CFLAGS_RELEASE := $(CFLAGS_RELEASE) -x c++-header
|
||||
|
||||
LIBS := ./libs/mruby/build/host/lib/libmruby.a
|
||||
|
||||
MGEM_DIR := ./libs/l_mgems
|
||||
|
||||
# ---------------- SOURCES ----------------
|
||||
|
||||
SRC := $(wildcard $(SRC_DIR)/*.cc) $(wildcard $(SRC_DIR)/**/*.cc)
|
||||
SRC := $(shell find $(SRC_DIR) -name "*.cc")
|
||||
|
||||
OBJ_DEBUG := $(patsubst $(SRC_DIR)/%.cc,$(OBJ_DIR)/debug/%.o,$(SRC))
|
||||
OBJ_RELEASE := $(patsubst $(SRC_DIR)/%.cc,$(OBJ_DIR)/release/%.o,$(SRC))
|
||||
@@ -54,13 +57,13 @@ DEP_RELEASE := $(OBJ_RELEASE:.o=.d)
|
||||
|
||||
# ---------------- TARGETS ----------------
|
||||
|
||||
.PHONY: all debug release clean setup
|
||||
.PHONY: all debug release clean setup mgems
|
||||
|
||||
all: debug
|
||||
|
||||
debug: $(TARGET_DEBUG)
|
||||
debug: mgems $(TARGET_DEBUG)
|
||||
|
||||
release: $(TARGET_RELEASE)
|
||||
release: mgems $(TARGET_RELEASE)
|
||||
|
||||
# ---------------- CLANGD ----------------
|
||||
|
||||
@@ -68,6 +71,11 @@ setup: setup.rb
|
||||
@echo "Setting up clangd configuration..."
|
||||
ruby setup.rb
|
||||
|
||||
# ---------------- MRB_MGEMS ----------------
|
||||
|
||||
mgems:
|
||||
$(MGEM_DIR)/compile.sh
|
||||
|
||||
# ---------------- PCH ----------------
|
||||
|
||||
$(PCH_DEBUG): $(INCLUDE_DIR)/pch.h
|
||||
|
||||
Reference in New Issue
Block a user