REPO_PATH = repo
PREBUILT = build/compiler-rt-$(ISA).a

ifneq ($(wildcard repo/LICENSE.TXT),)
NAME = compiler-rt
SRCS = $(shell find repo/ -name "*.c")
include $(NAVY_HOME)/Makefile
else
archive: $(PREBUILT)

$(PREBUILT):
	@if [ ! -f "$@" ]; then echo "missing prebuilt compiler-rt archive: $@"; exit 1; fi

clean:
	rm -rf build/

.PHONY: archive clean
endif
