#
# Generated By: dol2asm
#

M50_TARGET := $(BUILD_DIR)/rel/d/a/d_a_mg_rod.plf
M50_LDSCRIPT := $(BUILD_DIR)/rel/d/a/d_a_mg_rod.lcf
M50_MAP := $(BUILD_DIR)/rel/d/a/d_a_mg_rod.map

M50_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/d_a_mg_rod/d_a_mg_rod.cpp \

M50_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/d_a_mg_rod/d_a_mg_rod.o \

M50_LIBS := \

M50_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M50_TARGET): $(M50_O_FILES) $(M50_LIBS)
	@echo [ 50] creating $(M50_TARGET)
	@echo $(M50_LIBS) $(M50_O_FILES) > build/M50_ofiles
	@python3 tools/lcf.py rel 50 --output $(M50_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M50_LDFLAGS) -o $(M50_TARGET) @build/M50_ofiles

$(BUILD_DIR)/rel/d/a/d_a_mg_rod/%.o: rel/d/a/d_a_mg_rod/%.cpp $(BUILD_DIR)/rel/d/a/d_a_mg_rod/%.d
	@echo [ 50] building $@
	@mkdir -p $(@D)
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
	@$(CC) $(CFLAGS) $(M50_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
M50_D_FILES := $(M50_O_FILES:.o=.d)
$(M50_D_FILES):
include $(wildcard $(M50_D_FILES))
endif


