summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2015-11-11 05:40:11 +0100
committerMartin Roth <martinroth@google.com>2015-12-29 18:00:28 +0100
commitc2b51085ca4aa3427ad788e9b402e0da46a0b1a6 (patch)
treed2baac711e56cab2478e2dadef27b6409f2ee6e8
parent4af365562257ebaadc6513d5c5be9eecda318e87 (diff)
downloadcoreboot-c2b51085ca4aa3427ad788e9b402e0da46a0b1a6.tar.xz
cbmem: Makefile: Add install target
Change-Id: Ib20481e43e6ca5b56c630cdc0eb7b1b01311cbb6 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: https://review.coreboot.org/12404 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--util/cbmem/Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile
index 113c690545..ef45bed041 100644
--- a/util/cbmem/Makefile
+++ b/util/cbmem/Makefile
@@ -13,11 +13,13 @@
## GNU General Public License for more details.
##
-PROGRAM = cbmem
-ROOT = ../../src
-CC ?= $(CROSS_COMPILE)gcc
-CFLAGS ?= -O2
-CFLAGS += -Wall -Werror
+PROGRAM = cbmem
+ROOT = ../../src
+CC ?= $(CROSS_COMPILE)gcc
+INSTALL ?= /usr/bin/install
+PREFIX ?= /usr/local
+CFLAGS ?= -O2
+CFLAGS += -Wall -Werror
CPPFLAGS += -I $(ROOT)/commonlib/include
OBJS = $(PROGRAM).o
@@ -29,6 +31,10 @@ $(PROGRAM): $(OBJS)
clean:
rm -f $(PROGRAM) *.o *~ junit.xml
+install: $(PROGRAM)
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/sbin/
+ $(INSTALL) cbmem $(DESTDIR)$(PREFIX)/sbin/
+
distclean: clean
rm -f .dependencies