mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-12-26 07:38:48 +01:00
23 lines
510 B
Makefile
23 lines
510 B
Makefile
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)
|
|
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
|
|
|
|
.PHONY: clean install
|