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>
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
YACCFLAGS = -d -t -v
-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa
+SUBDIRS=lib ip tc bridge misc netem genl man
+ifeq ($(HAVE_MNL),y)
+SUBDIRS += tipc devlink rdma dcb vdpa
+endif
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
LDLIBS += $(LIBNETLINK)
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
DCBOBJ = dcb.o \
dcb_app.o \
dcb_buffer.o \
TARGETS += dcb
LDLIBS += -lm
-endif
-
all: $(TARGETS) $(LIBS)
dcb: $(DCBOBJ) $(LIBNETLINK)
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
DEVLINKOBJ = devlink.o mnlg.o
TARGETS += devlink
LDLIBS += -lm
-endif
-
all: $(TARGETS) $(LIBS)
devlink: $(DEVLINKOBJ) $(LIBNETLINK)
# SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
CFLAGS += -I./include/uapi/
RDMA_OBJ = rdma.o utils.o dev.o link.o res.o res-pd.o res-mr.o res-cq.o \
res-cmid.o res-qp.o sys.o stat.o stat-mr.o res-ctx.o res-srq.o
TARGETS += rdma
-endif
all: $(TARGETS) $(LIBS)
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
TIPCOBJ=bearer.o \
cmdl.o link.o \
media.o misc.o \
TARGETS += tipc
-endif
-
all: $(TARGETS) $(LIBS)
tipc: $(TIPCOBJ)
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
CFLAGS += -I./include/uapi/
VDPAOBJ = vdpa.o
TARGETS += vdpa
-endif
-
all: $(TARGETS) $(LIBS)
vdpa: $(VDPAOBJ)