diff options
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | bridge/Makefile | 5 | ||||
-rw-r--r-- | genl/Makefile | 5 | ||||
-rw-r--r-- | misc/Makefile | 5 | ||||
-rw-r--r-- | netem/Makefile | 7 |
5 files changed, 23 insertions, 14 deletions
@@ -1,7 +1,4 @@ -# Include "Config" if already generated -ifneq ($(wildcard Config),) -include Config -endif +# Top level Makefile for iproute2 ifeq ($(VERBOSE),0) MAKEFLAGS += --no-print-directory @@ -57,16 +54,6 @@ SUBDIRS=lib ip tc bridge misc netem genl tipc devlink man LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a LDLIBS += $(LIBNETLINK) -ifeq ($(HAVE_ELF),y) - CFLAGS += -DHAVE_ELF - LDLIBS += -lelf -endif - -ifeq ($(HAVE_MNL),y) - CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags) - LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs) -endif - all: Config @set -e; \ for i in $(SUBDIRS); \ diff --git a/bridge/Makefile b/bridge/Makefile index 634c370a..fa448ea2 100644 --- a/bridge/Makefile +++ b/bridge/Makefile @@ -6,6 +6,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 + all: bridge bridge: $(BROBJ) $(LIBNETLINK) diff --git a/genl/Makefile b/genl/Makefile index f5a0bfe4..f0efe1ac 100644 --- a/genl/Makefile +++ b/genl/Makefile @@ -17,6 +17,11 @@ LDFLAGS += -Wl,-export-dynamic LDLIBS += -lm -ldl endif +ifeq ($(HAVE_MNL),y) + CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags) + LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs) +endif + all: genl genl: $(GENLOBJ) $(LIBNETLINK) $(LIBUTIL) $(GENLLIB) diff --git a/misc/Makefile b/misc/Makefile index 814a72fc..fa90308e 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -18,6 +18,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 + all: $(TARGETS) ss: $(SSOBJ) diff --git a/netem/Makefile b/netem/Makefile index a68e2fdb..2499f086 100644 --- a/netem/Makefile +++ b/netem/Makefile @@ -1,3 +1,5 @@ +include ../Config + DISTGEN = maketable normal pareto paretonormal DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist @@ -5,6 +7,11 @@ HOSTCC ?= $(CC) CCOPTS = $(CBUILD_CFLAGS) LDLIBS += -lm +ifeq ($(HAVE_MNL),y) + CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags) + LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs) +endif + all: $(DISTGEN) $(DISTDATA) $(DISTGEN): |