diff mbox

[PATCHv6,3/3] dpdk: make use of variable --with-sdk-install-path

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

Commit Message

Anders Roxell July 29, 2014, 11:58 a.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(-)
diff mbox

Patch

diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index b80bf14..032882c 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 SDK_INSTALL_PATH_
+PLAT_CFLAGS += -include $(SDK_INSTALL_PATH)/include/rte_config.h
+PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include
+PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/arch
+PLAT_CFLAGS += -I$(SDK_INSTALL_PATH)/include/exec-env
+
+AM_LDFLAGS  += -L$(SDK_INSTALL_PATH)/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 5325e77..4386d59 100644
--- a/platform/linux-dpdk/README
+++ b/platform/linux-dpdk/README
@@ -24,9 +24,10 @@  $ git checkout -b 1.6.0 tags/v1.6.0r2
 # To compile ODP with linux-dpdk
 $ cd <odp-dir>
 $ ./bootstrap
-$ ./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"
+$ ./configure --with-platform=linux-dpdk --with-sdk-install-path=<dpdk-install-path>
 # For example
-$ ./configure --with-platform=linux-dpdk LDFLAGS=-L/root/dpdk/x86_64-default-linuxapp-gcc/lib CFLAGS="-include /root/dpdk/x86_64-default-linuxapp-gcc/include/rte_config.h -I/root/dpdk/x86_64-default-linuxapp-gcc/include -I/root/dpdk/x86_64-default-linuxapp-gcc/include/arch -I/root/dpdk/x86_64-default-linuxapp-gcc/include/exec-env"
+$ ./configure --with-platform=linux-dpdk --with-sdk-install-path=/root/dpdk/build
+# if dpdk is installed to the default path then you don't need to specify --with-sdk-install-path=<dpdk-install-path> when you run configure.
 $ make
 
 # Commands to test