From 78c8c2171bd917dc3f27718c0cfb3d3651df2269 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 26 Mar 2018 20:13:45 -0600 Subject: [PATCH] Add install target --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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