Add support for native vpp_lite (non-dpdk) platform

Change-Id: Icaa71957f67b923bc9795baa78c7495055615672
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/build-data/packages/vlib.mk b/build-data/packages/vlib.mk
index 11bb1c7..8b72b60 100644
--- a/build-data/packages/vlib.mk
+++ b/build-data/packages/vlib.mk
@@ -1,6 +1,11 @@
-vlib_configure_depend = vppinfra-install dpdk-install
+vlib_configure_depend = vppinfra-install
 
+vlib_CPPFLAGS = $(call installed_includes_fn, vppinfra)
+vlib_LDFLAGS = $(call installed_libs_fn, vppinfra)
+
+ifeq ($($(PLATFORM)_uses_dpdk),yes)
+vlib_configure_depend += dpdk-install
 vlib_configure_args += --with-dpdk
-
-vlib_CPPFLAGS = $(call installed_includes_fn, vppinfra dpdk)
-vlib_LDFLAGS = $(call installed_libs_fn, vppinfra dpdk)
+vlib_CPPFLAGS += $(call installed_includes_fn, dpdk)
+vlib_LDFLAGS += $(call installed_libs_fn, dpdk)
+endif
diff --git a/build-data/packages/vnet.mk b/build-data/packages/vnet.mk
index 4aa2961..ca3523c 100644
--- a/build-data/packages/vnet.mk
+++ b/build-data/packages/vnet.mk
@@ -1,13 +1,11 @@
 vnet_configure_depend = 			\
     vppinfra-install 				\
-    dpdk-install				\
     svm-install					\
     vlib-api-install 				\
     vlib-install 
 
 vnet_CPPFLAGS = $(call installed_includes_fn, 	\
     vppinfra 					\
-    dpdk 					\
     openssl					\
     svm						\
     vlib 					\
@@ -15,7 +13,6 @@
 
 vnet_LDFLAGS = $(call installed_libs_fn, 	\
     vppinfra					\
-    dpdk					\
     openssl					\
     svm						\
     vlib					\
@@ -24,3 +21,8 @@
 # Platform dependent configure flags
 vnet_configure_args += $(vnet_configure_args_$(PLATFORM))
 
+ifeq ($($(PLATFORM)_uses_dpdk),yes)
+vnet_configure_depend += dpdk-install
+vnet_CPPFLAGS += $(call installed_includes_fn, dpdk)
+vnet_LDFLAGS += $(call installed_libs_fn, dpdk)
+endif
diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk
index 02aca4e..54aa548 100644
--- a/build-data/packages/vpp.mk
+++ b/build-data/packages/vpp.mk
@@ -1,6 +1,5 @@
 vpp_configure_depend =				\
 	vppinfra-install			\
-	dpdk-install				\
 	svm-install				\
 	vlib-api-install			\
 	vlib-install				\
@@ -15,7 +14,6 @@
 
 vpp_CPPFLAGS = $(call installed_includes_fn,	\
 	vppinfra				\
-	dpdk					\
         openssl					\
 	svm					\
 	vlib					\
@@ -24,9 +22,14 @@
 
 vpp_LDFLAGS = $(call installed_libs_fn,		\
 	vppinfra				\
-	dpdk					\
 	openssl					\
 	svm					\
 	vlib					\
 	vlib-api				\
 	vnet)
+
+ifeq ($($(PLATFORM)_uses_dpdk),yes)
+vpp_configure_depend += dpdk-install
+vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)
+vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
+endif
diff --git a/build-data/platforms/virl.mk b/build-data/platforms/virl.mk
index 40f7941..29b47da 100644
--- a/build-data/platforms/virl.mk
+++ b/build-data/platforms/virl.mk
@@ -15,6 +15,8 @@
 virl_arch = native
 virl_native_tools = vppapigen
 
+virl_uses_dpdk = yes
+
 virl_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \
 	vpp-japi 
 
diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
index 555147d..6b1ba82 100644
--- a/build-data/platforms/vpp.mk
+++ b/build-data/platforms/vpp.mk
@@ -15,6 +15,8 @@
 vpp_arch = native
 vpp_native_tools = vppapigen
 
+vpp_uses_dpdk = yes
+
 vpp_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \
 	vpp-japi gmod
 
diff --git a/build-data/platforms/vpp_lite.mk b/build-data/platforms/vpp_lite.mk
new file mode 100644
index 0000000..9376aa3
--- /dev/null
+++ b/build-data/platforms/vpp_lite.mk
@@ -0,0 +1,36 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# vector packet processor
+vpp_lite_arch = native
+vpp_lite_native_tools = vppapigen
+
+vpp_lite_uses_dpdk = no
+
+vpp_lite_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
+	vpp-japi gmod
+
+vlib_configure_args_vpp_lite = --with-pre-data=128
+
+vnet_configure_args_vpp_lite = --without-vcgn
+vpp_configure_args_vpp_lite = --without-vcgn
+
+vpp_lite_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
+	-fstack-protector-all -fPIC -Werror
+vpp_lite_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
+	-fstack-protector-all -fPIC -Werror
+
+vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
+	-fstack-protector -fPIC -Werror
+vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
+	-fstack-protector -fPIC -Werror