header dependency tracking might be useful for main.dol too

This commit is contained in:
Jcw87 2023-01-06 18:28:25 -08:00
parent dd984e3b8e
commit 2112d5d992
1 changed files with 12 additions and 4 deletions

View File

@ -192,17 +192,25 @@ rungame: game
dolphin-emu $(BUILD_DIR)/game/sys/main.dol dolphin-emu $(BUILD_DIR)/game/sys/main.dol
# #
$(BUILD_DIR)/%.o: %.c $(BUILD_DIR)/%.o: %.c $(BUILD_DIR)/%.d
@mkdir -p $(@D) @mkdir -p $(@D)
@echo building... $< @echo building... $<
@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).c @$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).c
@$(CC) $(CFLAGS) -c -o $@ $(basename $@).c @$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $(dir $@) $(basename $@).c
@if [ -z '$(DISABLE_DEPS)' ]; then tools/transform-dep.py '$(basename $@).d' '$(basename $@).d'; touch -c $@; fi
$(BUILD_DIR)/%.o: %.cpp $(BUILD_DIR)/%.o: %.cpp $(BUILD_DIR)/%.d
@mkdir -p $(@D) @mkdir -p $(@D)
@echo building... $< @echo building... $<
@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp @$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
@$(CC) $(CFLAGS) -c -o $@ $(basename $@).cpp @$(CC) $(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
D_FILES := $(O_FILES:.o=.d)
$(D_FILES):
include $(wildcard $(D_FILES))
endif
# shared cpp files for RELs # shared cpp files for RELs
$(BUILD_DIR)/rel/%.o: rel/%.cpp $(BUILD_DIR)/rel/%.o: rel/%.cpp