#
# Generated By: dol2asm
#

M500_TARGET := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_ki.plf
M500_LDSCRIPT := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_ki.lcf
M500_MAP := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_ki.map

M500_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/obj/d_a_obj_ki/d_a_obj_ki.cpp \

M500_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/obj/d_a_obj_ki/d_a_obj_ki.o \

M500_LIBS := \

M500_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M500_TARGET): $(M500_O_FILES) $(M500_LIBS)
	@echo [500] creating $(M500_TARGET)
	@echo $(M500_LIBS) $(M500_O_FILES) > build/M500_ofiles
	@python3 tools/lcf.py rel 500 --output $(M500_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M500_LDFLAGS) -o $(M500_TARGET) @build/M500_ofiles

$(BUILD_DIR)/rel/d/a/obj/d_a_obj_ki/%.o: rel/d/a/obj/d_a_obj_ki/%.cpp $(BUILD_DIR)/rel/d/a/obj/d_a_obj_ki/%.d
	@echo [500] building $@
	@mkdir -p $(@D)
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
	@$(CC) $(CFLAGS) $(M500_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
M500_D_FILES := $(M500_O_FILES:.o=.d)
$(M500_D_FILES):
include $(wildcard $(M500_D_FILES))
endif


