+[ -f "$testpmd" ] && build=$(dirname $(dirname $testpmd))
+[ -f "$testpmd" ] || testpmd=$build/app/dpdk-testpmd
+[ -f "$testpmd" ] || testpmd=$build/app/testpmd
+if [ ! -f "$testpmd" ] ; then
+ echo 'ERROR: testpmd cannot be found' >&2
+ exit 1
+fi
+
+if ldd $testpmd | grep -q librte_ ; then
+ export LD_LIBRARY_PATH=$build/drivers:$build/lib:$LD_LIBRARY_PATH
+ libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
+else
+ libs=