#
# Generated By: dol2asm
#

M328_TARGET := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_knj.plf
M328_LDSCRIPT := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_knj.lcf
M328_MAP := $(BUILD_DIR)/rel/d/a/npc/d_a_npc_knj.map

M328_CPP_FILES := \
	rel/executor.cpp \
	rel/global_destructor_chain.cpp \
	rel/d/a/npc/d_a_npc_knj/d_a_npc_knj.cpp \

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

M328_LIBS := \

M328_CFLAGS := \
	-sdata 0 \
	-sdata2 0 \

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

$(M328_TARGET): $(M328_O_FILES) $(M328_LIBS)
	@echo [328] creating $(M328_TARGET)
	@echo $(M328_LIBS) $(M328_O_FILES) > build/M328_ofiles
	@python3 tools/lcf.py rel 328 --output $(M328_LDSCRIPT)
	@$(LD) -opt_partial -strip_partial $(M328_LDFLAGS) -o $(M328_TARGET) @build/M328_ofiles

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


