goptimize/Makefile

26 lines
870 B
Makefile
Raw Normal View History

2019-08-02 10:24:42 +00:00
TAG=`git describe --tags`
VERSION ?= `git describe --tags`
2019-08-02 22:23:58 +00:00
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}"
2019-08-02 10:24:42 +00:00
build = echo "\n\nBuilding $(1)-$(2)" && GOOS=$(1) GOARCH=$(2) go build ${LDFLAGS} -o dist/goptimize_${VERSION}_$(1)_$(2) \
&& bzip2 dist/goptimize_${VERSION}_$(1)_$(2)
goptimize: *.go
2019-08-24 11:17:55 +00:00
go get github.com/disintegration/imaging golang.org/x/image/bmp golang.org/x/image/tiff github.com/axllent/gitrel github.com/spf13/pflag
2019-08-02 10:24:42 +00:00
go build ${LDFLAGS} -o goptimize
rm -rf /tmp/go-*
clean:
rm -f goptimize
release:
mkdir -p dist
rm -f dist/goptimize_${VERSION}_*
2019-08-24 11:17:55 +00:00
go get github.com/disintegration/imaging golang.org/x/image/bmp golang.org/x/image/tiff github.com/axllent/gitrel github.com/spf13/pflag
2019-08-02 10:24:42 +00:00
$(call build,linux,amd64)
$(call build,linux,386)
$(call build,linux,arm)
$(call build,linux,arm64)
$(call build,darwin,amd64)
$(call build,darwin,386)