#
# Generated By: dol2asm
#

LIBAR_A_CPP_FILES := \
	libs/dolphin/ar/ar.c \
	libs/dolphin/ar/arq.c \

LIBAR_A_O_FILES := \
	$(BUILD_DIR)/libs/dolphin/ar/ar.o \
	$(BUILD_DIR)/libs/dolphin/ar/arq.o \

LIBAR_A_CFLAGS := \
	-Cpp_exceptions off \
	-proc gekko \
	-fp hard \
	-nodefaults \
	-str reuse \
	-inline auto \
	-RTTI off \
	-maxerrors 5 \
	-enum int $(INCLUDES) \
	-O4,p \
	-lang=c \

LIBAR_A_LDFLAGS := \
	-nodefaults \
	-fp hard \
	-proc gekko \
	-linkmode moreram \

$(BUILD_DIR)/libar.a: $(LIBAR_A_O_FILES)
	@echo linking... $(BUILD_DIR)/libar.a
	@echo $(LIBAR_A_O_FILES) > build/LIBAR_A_ofiles
	@$(LD) -xm l $(LIBAR_A_LDFLAGS) -o $(BUILD_DIR)/libar.a @build/LIBAR_A_ofiles

$(BUILD_DIR)/libs/dolphin/ar/%.o: libs/dolphin/ar/%.c $(BUILD_DIR)/libs/dolphin/ar/%.d
	@mkdir -p $(@D)
	@echo building... $<
	@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).c
	@$(DOLPHIN_LIB_CC) $(LIBAR_A_CFLAGS) $(DEPFLAGS) -c -o $(dir $@) $(basename $@).c
	@if [ -z '$(DISABLE_DEPS)' ]; then tools/transform-dep.py '$(basename $@).d' '$(basename $@).d'; touch -c $@; fi

ifndef DISABLE_DEPS
LIBAR_A_D_FILES := $(LIBAR_A_O_FILES:.o=.d)
$(LIBAR_A_D_FILES):
include $(wildcard $(LIBAR_A_D_FILES))
endif

