mirror of https://github.com/zeldaret/tp.git
header dependency tracking might be useful for main.dol too
This commit is contained in:
parent
dd984e3b8e
commit
2112d5d992
16
Makefile
16
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue