#
# Generated By: dol2asm
#

M52_TARGET := $(BUILD_DIR)/rel/d/a/d_a_nbomb.plf
M52_LDSCRIPT := $(BUILD_DIR)/rel/d/a/d_a_nbomb.lcf
M52_MAP := $(BUILD_DIR)/rel/d/a/d_a_nbomb.map

M52_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/d_a_nbomb/d_a_nbomb.cpp \

M52_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/d_a_nbomb/d_a_nbomb.o \

M52_LIBS := \

M52_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M52_TARGET): $(M52_O_FILES) $(M52_LIBS)
	@echo [ 52] creating $(M52_TARGET)
	@echo $(M52_LIBS) $(M52_O_FILES) > build/M52_ofiles
	@python3 tools/lcf.py rel 52 --output $(M52_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M52_LDFLAGS) -o $(M52_TARGET) @build/M52_ofiles

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


