#
# Generated By: dol2asm
#

M358_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_seirei.plf
M358_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_seirei.lcf
M358_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_seirei.map

M358_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_seirei/d_a_npc_seirei.cpp \

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

M358_LIBS := \

M358_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M358_TARGET): $(M358_O_FILES) $(M358_LIBS)
	@echo [358] creating $(M358_TARGET)
	@echo $(M358_LIBS) $(M358_O_FILES) > build/M358_ofiles
	@python3 tools/lcf.py rel 358 --output $(M358_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M358_LDFLAGS) -o $(M358_TARGET) @build/M358_ofiles

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


