You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gridscale-check/Makefile

28 lines
757 B

3 years ago
PLATFORMS=windows linux darwin
ARCHES=amd64
BUILDDIR=build
3 years ago
VERSION=0.3.0
3 years ago
default: build
build: fmt
go install
go build -o $(BUILDDIR)/
buildallplatforms: fmt
$(foreach platform,$(PLATFORMS), \
$(foreach arch,$(ARCHES), \
mkdir -p $(BUILDDIR)/$(platform)_$(arch); GOOS=$(platform) GOARCH=$(arch) go build -o $(BUILDDIR)/$(platform)_$(arch)/$(EXECUTABLE_NAME);))
@echo "Renaming Windows file"
@if [ -f $(BUILDDIR)/windows_amd64/$(EXECUTABLE_NAME) ]; then mv $(BUILDDIR)/windows_amd64/$(EXECUTABLE_NAME) $(BUILDDIR)/windows_amd64/$(EXECUTABLE_NAME).exe; fi
clean:
$(foreach platform,$(PLATFORMS), \
$(foreach arch,$(ARCHES), \
rm $(BUILDDIR)/$(platform)_$(arch)/$(EXECUTABLE_NAME)*;))
fmt:
gofmt -w *.go