Commit 81a292af901680cdce78731370eb9b3d7f2f7dd9

Parents: d9999c7adffc8c5edbeae83129ee7cab0d7500b5

From: Moritz Poldrack <git@moritz.sh>
Date: Thu Nov 9 14:44:21 2023 +0700

mk: fix static compilation

		

Stats

Makefile +3/-3

Changeset

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
diff --git a/Makefile b/Makefile
index 8d3639bbd67b54be10135d6907e9e100f10c0645..71c83020cf95e0962da6589020c5d062a425f06b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
 GO ?= $(shell which go)
 GOSRC := $(shell find . -type f -name '*.go' -not -path "./repos/*" -print)
 GOSRC += go.mod go.sum
-GO_FLAGS ?= -buildmode=pie -v -trimpath
+O_FLAGS ?= -v -trimpath
 GO_LDFLAGS ?=
 
-gogit: $(GOSRC)
-	$(GO) build $(GO_FLAGS) -ldflags="$(GO_LDFLAGS)" -o gogit
+gogit: $(GOSRC) Makefile
+	$(GO) build $(GO_FLAGS) -ldflags="$(GO_LDFLAGS)" -tags=netgo -o gogit
 
 .PHONY: dev
 dev: