5dfb785af62b7576a8fef7b74d8f317519b53a88
[vpp.git] / build / external / packages / rdma-core.mk
1 # Copyright (c) 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
14 RDMA_CORE_DEBUG?=n
15
16 rdma-core_version             := 43.0
17 rdma-core_tarball             := rdma-core-$(rdma-core_version).tar.gz
18 rdma-core_tarball_md5sum_39.1 := 63ba4632fd01173a2331e5b990373330
19 rdma-core_tarball_md5sum_41.0 := 2250389cb61a7130133e6411fdeef2f9
20 rdma-core_tarball_md5sum_43.0 := 3785fd2b35cd41043ab53226fc112d41
21 rdma-core_tarball_md5sum      := $(rdma-core_tarball_md5sum_$(rdma-core_version))
22 rdma-core_tarball_strip_dirs  := 1
23 rdma-core_url                 := http://github.com/linux-rdma/rdma-core/releases/download/v$(rdma-core_version)/$(rdma-core_tarball)
24
25 RDMA_BUILD_TYPE:=RelWithDebInfo
26 ifeq ($(RDMA_CORE_DEBUG),y)
27 RDMA_BUILD_TYPE:=Debug
28 endif
29
30 define  rdma-core_config_cmds
31         cd $(rdma-core_build_dir) && \
32           $(CMAKE) -G Ninja $(rdma-core_src_dir) \
33             -DENABLE_STATIC=1 -DENABLE_RESOLVE_NEIGH=0 -DNO_PYVERBS=1 -DENABLE_VALGRIND=0\
34             -DCMAKE_BUILD_TYPE=$(RDMA_BUILD_TYPE) -DCMAKE_INSTALL_PREFIX=$(rdma-core_install_dir) \
35             -DCMAKE_INSTALL_LIBDIR=lib \
36             -DCMAKE_INSTALL_RUNDIR:PATH=/run \
37             -DCMAKE_C_FLAGS='-fPIC' -DNO_MAN_PAGES=ON | tee $(rdma-core_config_log)
38 endef
39
40 define  rdma-core_build_cmds
41         $(CMAKE) --build $(rdma-core_build_dir) | tee $(rdma-core_build_log)
42 endef
43
44 define  rdma-core_install_cmds
45         $(CMAKE) --install $(rdma-core_build_dir) | tee $(rdma-core_install_log)
46 endef
47
48 $(eval $(call package,rdma-core))