commit ebfd186e4ee77fa94b1d8bb094e697537c34963d
parent 52c651e87ed602789a55e28c323fe1ef42a83921
Author: Daniel Bainton <dpb@driftaway.org>
Date: Mon, 26 May 2014 13:18:53 +0300
Add iproute2
Only for the ip and rtmon tools for now, building of tc fails because
our yacc doesn't have features it needs
Diffstat:
4 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/iproute2/checksums b/iproute2/checksums
@@ -0,0 +1 @@
+774ab15bc0001d79884d9c88920c63dead162f6d93816bb921beca3b5bcc12555b07beaa726107491b5a6c7eae89558dc1dba85712d0fb35c3a78133356b2921 iproute2-3.14.0.tar.xz
diff --git a/iproute2/iproute2.mk b/iproute2/iproute2.mk
@@ -0,0 +1,35 @@
+BIN = ip/ip ip/rtmon #tc/tc
+LIB = lib/libutil.a
+lib_libutil_a_OBJ = `{ls lib/*.c | sed 's/.$/o/'}
+ip_ip_OBJ = `{ls ip/*.c | sed 's/.$/o/' | grep -v 'rtmon.o$'}
+ip_rtmon_OBJ = ip/rtmon.o
+#tc_tc_OBJ = `{ls tc/*.c | sed 's/.$/o/' | grep -v 'em_ipset.o$' | grep -v 'm_ipt.o$' | grep -v 'm_xt_old.o$' | grep -v 'q_atm.o$'} tc/emp_ematch.o
+LOCAL_BIN_LDFLAGS = -Llib -lutil
+
+LOCAL_CFLAGS = -Iinclude -DHAVE_SETNS
+
+CLEAN_FILES = ip/static-syms.h
+
+INSTALL_BIN = ip/ip ip/rtmon
+INSTALL_MAN8 = man/man8/ip.8 man/man8/rtmon.8
+
+#DEPS = yacc lex iptables
+
+<$mkbuild/mk.default
+
+$BIN: $LIB
+
+#tc/emp_ematch.c: tc/emp_ematch.y
+# $YACC -L $prereq
+# mv y.tab.c $target
+
+#tc/static-syms.o: tc/static-syms.h
+#tc/static-syms.h: `{ls tc/*.c}
+
+ip/static-syms.o: ip/static-syms.h
+ip/static-syms.h: `{ls ip/*.c}
+
+%/static-syms.h:Q:
+ for s in `grep -B 3 '\<dlsym' $prereq | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do
+ sed -n '/'$s'[^ ]* =/{s:.* \([^ ]*'$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $prereq
+ done > $target
diff --git a/iproute2/mkfile b/iproute2/mkfile
@@ -0,0 +1,6 @@
+<$mkbuild/mk.3rdparty
+
+<v.mk
+src = iproute2-$v
+url = https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-$v.tar.xz
+mkfile = ../iproute2.mk
diff --git a/iproute2/v.mk b/iproute2/v.mk
@@ -0,0 +1 @@
+v = 3.14.0