# See the License for the specific language governing permissions and
# limitations under the License.
+RDMA_CORE_DEBUG?=n
+
rdma-core_version := 23
rdma-core_tarball := rdma-core-$(rdma-core_version).tar.gz
rdma-core_tarball_md5sum_22.1 := dde4d30e3db20893408ae51041117034
rdma-core_tarball_strip_dirs := 1
rdma-core_url := http://github.com/linux-rdma/rdma-core/releases/download/v$(rdma-core_version)/$(rdma-core_tarball)
+RDMA_BUILD_TYPE:=Release
+ifeq ($(RDMA_CORE_DEBUG),y)
+RDMA_BUILD_TYPE:=Debug
+endif
+
RDMA_FILES := include/infiniband/verbs.h \
include/infiniband/verbs_api.h \
include/infiniband/ib_user_ioctl_verbs.h \
define rdma-core_config_cmds
cd $(rdma-core_build_dir) && \
- cmake -G Ninja $(rdma-core_src_dir) \
+ $(CMAKE) -G Ninja $(rdma-core_src_dir) \
-DENABLE_STATIC=1 -DENABLE_RESOLVE_NEIGH=0 -DNO_PYVERBS=1 -DENABLE_VALGRIND=0 \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_C_FLAGS=-fPIC > $(rdma-core_config_log)
+ -DCMAKE_BUILD_TYPE=$(RDMA_BUILD_TYPE) \
+ -DCMAKE_C_FLAGS='-fPIC -fvisibility=hidden' > $(rdma-core_config_log)
endef
define rdma-core_build_cmds
- cmake --build $(rdma-core_build_dir) -- libibverbs.a libmlx5.a > $(rdma-core_build_log)
+ $(CMAKE) --build $(rdma-core_build_dir) -- libibverbs.a libmlx5.a > $(rdma-core_build_log)
endef
define rdma-core_install_cmds