#
# Generated By: dol2asm
#

M58_TARGET := $(BUILD_DIR)/rel/d/a/d_a_alldie.plf
M58_LDSCRIPT := $(BUILD_DIR)/rel/d/a/d_a_alldie.lcf
M58_MAP := $(BUILD_DIR)/rel/d/a/d_a_alldie.map

M58_CPP_FILES := \
	rel/executor.cpp \
	rel/d/a/d_a_alldie/d_a_alldie.cpp \

M58_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/d/a/d_a_alldie/d_a_alldie.o \

M58_LIBS := \

M58_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M58_TARGET): $(M58_O_FILES) $(M58_LIBS)
	@echo [ 58] creating $(M58_TARGET)
	@echo $(M58_LIBS) $(M58_O_FILES) > build/M58_ofiles
	@python3 tools/lcf.py rel 58 --output $(M58_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M58_LDFLAGS) -o $(M58_TARGET) @build/M58_ofiles

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


