@@ -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 SYSROOT_PATH_
+PLAT_CFLAGS += -include $(SYSROOT_PATH)/include/rte_config.h
+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include
+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/arch
+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/exec-env
+
+AM_LDFLAGS += -L$(SYSROOT_PATH)/lib
+else
+PLAT_CFLAGS += -include rte_config.h
+endif
AM_CFLAGS += $(PLAT_CFLAGS)
AM_CFLAGS += -I$(srcdir)/include
@@ -18,12 +18,13 @@ $ 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"
+$ ./bootstrap
+$ ./configure --with-platform=linux-dpdk --with-sysroot-path=<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 make clean
-$ sudo make
+$ ./configure --with-platform=linux-dpdk --with-sysroot-path=/root/dpdk/build
+# if dpdk is installed to the default path then you don't need to specify --with-sysroot-path=<dpdk-install-path> when you run configure.
+$ make clean
+$ make
# Commands to test
l2fwding app - sudo ./test/l2fwd/odp_l2fwd -i 0,1 -m 0 -c 2
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- platform/linux-dpdk/Makefile.am | 12 +++++++++++- platform/linux-dpdk/README | 11 ++++++----- 2 files changed, 17 insertions(+), 6 deletions(-)