Skip to content

Commit

Permalink
Build static binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
parsley42 committed Nov 27, 2023
1 parent 358bc8e commit 36cacbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ arch = $(word 2,$(subst -, ,$@))
platform = $(word 2,$(subst _, ,$@))

$(PLATFORMS): deps
GOOS=$(os) GOARCH=$(arch) $(GO) build \
-ldflags "-w -s" \
GOOS=$(os) GOARCH=$(arch) $(GO) build -tags netgo\
-ldflags '-w -s -extldflags "-static"' \
-o target/$(PKG_NAME)_$@

TARGETS = $(addprefix target/$(PKG_NAME)_,$(PLATFORMS))
Expand Down

0 comments on commit 36cacbd

Please sign in to comment.