diff mbox

[3/3] dpdk: make use of variable --with-external-sysroot

Message ID 1406213816-22711-4-git-send-email-anders.roxell@linaro.org
State New
Headers show

Commit Message

Anders Roxell July 24, 2014, 2:56 p.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 platform/linux-dpdk/Makefile.am | 12 +++++++++++-
 platform/linux-dpdk/README      |  5 +++--
 2 files changed, 14 insertions(+), 3 deletions(-)

Comments

Maxim Uvarov July 24, 2014, 3:45 p.m. UTC | #1
On 07/24/2014 06:56 PM, Anders Roxell wrote:
> +$ sudo ./configure --with-platform=linux-dpdk --with-external-sysroot=<dpdk-install-path>
Name 'external-sysroot' looks very strange. If it's dpdk install patch 
than it's reasonable to name it so.
To name it the same for all platforms I think we should peek some more 
readable name.

How about
--with-platform-builddir= ?

regards,
Maxim.
Anders Roxell July 24, 2014, 8:05 p.m. UTC | #2
On 2014-07-24 19:45, Maxim Uvarov wrote:
> On 07/24/2014 06:56 PM, Anders Roxell wrote:
> >+$ sudo ./configure --with-platform=linux-dpdk --with-external-sysroot=<dpdk-install-path>
> Name 'external-sysroot' looks very strange. If it's dpdk install
> patch than it's reasonable to name it so.
> To name it the same for all platforms I think we should peek some
> more readable name.
> 
> How about
> --with-platform-builddir= ?

I don't like that, I got a suggestion from Mike when I spoke with him in
a HO... --with-sysroot-path= what do everyone thing about that?

Cheers,
Anders

> 
> regards,
> Maxim.
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index b80bf14..7e0e2e0 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -8,7 +8,17 @@  nodist_pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc
 
 .PHONY: pkgconfig/libodp.pc
 
-PLAT_CFLAGS = -msse4.2
+PLAT_CFLAGS  = -msse4.2
+if EXTERNAL_SYSROOT_
+PLAT_CFLAGS += -include $(EXTERNAL_SYSROOT)/include/rte_config.h
+PLAT_CFLAGS += -I$(EXTERNAL_SYSROOT)/include
+PLAT_CFLAGS += -I$(EXTERNAL_SYSROOT)/include/arch
+PLAT_CFLAGS += -I$(EXTERNAL_SYSROOT)/include/exec-env
+
+AM_LDFLAGS  += -L$(EXTERNAL_SYSROOT)/lib
+else
+PLAT_CFLAGS += -include rte_config.h
+endif
 
 AM_CFLAGS +=  $(PLAT_CFLAGS)
 AM_CFLAGS +=  -I$(srcdir)/include
diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
index 04a49d9..0a1f141 100644
--- a/platform/linux-dpdk/README
+++ b/platform/linux-dpdk/README
@@ -19,9 +19,10 @@  $ git checkout -b 1.6.0 tags/v1.6.0r2
 # To compile ODP with linux-dpdk
 $ cd <odp-dir>
 $ sudo ./bootstrap
-$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L<dpdk-build-dir>/lib CFLAGS="-include <dpdk-build-dir>/include/rte_config.h -I<dpdk-build-dir>/include -I<dpdk-build-dir>/include/arch -I<dpdk-build-dir>/include/exec-env"
+$ sudo ./configure --with-platform=linux-dpdk --with-external-sysroot=<dpdk-install-path>
 # For example
-$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L/root/dpdk/build/lib CFLAGS="-include /root/dpdk/build/include/rte_config.h -I/root/dpdk/build/include -I/root/dpdk/build/include/arch -I/root/dpdk/build/include/exec-env"
+$ sudo ./configure --with-platform=linux-dpdk --with-external-sysroot=/root/dpdk/build
+# if dpdk is installed to the default path then you don't need to specify --with-external-sysroot=<dpdk-install-path> when you run configure.
 $ sudo make clean
 $ sudo make