Add static build targets

This commit is contained in:
felix@feldspaten.org 2021-06-18 11:46:00 +02:00
parent 0bf6ad01fe
commit 7e4d566dff
Signed by: phoenix
GPG key ID: 31860289A704FB3C
2 changed files with 4 additions and 0 deletions

View file

@ -1,5 +1,6 @@
default: all
all: pasta pastad
static: pasta-static pastad-static
.PHONY: all test clean
@ -11,6 +12,8 @@ pasta: cmd/pasta/pasta.go cmd/pasta/storage.go
go build $^
pastad: cmd/pastad/pastad.go cmd/pastad/storage.go
go build $^
pasta-static: cmd/pasta/pasta.go cmd/pasta/storage.go
CGO_ENABLED=0 go build -ldflags="-w -s" -o pasta $^
pastad-static: cmd/pastad/pastad.go cmd/pastad/storage.go
CGO_ENABLED=0 go build -ldflags="-w -s" -o pastad $^

View file

@ -47,6 +47,7 @@ We build openSUSE package at [build.opensuse.org](https://build.opensuse.org/pac
make pastad # Server
make pasta # Client
make # all
make static # static binaries
Then create a `pastad.toml` file using the provided example (`pastad.toml.example`) and run the server with