Add build instructions
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
cec63d6436
commit
b3cc7e8d9a
2 changed files with 14 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.bin
|
13
Makefile
Normal file
13
Makefile
Normal 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/$*
|
Loading…
Reference in a new issue