#
# Generated By: dol2asm
#

M262_TARGET := $(BUILD_DIR)/rel/d/a/d_a_horse.plf
M262_LDSCRIPT := $(BUILD_DIR)/rel/d/a/d_a_horse.lcf
M262_MAP := $(BUILD_DIR)/rel/d/a/d_a_horse.map

M262_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/d_a_horse/d_a_horse.cpp \

M262_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/d_a_horse/d_a_horse.o \

M262_LIBS := \

M262_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M262_TARGET): $(M262_O_FILES) $(M262_LIBS)
	@echo [262] creating $(M262_TARGET)
	@echo $(M262_LIBS) $(M262_O_FILES) > build/M262_ofiles
	@python3 tools/lcf.py rel 262 --output $(M262_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M262_LDFLAGS) -o $(M262_TARGET) @build/M262_ofiles

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


