summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYogesh Tillu <yogesh.tillu@linaro.org>2015-08-12 17:48:12 +0530
committerYogesh Tillu <yogesh.tillu@linaro.org>2015-08-12 18:10:43 +0530
commitac33c465b101e11a6f9c0bdadf59b91500de9ef1 (patch)
treed6a5c04d9800a9a46163e12fd8ee1d756bb1c900
parentc40a41e0ea3d6bd3fbad8eecc89aece011e71f09 (diff)
Makefile: add a install rule
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Yogesh Tillu <yogesh.tillu@linaro.org>
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 90df544..5fda546 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@
CFLAGS ?= -O3
CC = $(CROSS_COMPILE)gcc
+INSTALL = /usr/bin/install
+
+prefix = /usr/local/bin
file_list = \
perf_rc_mmap \
@@ -12,6 +15,10 @@ file_list = \
all: $(file_list)
+install: all
+ $(INSTALL) -d $(prefix)
+ $(INSTALL) -m755 $(file_list) $(prefix)
+
%: %.c
$(CC) $(CFLAGS) $< -o $@