]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc, ip: more Makefile updates for LIBMNL
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 9 Aug 2017 15:38:51 +0000 (08:38 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 9 Aug 2017 15:38:51 +0000 (08:38 -0700)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/Makefile
tc/Makefile

index 8424b1f6e7c061fdfd5e916f8a8832d08a8985b7..572604d5f200ad0160caf7e1254bce27e579b4d5 100644 (file)
@@ -19,6 +19,11 @@ ifeq ($(IP_CONFIG_SETNS),y)
        CFLAGS += -DHAVE_SETNS
 endif
 
+ifeq ($(HAVE_MNL),y)
+       CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags)
+       LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
+endif
+
 ALLOBJ=$(IPOBJ) $(RTMONOBJ)
 SCRIPTS=ifcfg rtpr routel routef
 TARGETS=ip rtmon
index 678b302929e703a0e38ce1e2671537bc78aa5842..c364a053ecef268ce9a5d401ae077ec1dbd69994 100644 (file)
@@ -102,6 +102,11 @@ endif
 TCOBJ += $(TCMODULES)
 LDLIBS += -L. -lm
 
+ifeq ($(HAVE_MNL),y)
+       CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags)
+       LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
+endif
+
 ifeq ($(SHARED_LIBS),y)
 LDLIBS += -ldl
 LDFLAGS += -Wl,-export-dynamic