bedrocktool/Makefile
olebeck 9a4573efad ?
2022-08-11 22:46:25 +02:00

28 lines
447 B
Makefile

GC = go build -ldflags "-s -w"
TAG := $(shell git describe --tags)
NAME = bedrocktool_${TAG}
SRCS = $(wildcard *.go)
all: windows linux
.PHONY: all clean windows linux mac
windows: $(NAME).exe
linux: $(NAME)-linux
mac: $(NAME)-mac
$(NAME).exe: $(SRCS)
echo TAG: ${TAG}
GOOS=windows $(GC) -o $@
$(NAME)-linux: $(SRCS)
GOOS=linux $(GC) -o $@
$(NAME)-mac: $(SRCS)
GOOS=darwin $(GC) -o $@
clean:
rm $(NAME).exe $(NAME)-linux $(NAME)-mac