twitch-bot-tools/Makefile
Knut Ahlers b3cc7e8d9a
Add build instructions
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-09-01 19:28:35 +02:00

13 lines
329 B
Makefile

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/$*