#
# Generated By: dol2asm
#

M387_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_zelR.plf
M387_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_zelR.lcf
M387_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_zelR.map

M387_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_zelR/d_a_npc_zelR.cpp \

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

M387_LIBS := \

M387_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M387_TARGET): $(M387_O_FILES) $(M387_LIBS)
	@echo [387] creating $(M387_TARGET)
	@echo $(M387_LIBS) $(M387_O_FILES) > build/M387_ofiles
	@python3 tools/lcf.py rel 387 --output $(M387_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M387_LDFLAGS) -o $(M387_TARGET) @build/M387_ofiles

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


