summaryrefslogtreecommitdiff
path: root/libs/SSystem/SComponent
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/SComponent
parent5aa83db436135272bcb51ec6824ee3c4275285e4 (diff)
Generate makefiles from dol2asm
Diffstat (limited to 'libs/SSystem/SComponent')
-rw-r--r--libs/SSystem/SComponent/Makefile11
1 files changed, 9 insertions, 2 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