From 4a6cb83d334e391f85332ea38a2e467ac7743e4b Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Tue, 18 Sep 2018 18:41:38 +0200 Subject: rename vpp-dpdk-dev to vpp-ext-deps We need to have new tenants in the development package. This is first of series of patches which will allow us to have multiple external libs and tools packaged for developer's convenience. Change-Id: I884bd75fba96005bbf8cea92774682b2228e0e22 Signed-off-by: Damjan Marion --- build-data/packages/build.mk | 12 ++++++++++ build-data/packages/dpdk.mk | 49 --------------------------------------- build-data/packages/external.mk | 51 +++++++++++++++++++++++++++++++++++++++++ build-data/packages/vpp.mk | 8 +++++-- 4 files changed, 69 insertions(+), 51 deletions(-) create mode 100644 build-data/packages/build.mk delete mode 100644 build-data/packages/dpdk.mk create mode 100644 build-data/packages/external.mk (limited to 'build-data') diff --git a/build-data/packages/build.mk b/build-data/packages/build.mk new file mode 100644 index 00000000000..7836ce2e803 --- /dev/null +++ b/build-data/packages/build.mk @@ -0,0 +1,12 @@ +# Copyright (c) 2015 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. diff --git a/build-data/packages/dpdk.mk b/build-data/packages/dpdk.mk deleted file mode 100644 index ab2e39a804e..00000000000 --- a/build-data/packages/dpdk.mk +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2015 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. - -ifneq (,$(findstring debug,$(TAG))) - DPDK_DEBUG=y -else - DPDK_DEBUG=n -endif - -DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \ - DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \ - DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \ - DPDK_DEBUG=$(DPDK_DEBUG) - -DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd)) -ifneq ($(DPDK_MLX5_PMD),) -DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y -endif - -DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd)) -ifneq ($(DPDK_MLX4_PMD),) -DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y -endif - -DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target)) -ifneq ($(DPDK_PLATFORM_TARGET),) -DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET) -endif - -DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args)) -ifneq ($(DPDK_MAKE_EXTRA_ARGS),) -DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)" -endif - -dpdk_configure = echo - -dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build - -dpdk_install = make $(DPDK_MAKE_ARGS) ebuild-install diff --git a/build-data/packages/external.mk b/build-data/packages/external.mk new file mode 100644 index 00000000000..07daac09849 --- /dev/null +++ b/build-data/packages/external.mk @@ -0,0 +1,51 @@ +# Copyright (c) 2015 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. + +external_source = build + +ifneq (,$(findstring debug,$(TAG))) + DPDK_DEBUG=y +else + DPDK_DEBUG=n +endif + +DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \ + DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \ + DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \ + DPDK_DEBUG=$(DPDK_DEBUG) + +DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd)) +ifneq ($(DPDK_MLX5_PMD),) +DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y +endif + +DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd)) +ifneq ($(DPDK_MLX4_PMD),) +DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y +endif + +DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target)) +ifneq ($(DPDK_PLATFORM_TARGET),) +DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET) +endif + +DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args)) +ifneq ($(DPDK_MAKE_EXTRA_ARGS),) +DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)" +endif + +external_configure = echo + +external_make_args = $(DPDK_MAKE_ARGS) -C external ebuild-build + +external_install = make $(DPDK_MAKE_ARGS) -C external ebuild-install diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk index 9980c663666..185a4efc511 100644 --- a/build-data/packages/vpp.mk +++ b/build-data/packages/vpp.mk @@ -19,18 +19,22 @@ else CMAKE?=cmake endif +vpp_cmake_prefix_path = /opt/vpp/external/$(shell uname -m) +vpp_cmake_prefix_path += $(PACKAGE_INSTALL_DIR)external +vpp_cmake_prefix_path := $(subst $() $(),;,$(vpp_cmake_prefix_path)) + vpp_cmake_args ?= vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR) vpp_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)" vpp_cmake_args += -DCMAKE_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)" -vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../dpdk" +vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)" # Use devtoolset on centos 7 ifneq ($(wildcard /opt/rh/devtoolset-7/enable),) vpp_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin" endif -vpp_configure_depend += dpdk-install +vpp_configure_depend += external-install vpp_configure = \ cd $(PACKAGE_BUILD_DIR) && \ $(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE)) -- cgit 1.2.3-korg