#
# Generated By: dol2asm
#

M502_TARGET := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_kita.plf
M502_LDSCRIPT := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_kita.lcf
M502_MAP := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_kita.map

M502_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/obj/d_a_obj_kita/d_a_obj_kita.cpp \

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

M502_LIBS := \

M502_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M502_TARGET): $(M502_O_FILES) $(M502_LIBS)
	@echo [502] creating $(M502_TARGET)
	@echo $(M502_LIBS) $(M502_O_FILES) > build/M502_ofiles
	@python3 tools/lcf.py rel 502 --output $(M502_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M502_LDFLAGS) -o $(M502_TARGET) @build/M502_ofiles

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


