blob: a9df1fcb336ff3f563c33e1c4db68d9d44b00295 [file] [log] [blame]
Mohsin Kazmi24195082018-09-13 09:59:50 +02001# Copyright (c) 2017-2018 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 Marioncc4a5e82018-07-30 16:10:14 +020014japi_configure_depend = vpp-install
15japi_source = extras
16japi_configure_subdir = japi
Damjan Marioncc4a5e82018-07-30 16:10:14 +020017
Mohsin Kazmi24195082018-09-13 09:59:50 +020018ifneq ($(shell which cmake3),)
19CMAKE?=cmake3
20else
21CMAKE?=cmake
22endif
23
24japi_cmake_args ?=
25japi_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
26japi_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
27japi_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
28japi_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
29ifeq ("$(V)","1")
30japi_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
31endif
32
33#Use devtoolset on centos 7
34ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
35japi_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
36endif
37
38japi_configure = \
39 cd $(PACKAGE_BUILD_DIR) && \
40 $(CMAKE) -G Ninja $(japi_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)
41
42japi_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
43
44japi_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install