#
# Generated By: dol2asm
#

M41_TARGET := $(BUILD_DIR)/rel/d/a/d_a_tbox.plf
M41_LDSCRIPT := $(BUILD_DIR)/rel/d/a/d_a_tbox.lcf
M41_MAP := $(BUILD_DIR)/rel/d/a/d_a_tbox.map

M41_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/d_a_tbox/d_a_tbox.cpp \

M41_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/d_a_tbox/d_a_tbox.o \

M41_LIBS := \

M41_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M41_TARGET): $(M41_O_FILES) $(M41_LIBS)
	@echo [ 41] creating $(M41_TARGET)
	@echo $(M41_LIBS) $(M41_O_FILES) > build/M41_ofiles
	@python3 tools/lcf.py rel 41 --output $(M41_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M41_LDFLAGS) -o $(M41_TARGET) @build/M41_ofiles

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


