#
# Generated By: dol2asm
#

M313_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grz.plf
M313_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grz.lcf
M313_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grz.map

M313_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_grz/d_a_npc_grz.cpp \

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

M313_LIBS := \

M313_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M313_TARGET): $(M313_O_FILES) $(M313_LIBS)
	@echo [313] creating $(M313_TARGET)
	@echo $(M313_LIBS) $(M313_O_FILES) > build/M313_ofiles
	@python3 tools/lcf.py rel 313 --output $(M313_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M313_LDFLAGS) -o $(M313_TARGET) @build/M313_ofiles

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


