#
# Generated By: dol2asm
#

M256_TARGET := $(BUILD_DIR)/rel/d/a/e/d_a_e_yr.plf
M256_LDSCRIPT := $(BUILD_DIR)/rel/d/a/e/d_a_e_yr.lcf
M256_MAP := $(BUILD_DIR)/rel/d/a/e/d_a_e_yr.map

M256_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/e/d_a_e_yr/d_a_e_yr.cpp \

M256_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/e/d_a_e_yr/d_a_e_yr.o \

M256_LIBS := \

M256_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M256_TARGET): $(M256_O_FILES) $(M256_LIBS)
	@echo [256] creating $(M256_TARGET)
	@echo $(M256_LIBS) $(M256_O_FILES) > build/M256_ofiles
	@python3 tools/lcf.py rel 256 --output $(M256_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M256_LDFLAGS) -o $(M256_TARGET) @build/M256_ofiles

$(BUILD_DIR)/rel/d/a/e/d_a_e_yr/%.o: rel/d/a/e/d_a_e_yr/%.cpp $(BUILD_DIR)/rel/d/a/e/d_a_e_yr/%.d
	@echo [256] building $@
	@mkdir -p $(@D)
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
	@$(CC) $(CFLAGS) $(M256_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
M256_D_FILES := $(M256_O_FILES:.o=.d)
$(M256_D_FILES):
include $(wildcard $(M256_D_FILES))
endif


