#
# Generated By: dol2asm
#

M501_TARGET := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_kiPot.plf
M501_LDSCRIPT := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_kiPot.lcf
M501_MAP := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_kiPot.map

M501_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/obj/d_a_obj_kiPot/d_a_obj_kiPot.cpp \

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

M501_LIBS := \

M501_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M501_TARGET): $(M501_O_FILES) $(M501_LIBS)
	@echo [501] creating $(M501_TARGET)
	@echo $(M501_LIBS) $(M501_O_FILES) > build/M501_ofiles
	@python3 tools/lcf.py rel 501 --output $(M501_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M501_LDFLAGS) -o $(M501_TARGET) @build/M501_ofiles

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


