#
# Generated By: dol2asm
#

M331_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_kyury.plf
M331_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_kyury.lcf
M331_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_kyury.map

M331_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_kyury/d_a_npc_kyury.cpp \

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

M331_LIBS := \

M331_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M331_TARGET): $(M331_O_FILES) $(M331_LIBS)
	@echo [331] creating $(M331_TARGET)
	@echo $(M331_LIBS) $(M331_O_FILES) > build/M331_ofiles
	@python3 tools/lcf.py rel 331 --output $(M331_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M331_LDFLAGS) -o $(M331_TARGET) @build/M331_ofiles

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


