wireguard-go/Makefile

23 lines
510 B
Makefile
Raw Normal View History

2018-05-15 00:15:16 +00:00
PREFIX ?= /usr
DESTDIR ?=
BINDIR ?= $(PREFIX)/bin
2018-05-20 01:18:47 +00:00
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
2018-05-13 22:28:30 +00:00
wireguard-go: $(wildcard *.go) $(wildcard */*.go)
2018-05-15 00:15:16 +00:00
go build -v -o $@
install: wireguard-go
@install -v -d "$(DESTDIR)$(BINDIR)" && install -m 0755 -v wireguard-go "$(DESTDIR)$(BINDIR)/wireguard-go"
clean:
rm -f wireguard-go
2018-05-15 00:15:16 +00:00
.PHONY: clean install