#
# Generated By: dol2asm
#

M339_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_myna2.plf
M339_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_myna2.lcf
M339_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_myna2.map

M339_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_myna2/d_a_npc_myna2.cpp \

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

M339_LIBS := \

M339_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M339_TARGET): $(M339_O_FILES) $(M339_LIBS)
	@echo [339] creating $(M339_TARGET)
	@echo $(M339_LIBS) $(M339_O_FILES) > build/M339_ofiles
	@python3 tools/lcf.py rel 339 --output $(M339_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M339_LDFLAGS) -o $(M339_TARGET) @build/M339_ofiles

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


