From c2b51085ca4aa3427ad788e9b402e0da46a0b1a6 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 11 Nov 2015 05:40:11 +0100 Subject: cbmem: Makefile: Add install target Change-Id: Ib20481e43e6ca5b56c630cdc0eb7b1b01311cbb6 Signed-off-by: Denis 'GNUtoo' Carikli Reviewed-on: https://review.coreboot.org/12404 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/cbmem/Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'util/cbmem') 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 -- cgit v1.2.3