From c9b09532f8851eff60860a6c01d7748e193e4417 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 23 May 2024 10:55:39 -0300 Subject: Makefile: Add missing $(GOFLAGS) for a correct static build of go-sqlite3 --- Makefile | 5 +++-- 1 file 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 -- cgit v1.2.3