summaryrefslogtreecommitdiff
path: root/netem
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2017-08-09 08:45:04 -0700
committerStephen Hemminger <stephen@networkplumber.org>2017-08-09 09:10:52 -0700
commit69fed534a533f48b8772d935590f82206171ca96 (patch)
tree605993b7f2d87f1d6aa87ecc397ff88e5cdbfd09 /netem
parent2a80154fde40b48d0e8afd16ae0eaa046ca05c02 (diff)
downloadiproute2-69fed534a533f48b8772d935590f82206171ca96.tar.gz
change how Config is used in Makefile's
The recent LIBMNL changes was made more difficult to debug because of how Config is handle in clean make. The Config file is generated by top level make, but since it is not recursive, the values generated would not be visible on a clean make. The change is to not include Config in top level make, and move all the conditionals down into sub makefiles. Not ideal, but beter than going full autoconf route. Or forcing separate configure step. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'netem')
-rw-r--r--netem/Makefile7
1 files changed, 7 insertions, 0 deletions
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):