#
# Generated By: dol2asm
#

M341_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_p2.plf
M341_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_p2.lcf
M341_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_p2.map

M341_CPP_FILES := \
	rel/executor.cpp \
	rel/d/a/npc/d_a_npc_p2/d_a_npc_p2.cpp \

M341_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/d/a/npc/d_a_npc_p2/d_a_npc_p2.o \

M341_LIBS := \

M341_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M341_TARGET): $(M341_O_FILES) $(M341_LIBS)
	@echo [341] creating $(M341_TARGET)
	@echo $(M341_LIBS) $(M341_O_FILES) > build/M341_ofiles
	@python3 tools/lcf.py rel 341 --output $(M341_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M341_LDFLAGS) -o $(M341_TARGET) @build/M341_ofiles

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


