From 25e3f85aa8dd7adf976a9a0027eee6f4f56eae30 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sat, 29 Jul 2017 03:36:05 +0300 Subject: iio: tools: add install section Allow user to call install target. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron --- tools/iio/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools/iio') diff --git a/tools/iio/Makefile b/tools/iio/Makefile index 5581c062421a..d4d956020adf 100644 --- a/tools/iio/Makefile +++ b/tools/iio/Makefile @@ -1,5 +1,7 @@ include ../scripts/Makefile.include +bindir ?= /usr/bin + ifeq ($(srctree),) srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) @@ -54,6 +56,12 @@ clean: rm -rf $(OUTPUT)include/linux/iio find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete +install: $(ALL_PROGRAMS) + install -d -m 755 $(DESTDIR)$(bindir); \ + for program in $(ALL_PROGRAMS); do \ + install $$program $(DESTDIR)$(bindir); \ + done + FORCE: -.PHONY: all clean FORCE prepare +.PHONY: all install clean FORCE prepare -- cgit