1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile

55 lines
1.4 KiB
Makefile
Raw Normal View History

# Make a release with
# make -j4 release
VERSION=$(shell git describe)
2018-04-28 12:55:15 +03:00
LDFLAGS=-ldflags "-X main.version=${VERSION}"
.PHONY: build
build: server/bindata.go
go build ${LDFLAGS}
STATICFILES := $(wildcard static/*)
TEMPLATES := $(wildcard templates/*)
server/bindata.go: $(STATICFILES) $(TEMPLATES)
go-bindata -tags '!debug' -o server/bindata.go static/... templates/...
2018-02-20 13:08:13 +03:00
go fmt
server/bindata-debug.go: $(STATICFILES) $(TEMPLATES)
go-bindata -tags 'debug' -o server/bindata-debug.go -debug static/... templates/...
2018-02-20 13:08:13 +03:00
go fmt
.PHONY: devel
devel: server/bindata-debug.go
go build -tags debug
2017-11-02 15:27:39 +03:00
.PHONY: quick
quick: server/bindata.go
go build
2017-11-02 15:27:39 +03:00
.PHONY: linuxarm
linuxarm: server/bindata.go
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
2017-08-18 17:05:10 +03:00
#cd dist && upx --brute cowyo_linux_arm
2017-11-05 16:35:11 +03:00
.PHONY: linux32
linux32: server/bindata.go
2017-11-05 16:35:11 +03:00
env GOOS=linux GOARCH=386 go build ${LDFLAGS} -o dist/cowyo_linux_32bit
#cd dist && upx --brute cowyo_linux_32bit
2017-11-05 16:35:11 +03:00
.PHONY: linux64
linux64: server/bindata.go
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_linux_amd64
.PHONY: windows
windows: server/bindata.go
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_windows_amd64.exe
2017-08-18 17:05:10 +03:00
#cd dist && upx --brute cowyo_windows_amd64.exe
.PHONY: osx
osx: server/bindata.go
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_osx_amd64
2017-08-18 17:05:10 +03:00
#cd dist && upx --brute cowyo_osx_amd64
.PHONY: release
2017-11-05 16:35:11 +03:00
release: osx windows linux64 linux32 linuxarm