aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e31e63b..f53225d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
.POSIX:
+PREFIX=/usr/local
+BINDIR=$(PREFIX)/bin
BACKEND=qbe
objdir=.
@@ -84,6 +86,11 @@ bootstrap: stage2 stage3
check: all
@CCQBE=./cproc-qbe ./runtests
+.PHONY: install
+install: all
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp $(objdir)/cproc $(objdir)/cproc-qbe $(DESTDIR)$(BINDIR)
+
.PHONY: qbe
qbe:
git submodule update --init qbe