From 89e489de4f727d9025af603c03cc27de32565e7b Mon Sep 17 00:00:00 2001 From: Bill Mill Date: Sun, 19 Jun 2022 21:49:54 -0400 Subject: [PATCH] add a makefile --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ffe60d --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +bin/springer: + go build -o bin/springer server/main.go + +# Use zig as the cc to cross-compile mattn/sqlite for linux +# +# working off https://zig.news/kristoff/building-sqlite-with-cgo-for-every-os-4cic +# +# this is basically magic +# +# to run locally: +# docker run -it -v $(pwd)/bin:/app ubuntu /app/springer-linux +bin/springer-linux: + CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC="zig cc -target x86_64-linux" CXX="zig cc -target x86_64-linux" go build -o bin/springer-linux server/main.go