2017-05-11 18:35:10 +02:00
|
|
|
#!/bin/bash
|
2016-07-28 15:42:03 +02:00
|
|
|
|
|
|
|
|
WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../../src/")"
|
|
|
|
|
|
2017-10-02 18:00:54 +02:00
|
|
|
for i in "$WG"/*.c "$WG"/*.h "$WG"/uapi/*.h "$WG"/selftest/*.h "$WG"/crypto/*.c "$WG"/crypto/*.h "$WG"/crypto/*.S "$WG"/Kbuild "$WG"/Kconfig $(find "$WG"/compat -name '*.c' -o -name '*.h' -o -name '*.include'); do
|
2016-07-28 15:42:03 +02:00
|
|
|
diff -u /dev/null "$i" | sed "s:${WG}:b/net/wireguard:;s:Kbuild:Makefile:"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
cat <<_EOF
|
|
|
|
|
--- a/net/Kconfig
|
|
|
|
|
+++ b/net/Kconfig
|
2017-02-27 21:27:11 -08:00
|
|
|
@@ -85,2 +85,3 @@ config INET
|
2016-07-28 15:42:03 +02:00
|
|
|
if INET
|
|
|
|
|
+source "net/wireguard/Kconfig"
|
2017-02-27 21:27:11 -08:00
|
|
|
source "net/ipv4/Kconfig"
|
2016-07-28 15:42:03 +02:00
|
|
|
--- a/net/Makefile
|
|
|
|
|
+++ b/net/Makefile
|
2017-02-27 21:27:11 -08:00
|
|
|
@@ -16,2 +16,3 @@
|
2016-11-25 21:14:50 +01:00
|
|
|
obj-\$(CONFIG_NETFILTER) += netfilter/
|
2016-07-28 15:42:03 +02:00
|
|
|
+obj-\$(CONFIG_WIREGUARD) += wireguard/
|
2017-02-27 21:27:11 -08:00
|
|
|
obj-\$(CONFIG_INET) += ipv4/
|
2016-07-28 15:42:03 +02:00
|
|
|
_EOF
|