|
|
@ -1,6 +1,9 @@
|
|
|
|
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
include $(SELF_DIR)ExportPath.mk
|
|
|
|
include $(SELF_DIR)ExportPath.mk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
substitute = $(subst $(JABY_ENGINE_DIR)/include/modules,!JABYENGINEMODULES,$(subst ..,!super,$1))
|
|
|
|
|
|
|
|
desubstitute = $(subst !JABYENGINEMODULES,$(JABY_ENGINE_DIR)/include/modules,$(subst !super,..,$1))
|
|
|
|
|
|
|
|
|
|
|
|
#Build architecture/variant string, possible values: x86, armv7le, etc...
|
|
|
|
#Build architecture/variant string, possible values: x86, armv7le, etc...
|
|
|
|
PLATFORM ?= PSX
|
|
|
|
PLATFORM ?= PSX
|
|
|
|
|
|
|
|
|
|
|
@ -48,7 +51,7 @@ CXXFLAGS += -fno-exceptions -fno-rtti
|
|
|
|
|
|
|
|
|
|
|
|
CCFLAGS += -mno-gpopt -fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
|
|
CCFLAGS += -mno-gpopt -fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
|
|
CCFLAGS += -fno-builtin -fno-strict-aliasing -Wno-attributes
|
|
|
|
CCFLAGS += -fno-builtin -fno-strict-aliasing -Wno-attributes
|
|
|
|
CCFLAGS += -std=c++20
|
|
|
|
CCFLAGS += -std=c++20 -fmodules-ts
|
|
|
|
CCFLAGS += $(CCFLAGS_$(BUILD_PROFILE))
|
|
|
|
CCFLAGS += $(CCFLAGS_$(BUILD_PROFILE))
|
|
|
|
CCFLAGS += $(ARCHFLAGS)
|
|
|
|
CCFLAGS += $(ARCHFLAGS)
|
|
|
|
CCFLAGS += $(INCLUDES)
|
|
|
|
CCFLAGS += $(INCLUDES)
|
|
|
@ -66,25 +69,30 @@ LIBS_all += $(LIBS_$(BUILD_PROFILE))
|
|
|
|
DEPS = -Wp,-MMD,$(@:%.o=%.d),-MT,$@
|
|
|
|
DEPS = -Wp,-MMD,$(@:%.o=%.d),-MT,$@
|
|
|
|
|
|
|
|
|
|
|
|
#Object files list
|
|
|
|
#Object files list
|
|
|
|
OBJS = $(addprefix $(OUTPUT_DIR)/,$(addsuffix .o, $(subst ..,!super,$(basename $(SRCS)))))
|
|
|
|
MODS += $(call rwildcard,$(JABY_ENGINE_DIR)/include/modules, cxx)
|
|
|
|
|
|
|
|
SRCS := $(MODS) $(SRCS)
|
|
|
|
|
|
|
|
OBJS = $(addprefix $(OUTPUT_DIR)/,$(addsuffix .o, $(call substitute,$(basename $(SRCS)))))
|
|
|
|
|
|
|
|
|
|
|
|
#Compiling rule
|
|
|
|
#Compiling rule
|
|
|
|
$(OUTPUT_DIR)/%.o: %.s
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
|
|
|
|
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.s)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(CC) -c $(DEPS) -o $@ $(CCFLAGS) $<
|
|
|
|
$(CC) -c $(DEPS) -o $@ $(CCFLAGS) $<
|
|
|
|
|
|
|
|
|
|
|
|
$(OUTPUT_DIR)/%.o: %.c
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
|
|
|
|
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.c)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(CC) -c $(DEPS) -o $@ $(CCFLAGS) $<
|
|
|
|
$(CC) -c $(DEPS) -o $@ $(CCFLAGS) $<
|
|
|
|
|
|
|
|
|
|
|
|
$(OUTPUT_DIR)/%.o: %.cpp
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
|
|
|
|
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.cpp)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(CXX) -c $(DEPS) -o $@ $(CCFLAGS) $(CXXFLAGS) $<
|
|
|
|
$(CXX) -c $(DEPS) -o $@ $(CCFLAGS) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
$(OUTPUT_DIR)/%.o: $$(subst !super,..,%.s)
|
|
|
|
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.cxx)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(CC) $(ARCHFLAGS) -I$(PCSX_REDUX) -g -c -o $@ $<
|
|
|
|
$(CXX) -c $(DEPS) -o $@ $(CCFLAGS) $(CXXFLAGS) $<
|
|
|
|
|
|
|
|
|
|
|
|
#Inclusion of dependencies (object files to source and includes)
|
|
|
|
#Inclusion of dependencies (object files to source and includes)
|
|
|
|
-include $(OBJS:%.o=%.d)
|
|
|
|
-include $(OBJS:%.o=%.d)
|