summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2011-06-06 17:01:56 +0200
committerJuergen Beisert <jbe@pengutronix.de>2011-06-06 17:01:56 +0200
commit62f081828221741fb945927ae85c496c431c9f84 (patch)
tree962ab36914ba87b74ae82ae455b706d1a6c135ec
parentdd57c62797d2b8d05e224680c7bc6e3d4640dde0 (diff)
downloadmxs-utils-62f081828221741fb945927ae85c496c431c9f84.tar.gz
mxs-utils-62f081828221741fb945927ae85c496c431c9f84.tar.xz
A Makefile always should provide an 'install' stage
Providing an 'install' stage simplyfies its integration into PTXdist. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
-rw-r--r--makefile2
-rw-r--r--makefile.rules7
2 files changed, 8 insertions, 1 deletions
diff --git a/makefile b/makefile
index a98e71b..8e12bd4 100644
--- a/makefile
+++ b/makefile
@@ -27,6 +27,6 @@ endif
#*******************************************************************************
# Targets
-all clean elftosb sbtool keygen:
+all clean elftosb sbtool keygen install:
@mkdir -p ${BUILD_DIR};
make -C ${BUILD_DIR} -f ${SRC_DIR}/makefile.rules SRC_DIR=${SRC_DIR} $@;
diff --git a/makefile.rules b/makefile.rules
index 9cd649e..1d24eb7 100644
--- a/makefile.rules
+++ b/makefile.rules
@@ -101,6 +101,8 @@ OBJ_FILES_KEYGEN = \
keygen.o
+PREFIX := /usr/local
+
LIBS = -lstdc++
@@ -120,6 +122,8 @@ endif # ifeq ("${UNAMES}", "Linux")
#*******************************************************************************
# Targets
+.PHONY := all install clean
+
all: elftosb sbtool keygen
# Uncomment the next line to print out the environment variables.
@@ -176,3 +180,6 @@ keygen: ${OBJ_FILES_KEYGEN}
[ -s $@ ] || rm -f $@
#*******************************************************************************
+
+install: all
+ install -t $(DESTDIR)/$(PREFIX)/bin ${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN}