Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/freebsd-src.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2022-10-29 06:04:56 +0300
committerKyle Evans <kevans@FreeBSD.org>2022-10-29 06:05:39 +0300
commit0283826706706c598fff86e16c42604841c1a05a (patch)
treec50e25cccf2419facc93a4dba1138211a2420ba3 /usr.bin
parentadf376485712c8fffbf3be330d505a969647f479 (diff)
usr.bin: hook wg(8) up to the build
wg(8) is used to manage WireGuard interfaces; see wg(4) and wg(8) both for more details and usage examples.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/Makefile1
-rw-r--r--usr.bin/wg/Makefile41
2 files changed, 42 insertions, 0 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index dada896d806f..e3d58a3524cf 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -171,6 +171,7 @@ SUBDIR= alias \
w \
wall \
wc \
+ wg \
what \
whereis \
which \
diff --git a/usr.bin/wg/Makefile b/usr.bin/wg/Makefile
new file mode 100644
index 000000000000..55cf5fccf53a
--- /dev/null
+++ b/usr.bin/wg/Makefile
@@ -0,0 +1,41 @@
+
+PROG= wg
+MAN= wg.8
+
+LIBADD= nv
+
+.PATH: ${SRCTOP}/contrib/wireguard-tools
+.PATH: ${SRCTOP}/contrib/wireguard-tools/man
+
+SRCS+= wg.c
+
+SRCS+= config.c
+SRCS+= encoding.c
+SRCS+= ipc.c
+SRCS+= terminal.c
+
+SRCS+= curve25519.c
+
+# Subcommands
+SRCS+= show.c
+SRCS+= showconf.c
+SRCS+= set.c
+SRCS+= setconf.c
+SRCS+= genkey.c
+SRCS+= pubkey.c
+
+# Base should pull RUNSTATEDIR from paths.h, _PATH_VARRUN
+CFLAGS+= -include paths.h
+CFLAGS+= -DRUNSTATEDIR="_PATH_VARRUN"
+
+# Not going to change this one.
+CWARNFLAGS.curve25519.c+= -Wno-shadow
+
+# sockaddr{,_in} alignment
+CWARNFLAGS.config.c+= -Wno-cast-align
+CWARNFLAGS.ipc.c+= -Wno-cast-align
+
+# qsort comparator
+CWARNFLAGS.show.c+= -Wno-cast-qual
+
+.include <bsd.prog.mk>