92eb6315eae61c026a0d43e495e9e93f313236e0
[vpp.git] / build-data / packages / dpdk.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 ifneq (,$(findstring debug,$(TAG)))
15         DPDK_DEBUG=y
16 else
17         DPDK_DEBUG=n
18 endif
19
20 DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
21         DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
22         DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
23         DPDK_DEBUG=$(DPDK_DEBUG)
24
25 DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
26 ifneq ($(DPDK_MLX5_PMD),)
27 DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
28 endif
29
30 DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
31 ifneq ($(DPDK_PLATFORM_TARGET),)
32 DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
33 endif
34
35 DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
36 ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
37 DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
38 endif
39
40 dpdk_configure = echo
41
42 dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build
43
44 dpdk_install =  make $(DPDK_MAKE_ARGS) ebuild-install