summarylogtreecommitdiffstats
path: root/Makefile.patch
blob: 824dcaa13be6ff985e6f9bcc4a143a1140357e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/Makefile b/Makefile
index fc76416..f8a2762 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ MANDIR=$(PREFIX)/share/man
 VPATH=doc
 RM=rm
 GO=go
-GOFLAGS=
+GOFLAGS?=
 
 DOCS = \
 	astronaut.1
@@ -28,7 +28,9 @@ doc: $(DOCS)
 astronaut: $(GOSRC)
 	$(GO) build $(GOFLAGS) \
 		-ldflags "-X main.Version=$(VERSION) \
-			-X main.ShareDir=$(SHAREDIR)" \
+			-X main.ShareDir=$(SHAREDIR) \
+			-linkmode=external \
+			-extldflags=$(LDFLAGS)" \
 		-o $@
 
 clean: