blob: ae26e6dd24490b2e71f43abf1547ccf6d15c0024 [file] [log] [blame]
Dave Barach8d0f2f02018-03-12 09:31:36 -04001# 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 Marion7cd468a2016-12-19 23:05:39 +010014vpp_source = src
Ed Warnickecb9cada2015-12-08 15:45:58 -070015
Damjan Marionad1e1c52018-09-01 20:06:10 +020016ifneq ($(shell which cmake3),)
17CMAKE?=cmake3
18else
19CMAKE?=cmake
20endif
21
22vpp_cmake_args ?=
23vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
24vpp_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
25vpp_cmake_args += -DCMAKE_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
26vpp_cmake_args += -DDPDK_INCLUDE_DIR_HINT="$(PACKAGE_INSTALL_DIR)/../dpdk/include"
27vpp_cmake_args += -DDPDK_LIB_DIR_HINT="$(PACKAGE_INSTALL_DIR)/../dpdk/lib"
28
29# Use devtoolset on centos 7
30ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
31vpp_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
32endif
33
Damjan Marion612dd6a2018-07-30 12:45:07 +020034vpp_configure_depend += dpdk-install
35vpp_configure = \
36 cd $(PACKAGE_BUILD_DIR) && \
Damjan Marionad1e1c52018-09-01 20:06:10 +020037 $(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))
Damjan Marion612dd6a2018-07-30 12:45:07 +020038#vpp_make_args = --no-print-directory
Damjan Marionad1e1c52018-09-01 20:06:10 +020039vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR)
40vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path'