]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
Discourage building for Linux
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 20 May 2018 01:18:47 +0000 (03:18 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 20 May 2018 01:19:03 +0000 (03:19 +0200)
Makefile

index 794132692610c1a7a9f19d03fed66b5423d2f3ba..e1c53c57e4441f96bb13a3be8a8dbf5266ff9879 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,12 @@ PREFIX ?= /usr
 DESTDIR ?=
 BINDIR ?= $(PREFIX)/bin
 
+ifeq ($(shell go env GOOS),linux)
+ifeq ($(wildcard .git),)
+$(error Do not build this for Linux. Instead use the Linux kernel module. See wireguard.com/install/ for more info.)
+endif
+endif
+
 all: wireguard-go
 
 wireguard-go: $(wildcard *.go) $(wildcard */*.go)