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

View File

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