Update STC scripts to build stratum_bmv2 with PI dynamic linking

Change-Id: I7c32505e54377510b130340c848a7fc50eb95c0c
diff --git a/tools/dev/p4vm/install-p4-tools.sh b/tools/dev/p4vm/install-p4-tools.sh
index a4abd16..4bc4e04 100755
--- a/tools/dev/p4vm/install-p4-tools.sh
+++ b/tools/dev/p4vm/install-p4-tools.sh
@@ -42,6 +42,7 @@
 # Remove build artifacts
 CLEAN_UP=${CLEAN_UP:-false}
 BMV2_INSTALL=/usr/local
+PI_INSTALL=/usr/local
 set +x
 
 function do_requirements {
@@ -218,10 +219,10 @@
 
     ./autogen.sh
     if [[ "${USE_STRATUM}" = false ]] ; then
-        ./configure --with-proto --without-internal-rpc --without-cli
+        ./configure --with-proto --without-internal-rpc --without-cli --prefix=${PI_INSTALL}
     else
         # Configure for Stratum
-        ./configure --without-bmv2 --without-proto --without-fe-cpp --without-cli --without-internal-rpc --prefix=${BMV2_INSTALL}
+        ./configure --without-bmv2 --with-proto --with-fe-cpp --without-cli --without-internal-rpc --prefix=${PI_INSTALL}
     fi
     make -j${NUM_CORES}
     sudo make install
@@ -245,7 +246,7 @@
     fi
     if [[ "${USE_STRATUM}" = true ]] ; then
         confOpts="--prefix=${BMV2_INSTALL} --without-thrift ${confOpts}"
-        cppFlags="${cppFlags} -isystem${BMV2_INSTALL}/include"
+        cppFlags="${cppFlags} -isystem${BMV2_INSTALL}/include -isystem${PI_INSTALL}/include -L${PI_INSTALL}/lib"
     fi
     confCmd="./configure CPPFLAGS=\"${cppFlags}\" ${confOpts}"
     eval ${confCmd}
diff --git a/tools/test/bin/stratum-stc-cell-side b/tools/test/bin/stratum-stc-cell-side
index 4cdd8a6..e5564b1 100755
--- a/tools/test/bin/stratum-stc-cell-side
+++ b/tools/test/bin/stratum-stc-cell-side
@@ -17,9 +17,10 @@
 tar xf /tmp/stratum-sources.tar
 cd stratum
 export BMV2_INSTALL=/usr/local
+export PI_INSTALL=/usr/local
 
 # build stratum
-bazel build //stratum/hal/bin/bmv2:stratum_bmv2
+bazel build --curses=no --color=no //stratum/hal/bin/bmv2:stratum_bmv2
 
 # deploy stratum binaries to where mininet will look for them
 mkdir -p /home/sdn/stratum/bazel-bin/stratum/hal/bin/bmv2