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

Initial split (towards a separately mountable cowyo)

This commit is contained in:
Daniel Heath
2018-04-28 11:32:08 +10:00
parent f21c89f7bd
commit 8944170646
12 changed files with 87 additions and 72 deletions

View File

@@ -2,52 +2,51 @@
# make -j4 release
VERSION=$(shell git describe)
LDFLAGS=-ldflags "-X main.version=${VERSION}"
LDFLAGS=-ldflags "-X main.version=${VERSION}" -o cowyo github.com/schollz/cowyo/cmd
.PHONY: build
build: bindata.go
build: server/bindata.go
go build ${LDFLAGS}
STATICFILES := $(wildcard static/*)
TEMPLATES := $(wildcard templates/*)
bindata.go: $(STATICFILES) $(TEMPLATES)
go-bindata -tags '!debug' static/... templates/...
server/bindata.go: $(STATICFILES) $(TEMPLATES)
go-bindata -tags '!debug' -o server/bindata.go static/... templates/...
go fmt
bindata-debug.go: $(STATICFILES) $(TEMPLATES)
go-bindata -tags 'debug' -o bindata-debug.go -debug static/... templates/...
server/bindata-debug.go: $(STATICFILES) $(TEMPLATES)
go-bindata -tags 'debug' -o server/bindata-debug.go -debug static/... templates/...
go fmt
.PHONY: devel
devel: bindata-debug.go
devel: server/bindata-debug.go
go build -tags debug
.PHONY: quick
quick: bindata.go
quick: server/bindata.go
go build
.PHONY: linuxarm
linuxarm: bindata.go
linuxarm: server/bindata.go
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
#cd dist && upx --brute cowyo_linux_arm
.PHONY: linux32
linux32: bindata.go
linux32: server/bindata.go
env GOOS=linux GOARCH=386 go build ${LDFLAGS} -o dist/cowyo_linux_32bit
#cd dist && upx --brute cowyo_linux_32bit
.PHONY: linux64
linux64: bindata.go
linux64: server/bindata.go
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_linux_amd64
.PHONY: windows
windows: bindata.go
windows: server/bindata.go
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_windows_amd64.exe
#cd dist && upx --brute cowyo_windows_amd64.exe
.PHONY: osx
osx: bindata.go
osx: server/bindata.go
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_osx_amd64
#cd dist && upx --brute cowyo_osx_amd64