#
# Generated By: dol2asm
#

M399_TARGET := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_automata.plf
M399_LDSCRIPT := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_automata.lcf
M399_MAP := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_automata.map

M399_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/obj/d_a_obj_automata/d_a_obj_automata.cpp \

M399_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/obj/d_a_obj_automata/d_a_obj_automata.o \

M399_LIBS := \

M399_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M399_TARGET): $(M399_O_FILES) $(M399_LIBS)
	@echo [399] creating $(M399_TARGET)
	@echo $(M399_LIBS) $(M399_O_FILES) > build/M399_ofiles
	@python3 tools/lcf.py rel 399 --output $(M399_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M399_LDFLAGS) -o $(M399_TARGET) @build/M399_ofiles

$(BUILD_DIR)/rel/d/a/obj/d_a_obj_automata/%.o: rel/d/a/obj/d_a_obj_automata/%.cpp $(BUILD_DIR)/rel/d/a/obj/d_a_obj_automata/%.d
	@echo [399] building $@
	@mkdir -p $(@D)
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
	@$(CC) $(CFLAGS) $(M399_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
M399_D_FILES := $(M399_O_FILES:.o=.d)
$(M399_D_FILES):
include $(wildcard $(M399_D_FILES))
endif


