19e32efdc2462f9f217b4a1885c7b1f0efcef4f7
[vpp.git] / build-data / packages / vpp.mk
1 # Copyright (c) 2015 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 vpp_source = src
15
16 ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
17 vpp_configure_args = --enable-dpdk-shared
18 else
19 vpp_configure_args =
20 endif
21
22 # Platform dependent configure flags
23 vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
24
25
26 vpp_CPPFLAGS =
27 vpp_LDFLAGS =
28
29 ifneq ($($(PLATFORM)_uses_dpdk),no)
30 ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
31 vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
32 vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
33 else
34 vpp_configure_depend += dpdk-install
35 vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk
36 vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
37 vpp_CPPFLAGS += -I/usr/include/dpdk
38 endif
39 ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
40 vpp_configure_args += --with-dpdk-mlx5-pmd
41 endif
42 ifeq ($($(PLATFORM)_uses_dpdk_mlx4_pmd),yes)
43 vpp_configure_args += --with-dpdk-mlx4-pmd
44 endif
45 else
46 vpp_configure_args += --disable-dpdk-plugin
47 endif
48
49 ifeq ($($(PLATFORM)_enable_tests),yes)
50 vpp_configure_args += --enable-tests
51 endif