#
# Generated By: dol2asm
#

M371_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_tkc.plf
M371_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_tkc.lcf
M371_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_tkc.map

M371_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_tkc/d_a_npc_tkc.cpp \

M371_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/npc/d_a_npc_tkc/d_a_npc_tkc.o \

M371_LIBS := \

M371_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

M371_LDFLAGS := \
	-nodefaults \
	-fp hard \
	-proc gekko \
	-linkmode moreram \
	-sdata 0 \
	-sdata2 0 \
	-m _prolog \
	-lcf $(M371_LDSCRIPT) \
	-unused -map $(M371_MAP) \
	-w off \

$(M371_TARGET): $(M371_O_FILES) $(M371_LIBS)
	@echo [371] creating $(M371_TARGET)
	@echo $(M371_LIBS) $(M371_O_FILES) > build/M371_ofiles
	@python3 tools/lcf.py rel 371 --output $(M371_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M371_LDFLAGS) -o $(M371_TARGET) @build/M371_ofiles

$(BUILD_DIR)/rel/d/a/npc/d_a_npc_tkc/%.o: rel/d/a/npc/d_a_npc_tkc/%.cpp $(BUILD_DIR)/rel/d/a/npc/d_a_npc_tkc/%.d
	@echo [371] building $@
	@mkdir -p $(@D)
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
	@$(CC) $(CFLAGS) $(M371_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
M371_D_FILES := $(M371_O_FILES:.o=.d)
$(M371_D_FILES):
include $(wildcard $(M371_D_FILES))
endif


