#
# Generated By: dol2asm
#

M308_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grm.plf
M308_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grm.lcf
M308_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grm.map

M308_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_grm/d_a_npc_grm.cpp \

M308_O_FILES := \
	$(BUILD_DIR)/rel/executor.o \
	$(BUILD_DIR)/rel/global_destructor_chain.o \
	$(BUILD_DIR)/rel/d/a/npc/d_a_npc_grm/d_a_npc_grm.o \

M308_LIBS := \

M308_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M308_TARGET): $(M308_O_FILES) $(M308_LIBS)
	@echo [308] creating $(M308_TARGET)
	@echo $(M308_LIBS) $(M308_O_FILES) > build/M308_ofiles
	@python3 tools/lcf.py rel 308 --output $(M308_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M308_LDFLAGS) -o $(M308_TARGET) @build/M308_ofiles

$(BUILD_DIR)/rel/d/a/npc/d_a_npc_grm/%.o: rel/d/a/npc/d_a_npc_grm/%.cpp $(BUILD_DIR)/rel/d/a/npc/d_a_npc_grm/%.d
	@echo [308] building $@
	@mkdir -p $(@D)
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp
	@$(CC) $(CFLAGS) $(M308_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
M308_D_FILES := $(M308_O_FILES:.o=.d)
$(M308_D_FILES):
include $(wildcard $(M308_D_FILES))
endif


