Integrate all the progress into master #6
|
@ -1,6 +1,7 @@
|
|||
# For now we ignore what is in root
|
||||
**/build
|
||||
**/bin
|
||||
**/gcm.cache
|
||||
**/iso/Info
|
||||
/iso
|
||||
|
||||
|
|
22
lib/Makefile
22
lib/Makefile
|
@ -1,6 +1,9 @@
|
|||
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
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...
|
||||
PLATFORM ?= PSX
|
||||
|
||||
|
@ -48,7 +51,7 @@ CXXFLAGS += -fno-exceptions -fno-rtti
|
|||
|
||||
CCFLAGS += -mno-gpopt -fomit-frame-pointer -ffunction-sections -fdata-sections
|
||||
CCFLAGS += -fno-builtin -fno-strict-aliasing -Wno-attributes
|
||||
CCFLAGS += -std=c++20
|
||||
CCFLAGS += -std=c++20 -fmodules-ts
|
||||
CCFLAGS += $(CCFLAGS_$(BUILD_PROFILE))
|
||||
CCFLAGS += $(ARCHFLAGS)
|
||||
CCFLAGS += $(INCLUDES)
|
||||
|
@ -66,25 +69,30 @@ LIBS_all += $(LIBS_$(BUILD_PROFILE))
|
|||
DEPS = -Wp,-MMD,$(@:%.o=%.d),-MT,$@
|
||||
|
||||
#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
|
||||
$(OUTPUT_DIR)/%.o: %.s
|
||||
.SECONDEXPANSION:
|
||||
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.s)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -c $(DEPS) -o $@ $(CCFLAGS) $<
|
||||
|
||||
$(OUTPUT_DIR)/%.o: %.c
|
||||
.SECONDEXPANSION:
|
||||
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.c)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -c $(DEPS) -o $@ $(CCFLAGS) $<
|
||||
|
||||
$(OUTPUT_DIR)/%.o: %.cpp
|
||||
.SECONDEXPANSION:
|
||||
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.cpp)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) -c $(DEPS) -o $@ $(CCFLAGS) $(CXXFLAGS) $<
|
||||
|
||||
.SECONDEXPANSION:
|
||||
$(OUTPUT_DIR)/%.o: $$(subst !super,..,%.s)
|
||||
$(OUTPUT_DIR)/%.o: $$(call desubstitute,%.cxx)
|
||||
@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)
|
||||
-include $(OBJS:%.o=%.d)
|
|
@ -1 +1,3 @@
|
|||
rebuild: | clean all
|
||||
rebuild:
|
||||
$(MAKE) clean
|
||||
$(MAKE) all
|
|
@ -11,7 +11,7 @@ CCFLAGS += -Iinclude -I../../include
|
|||
CCFLAGS += -save-temps=obj
|
||||
|
||||
include ../../lib/Wildcard.mk
|
||||
SRCS = $(call rwildcard, src, c cpp s)
|
||||
SRCS = $(call rwildcard, src, c cpp s)
|
||||
|
||||
include ../../lib/Makefile
|
||||
LIB_DIR = ../../lib/$(CONFIG_NAME)
|
||||
|
@ -46,4 +46,5 @@ clean:
|
|||
rm -fr $(SPLASH_IMAGE)
|
||||
rm -fr $(SPLASH_IMAGE_NTSC)
|
||||
rm -fr $(OUTPUT_DIR)
|
||||
rm -fr gcm.cache
|
||||
rm -fr $(LIB_DIR)/$(ARTIFACT).a
|
Loading…
Reference in New Issue