diff --git a/Makefile b/Makefile index d35f09d9ca..1d72346fd0 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ SRC=\ src/*/*/* \ src/*/*/*/* -.PHONY: all clean fmt libc libm test +.PHONY: all clean fmt install libc libm test all: libc libm @@ -31,6 +31,15 @@ clean: fmt: ./fmt.sh +install: all + mkdir -pv "$(DESTDIR)/lib" + mkdir -pv "$(DESTDIR)/include" + cp -rv "include"/* "$(DESTDIR)/include" + cp -rv "target/include"/* "$(DESTDIR)/include" + cp -v "$(BUILD)/debug/libc.a" "$(DESTDIR)/lib" + cp -v "$(BUILD)/debug/crt0.o" "$(DESTDIR)/lib" + cp -v "$(BUILD)/openlibm/libopenlibm.a" "$(DESTDIR)/lib/libm.a" + libc: $(BUILD)/debug/libc.a $(BUILD)/debug/crt0.o libm: $(BUILD)/openlibm/libopenlibm.a