#
# Generated By: dol2asm
#

M2_TARGET := $(BUILD_DIR)/rel/d/a/d_a_andsw.plf
M2_LDSCRIPT := $(BUILD_DIR)/rel/d/a/d_a_andsw.lcf
M2_MAP := $(BUILD_DIR)/rel/d/a/d_a_andsw.map

M2_CPP_FILES := \
	rel/executor.cpp \
	rel/d/a/d_a_andsw/d_a_andsw.cpp \

M2_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/d/a/d_a_andsw/d_a_andsw.o \

M2_LIBS := \

M2_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M2_TARGET): $(M2_O_FILES) $(M2_LIBS)
	@echo [  2] creating $(M2_TARGET)
	@echo $(M2_LIBS) $(M2_O_FILES) > build/M2_ofiles
	@python3 tools/lcf.py rel 2 --output $(M2_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M2_LDFLAGS) -o $(M2_TARGET) @build/M2_ofiles

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


