summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-05-23 10:55:39 -0300
committerEuAndreh <eu@euandre.org>2024-05-23 10:55:39 -0300
commitc9b09532f8851eff60860a6c01d7748e193e4417 (patch)
tree024a8018665ccda48008487a2f377aea24c39bc3
parentRename leftover references of "papo" -> "papod" (diff)
downloadpapod-c9b09532f8851eff60860a6c01d7748e193e4417.tar.gz
papod-c9b09532f8851eff60860a6c01d7748e193e4417.tar.xz
Makefile: Add missing $(GOFLAGS) for a correct static build of go-sqlite3
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 24efb25..a831d1b 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ EXEC = ./
## Where to store the installation. Empty by default.
DESTDIR =
LDLIBS =
+GOFLAGS = -tags 'linux libsqlite3 json1 fts5 sqlite_omit_load_extension' -ldflags '-extldflags "-static -lm"'
@@ -56,10 +57,10 @@ all: $(derived-assets)
$(NAME).bin: src/lib.go src/cmd/main.go Makefile
- go build -o $@ -v src/cmd/main.go
+ env CGO_ENABLED=1 go build -o $@ -v $(GOFLAGS) src/cmd/main.go
tests/lib_test.bin: src/lib.go tests/lib_test.go Makefile
- go test -c -o $@ -v $*.go
+ go test -c -o $@ -v $(GOFLAGS) $*.go