]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Makefile: move HAVE_MNL check to top-level Makefile
authorAndrea Claudi <aclaudi@redhat.com>
Wed, 9 Mar 2022 17:03:26 +0000 (18:03 +0100)
committerDavid Ahern <dsahern@kernel.org>
Sat, 12 Mar 2022 16:00:56 +0000 (09:00 -0700)
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>
Makefile
dcb/Makefile
devlink/Makefile
rdma/Makefile
tipc/Makefile
vdpa/Makefile

index f6214534c0ef5f9da773dec5ab6912c3ae2cecea..8a17d61492e7b2502fa5493f350529139d49fbca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,10 @@ WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
 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)
index 3a2e5d4c4c0da2ae44625364ea2f2b76c1de2703..ca65d4670c8097ec71dcd6790cc2a0c9cc235fae 100644 (file)
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 include ../config.mk
 
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
 DCBOBJ = dcb.o \
          dcb_app.o \
          dcb_buffer.o \
@@ -15,8 +11,6 @@ DCBOBJ = dcb.o \
 TARGETS += dcb
 LDLIBS += -lm
 
-endif
-
 all: $(TARGETS) $(LIBS)
 
 dcb: $(DCBOBJ) $(LIBNETLINK)
index d37a4b4d024103f5dfd5a488e6066307696f2c96..1a1eed7ef6e440b4f3653596d062ed3e3e3b91dd 100644 (file)
@@ -1,16 +1,10 @@
 # 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)
index 9154efeb2f312f93f6017ffa5532dacad7c0b062..37d904a7eda9442055dbd393707d7d171f85136f 100644 (file)
@@ -1,16 +1,12 @@
 # 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)
 
index a10debe08c619756266cd2ba9e3794b043a60b11..4f0aba7ed13fdb31e157efaa6c1060652df0e3dd 100644 (file)
@@ -1,10 +1,6 @@
 # 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 \
@@ -14,8 +10,6 @@ TIPCOBJ=bearer.o \
 
 TARGETS += tipc
 
-endif
-
 all: $(TARGETS) $(LIBS)
 
 tipc: $(TIPCOBJ)
index 253e20a7d8456ed90267a713bb854e0a266e8820..86f7221e67de718e09f10bb9e0830827fc999395 100644 (file)
@@ -1,16 +1,10 @@
 # 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)