summaryrefslogtreecommitdiff
path: root/libs/SSystem
diff options
context:
space:
mode:
authorJcw87 <Jcw87@users.noreply.github.com>2023-01-06 03:42:56 -0800
committerJcw87 <Jcw87@users.noreply.github.com>2023-01-06 03:52:59 -0800
commitdd984e3b8e9da4251f4c0afea305fb235bc5ff54 (patch)
tree0576cc627ce755031c482a1ac176bf45ff9f2dfe /libs/SSystem
parent5aa83db436135272bcb51ec6824ee3c4275285e4 (diff)
Generate makefiles from dol2asm
Diffstat (limited to 'libs/SSystem')
-rw-r--r--libs/SSystem/SComponent/Makefile11
-rw-r--r--libs/SSystem/SStandard/Makefile11
2 files changed, 18 insertions, 4 deletions
diff --git a/libs/SSystem/SComponent/Makefile b/libs/SSystem/SComponent/Makefile
index a169474d19..7454ceff2a 100644
--- a/libs/SSystem/SComponent/Makefile
+++ b/libs/SSystem/SComponent/Makefile
@@ -95,9 +95,16 @@ $(BUILD_DIR)/libSComponent.a: $(LIBSCOMPONENT_A_O_FILES)
@echo $(LIBSCOMPONENT_A_O_FILES) > build/LIBSCOMPONENT_A_ofiles
@$(LD) -xm l $(LIBSCOMPONENT_A_LDFLAGS) -o $(BUILD_DIR)/libSComponent.a @build/LIBSCOMPONENT_A_ofiles
-$(BUILD_DIR)/libs/SSystem/SComponent/%.o: libs/SSystem/SComponent/%.cpp
+$(BUILD_DIR)/libs/SSystem/SComponent/%.o: libs/SSystem/SComponent/%.cpp $(BUILD_DIR)/libs/SSystem/SComponent/%.d
@mkdir -p $(@D)
@echo building... $<
@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
- @$(CC) $(CFLAGS) $(LIBSCOMPONENT_A_CFLAGS) -c -o $@ $(basename $@).cpp
+ @$(CC) $(CFLAGS) $(LIBSCOMPONENT_A_CFLAGS) $(DEPFLAGS) -c -o $(dir $@) $(basename $@).cpp
+ @if [ -z '$(DISABLE_DEPS)' ]; then tools/transform-dep.py '$(basename $@).d' '$(basename $@).d'; touch -c $@; fi
+
+ifndef DISABLE_DEPS
+LIBSCOMPONENT_A_D_FILES := $(LIBSCOMPONENT_A_O_FILES:.o=.d)
+$(LIBSCOMPONENT_A_D_FILES):
+include $(wildcard $(LIBSCOMPONENT_A_D_FILES))
+endif
diff --git a/libs/SSystem/SStandard/Makefile b/libs/SSystem/SStandard/Makefile
index aceba2cd66..360ddb6c1b 100644
--- a/libs/SSystem/SStandard/Makefile
+++ b/libs/SSystem/SStandard/Makefile
@@ -21,9 +21,16 @@ $(BUILD_DIR)/libSStandard.a: $(LIBSSTANDARD_A_O_FILES)
@echo $(LIBSSTANDARD_A_O_FILES) > build/LIBSSTANDARD_A_ofiles
@$(LD) -xm l $(LIBSSTANDARD_A_LDFLAGS) -o $(BUILD_DIR)/libSStandard.a @build/LIBSSTANDARD_A_ofiles
-$(BUILD_DIR)/libs/SSystem/SStandard/%.o: libs/SSystem/SStandard/%.cpp
+$(BUILD_DIR)/libs/SSystem/SStandard/%.o: libs/SSystem/SStandard/%.cpp $(BUILD_DIR)/libs/SSystem/SStandard/%.d
@mkdir -p $(@D)
@echo building... $<
@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
- @$(CC) $(CFLAGS) $(LIBSSTANDARD_A_CFLAGS) -c -o $@ $(basename $@).cpp
+ @$(CC) $(CFLAGS) $(LIBSSTANDARD_A_CFLAGS) $(DEPFLAGS) -c -o $(dir $@) $(basename $@).cpp
+ @if [ -z '$(DISABLE_DEPS)' ]; then tools/transform-dep.py '$(basename $@).d' '$(basename $@).d'; touch -c $@; fi
+
+ifndef DISABLE_DEPS
+LIBSSTANDARD_A_D_FILES := $(LIBSSTANDARD_A_O_FILES:.o=.d)
+$(LIBSSTANDARD_A_D_FILES):
+include $(wildcard $(LIBSSTANDARD_A_D_FILES))
+endif