07daac09849a34a40d4a7b07f47f14309cb2b059
[vpp.git] / build-data / packages / external.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 external_source = build
15
16 ifneq (,$(findstring debug,$(TAG)))
17         DPDK_DEBUG=y
18 else
19         DPDK_DEBUG=n
20 endif
21
22 DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
23         DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
24         DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
25         DPDK_DEBUG=$(DPDK_DEBUG)
26
27 DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
28 ifneq ($(DPDK_MLX5_PMD),)
29 DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
30 endif
31
32 DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd))
33 ifneq ($(DPDK_MLX4_PMD),)
34 DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y
35 endif
36
37 DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
38 ifneq ($(DPDK_PLATFORM_TARGET),)
39 DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
40 endif
41
42 DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
43 ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
44 DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
45 endif
46
47 external_configure = echo
48
49 external_make_args = $(DPDK_MAKE_ARGS) -C external ebuild-build
50
51 external_install =  make $(DPDK_MAKE_ARGS) -C external ebuild-install