iproute2/testsuite/tools/Makefile
gaoxingwang c0a06885b9 testsuite: fix testsuite build failure when iproute build without libcap-devel
iproute allows to build without libcap.The testsuite will fail to
compile when libcap dose not exists.It was required in 6d68d7f85d.

Fixes: 6d68d7f85d ("testsuite: fix build failure")
Signed-off-by: gaoxingwang <gaoxingwang1@huawei.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-02-17 17:40:42 -08:00

14 lines
385 B
Makefile

# SPDX-License-Identifier: GPL-2.0
CFLAGS=
LDLIBS=
include ../../config.mk
ifeq ($(HAVE_CAP),y)
LDLIBS+= -lcap
endif
generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.a ../../lib/libutil.a
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl $(LDLIBS)
clean:
rm -f generate_nlmsg