#
# Generated By: dol2asm
#

M302_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_fairy.plf
M302_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_fairy.lcf
M302_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_fairy.map

M302_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_fairy/d_a_npc_fairy.cpp \

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

M302_LIBS := \

M302_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M302_TARGET): $(M302_O_FILES) $(M302_LIBS)
	@echo [302] creating $(M302_TARGET)
	@echo $(M302_LIBS) $(M302_O_FILES) > build/M302_ofiles
	@python3 tools/lcf.py rel 302 --output $(M302_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M302_LDFLAGS) -o $(M302_TARGET) @build/M302_ofiles

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


