Makefile: static link binary

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2024-01-01 03:53:21 +03:00
parent d02aab7f8c
commit 2be330918a
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ generate-version-and-build:
@$(MAKE) wireguard-go
wireguard-go: $(wildcard *.go) $(wildcard */*.go)
go build -v -o "$@"
CGO_ENABLED=0 go build -v -o "$@"
install: wireguard-go
@install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 "$<" "$(DESTDIR)$(BINDIR)/wireguard-go"