#
# Generated By: dol2asm
#

M305_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_gra.plf
M305_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_gra.lcf
M305_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_gra.map

M305_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_gra/d_a_npc_gra.cpp \

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

M305_LIBS := \

M305_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M305_TARGET): $(M305_O_FILES) $(M305_LIBS)
	@echo [305] creating $(M305_TARGET)
	@echo $(M305_LIBS) $(M305_O_FILES) > build/M305_ofiles
	@python3 tools/lcf.py rel 305 --output $(M305_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M305_LDFLAGS) -o $(M305_TARGET) @build/M305_ofiles

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


