#
# Generated By: dol2asm
#

M338_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_moir.plf
M338_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_moir.lcf
M338_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_moir.map

M338_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_moir/d_a_npc_moir.cpp \

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

M338_LIBS := \

M338_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M338_TARGET): $(M338_O_FILES) $(M338_LIBS)
	@echo [338] creating $(M338_TARGET)
	@echo $(M338_LIBS) $(M338_O_FILES) > build/M338_ofiles
	@python3 tools/lcf.py rel 338 --output $(M338_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M338_LDFLAGS) -o $(M338_TARGET) @build/M338_ofiles

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


