dcb, devlink, rdma, tipc and vdpa rely on libmnl to compile, so they check for libmnl to be installed on their Makefiles. This moves HAVE_MNL check from the tools to top-level Makefile, thus avoiding to call their Makefiles if libmnl is not present. Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
20 lines
365 B
Makefile
20 lines
365 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
include ../config.mk
|
|
|
|
DEVLINKOBJ = devlink.o mnlg.o
|
|
TARGETS += devlink
|
|
LDLIBS += -lm
|
|
|
|
all: $(TARGETS) $(LIBS)
|
|
|
|
devlink: $(DEVLINKOBJ) $(LIBNETLINK)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
install: all
|
|
for i in $(TARGETS); \
|
|
do install -m 0755 $$i $(DESTDIR)$(SBINDIR); \
|
|
done
|
|
|
|
clean:
|
|
rm -f $(DEVLINKOBJ) $(TARGETS)
|