[dpdk-dev] [RFC-PATCH 1/2] gen-build-mk: add "make install" option to build dir

Bruce Richardson bruce.richardson at intel.com
Tue Oct 27 15:25:05 CET 2015


Add in a "make install" command to the makefile for a DPDK build
directory. Once inside the directory, make and make install will
behave as normal for opensource packages, compiling and installing
in the filesystem the DPDK code.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 scripts/gen-build-mk.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/gen-build-mk.sh b/scripts/gen-build-mk.sh
index 5c12813..2387cf6 100755
--- a/scripts/gen-build-mk.sh
+++ b/scripts/gen-build-mk.sh
@@ -36,6 +36,9 @@
 #   $1: path of project src root
 #   $2: path of build dir (can be relative to $1)
 
+if [ -z "$RTE_PREFIX" ] ; then
+	RTE_PREFIX=/usr/local
+fi
 echo "# Automatically generated by gen-build-mk.sh"
 echo
 echo "ifdef O"
@@ -46,8 +49,18 @@ echo "endif"
 echo
 echo "MAKEFLAGS += --no-print-directory"
 echo
+echo "INSTALL = install -v"
+echo
 echo "all:"
 echo "	@\$(MAKE) -C $1 O=$2"
 echo
+echo "install:"
+echo "	@\$(INSTALL) -d $RTE_PREFIX/lib/dpdk $RTE_PREFIX/include/dpdk"
+echo "	@\$(INSTALL) -d $RTE_PREFIX/include/dpdk/exec-env $RTE_PREFIX/include/dpdk/generic"
+echo "	@\$(INSTALL) lib/* $RTE_PREFIX/lib/dpdk"
+echo "	@\$(INSTALL) include/*.h $RTE_PREFIX/include/dpdk"
+echo "	@\$(INSTALL) include/exec-env/*.h $RTE_PREFIX/include/dpdk/exec-env"
+echo "	@\$(INSTALL) include/generic/*.h $RTE_PREFIX/include/dpdk/generic"
+echo
 echo "%::"
 echo "	@\$(MAKE) -C $1 O=$2 \$@"
-- 
2.4.3



More information about the dev mailing list