Dave Barach | 8d0f2f0 | 2018-03-12 09:31:36 -0400 | [diff] [blame] | 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 | |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 14 | vpp_source = src |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame^] | 15 | ifneq ($(vpp_uses_cmake),yes) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 16 | |
Damjan Marion | 28e3db9 | 2016-04-01 12:35:17 +0200 | [diff] [blame] | 17 | ifeq ($($(PLATFORM)_dpdk_shared_lib),yes) |
| 18 | vpp_configure_args = --enable-dpdk-shared |
| 19 | else |
| 20 | vpp_configure_args = |
| 21 | endif |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 22 | |
| 23 | # Platform dependent configure flags |
| 24 | vpp_configure_args += $(vpp_configure_args_$(PLATFORM)) |
| 25 | |
| 26 | |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 27 | vpp_CPPFLAGS = |
| 28 | vpp_LDFLAGS = |
Christophe Fontaine | fef15b4 | 2016-04-09 12:38:49 +0900 | [diff] [blame] | 29 | |
Damjan Marion | 802c7fa | 2016-02-27 00:12:55 +0100 | [diff] [blame] | 30 | ifneq ($($(PLATFORM)_uses_dpdk),no) |
Damjan Marion | 28e3db9 | 2016-04-01 12:35:17 +0200 | [diff] [blame] | 31 | ifeq ($($(PLATFORM)_uses_external_dpdk),yes) |
| 32 | vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir) |
| 33 | vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir) |
| 34 | else |
Damjan Marion | e936bbe | 2016-02-25 23:17:38 +0100 | [diff] [blame] | 35 | vpp_configure_depend += dpdk-install |
Damjan Marion | 2ce7f98 | 2017-01-09 20:24:50 +0100 | [diff] [blame] | 36 | vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk |
Damjan Marion | e936bbe | 2016-02-25 23:17:38 +0100 | [diff] [blame] | 37 | vpp_LDFLAGS += $(call installed_libs_fn, dpdk) |
Damjan Marion | 2ce7f98 | 2017-01-09 20:24:50 +0100 | [diff] [blame] | 38 | vpp_CPPFLAGS += -I/usr/include/dpdk |
Damjan Marion | e936bbe | 2016-02-25 23:17:38 +0100 | [diff] [blame] | 39 | endif |
Damjan Marion | 696f1ad | 2016-12-23 22:42:41 +0100 | [diff] [blame] | 40 | ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes) |
| 41 | vpp_configure_args += --with-dpdk-mlx5-pmd |
| 42 | endif |
Rui Cai | 60bd302 | 2018-05-11 21:52:22 +0000 | [diff] [blame] | 43 | ifeq ($($(PLATFORM)_uses_dpdk_mlx4_pmd),yes) |
| 44 | vpp_configure_args += --with-dpdk-mlx4-pmd |
| 45 | endif |
Marco Varlese | edfa2fd | 2017-09-01 14:47:53 +0200 | [diff] [blame] | 46 | else |
| 47 | vpp_configure_args += --disable-dpdk-plugin |
Damjan Marion | 28e3db9 | 2016-04-01 12:35:17 +0200 | [diff] [blame] | 48 | endif |
Filip Tehlar | 816f437 | 2017-04-26 16:09:06 +0200 | [diff] [blame] | 49 | |
| 50 | ifeq ($($(PLATFORM)_enable_tests),yes) |
| 51 | vpp_configure_args += --enable-tests |
| 52 | endif |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame^] | 53 | |
| 54 | else |
| 55 | vpp_configure_depend += dpdk-install |
| 56 | vpp_configure = \ |
| 57 | cd $(PACKAGE_BUILD_DIR) && \ |
| 58 | cmake -G Ninja \ |
| 59 | -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR) \ |
| 60 | -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)" \ |
| 61 | -DDPDK_INCLUDE_DIR_HINT="$(PACKAGE_INSTALL_DIR)/../dpdk/include" \ |
| 62 | -DDPDK_LIB_DIR_HINT="$(PACKAGE_INSTALL_DIR)/../dpdk/lib" \ |
| 63 | $(call find_source_fn,$(PACKAGE_SOURCE)) |
| 64 | #vpp_make_args = --no-print-directory |
| 65 | vpp_build = cmake --build $(PACKAGE_BUILD_DIR) |
| 66 | vpp_install = cmake --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path' |
| 67 | endif |