#
# Generated By: dol2asm
#

M301_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_du.plf
M301_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_du.lcf
M301_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_du.map

M301_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_du/d_a_npc_du.cpp \

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

M301_LIBS := \

M301_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M301_TARGET): $(M301_O_FILES) $(M301_LIBS)
	@echo [301] creating $(M301_TARGET)
	@echo $(M301_LIBS) $(M301_O_FILES) > build/M301_ofiles
	@python3 tools/lcf.py rel 301 --output $(M301_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M301_LDFLAGS) -o $(M301_TARGET) @build/M301_ofiles

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


