From 6ff66acc604ec62b179a8a144c548918ff67a53b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Aug 2017 08:38:51 -0700 Subject: [PATCH] tc, ip: more Makefile updates for LIBMNL Signed-off-by: Stephen Hemminger --- ip/Makefile | 5 +++++ tc/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ip/Makefile b/ip/Makefile index 8424b1f6..572604d5 100644 --- a/ip/Makefile +++ b/ip/Makefile @@ -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 diff --git a/tc/Makefile b/tc/Makefile index 678b3029..c364a053 100644 --- a/tc/Makefile +++ b/tc/Makefile @@ -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