Add build instructions

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-09-01 19:25:03 +02:00
parent cec63d6436
commit b3cc7e8d9a
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5
2 changed files with 14 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.bin

13
Makefile Normal file
View file

@ -0,0 +1,13 @@
AVAIL_CMDS:=$(shell find . -mindepth 1 -name 'main.go' | cut -d '/' -f 2)
default: clean $(patsubst %,.bin/%,$(AVAIL_CMDS))
clean:
rm -rf .bin
.bin/%: export CGO_ENABLED=0
.bin/%:
cd $* && go build \
-trimpath \
-ldflags "-s -w -X main.version=$(shell git describe --tags --always || echo dev)" \
-o $(CURDIR)/.bin/$*