More generic makefile now builds current platform by default
This commit is contained in:
22
Makefile
22
Makefile
@@ -4,7 +4,7 @@
|
|||||||
VERSION = $(shell git describe --always --dirty)
|
VERSION = $(shell git describe --always --dirty)
|
||||||
TIMESTAMP = $(shell git show -s --format=%ct)
|
TIMESTAMP = $(shell git show -s --format=%ct)
|
||||||
|
|
||||||
default: build_darwin
|
default: build
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
go get -u github.com/jteeuwen/go-bindata/...
|
go get -u github.com/jteeuwen/go-bindata/...
|
||||||
@@ -13,6 +13,13 @@ setup:
|
|||||||
resources:
|
resources:
|
||||||
go-bindata -pkg resources -o internal/resources/resources.go resources/...
|
go-bindata -pkg resources -o internal/resources/resources.go resources/...
|
||||||
|
|
||||||
|
build: resources
|
||||||
|
godep go build -o ./build/gopow *.go
|
||||||
|
|
||||||
|
all: build_darwin build_linux build_arm5 build_arm7 build_win64 build_win32
|
||||||
|
rm ./build/gopow
|
||||||
|
rm ./build/gopow.exe
|
||||||
|
|
||||||
build_darwin: resources
|
build_darwin: resources
|
||||||
GOOS=darwin GOARCH=amd64 godep go build -a -o ./build/gopow *.go
|
GOOS=darwin GOARCH=amd64 godep go build -a -o ./build/gopow *.go
|
||||||
zip ./build/gopow_darwin64.zip ./build/gopow
|
zip ./build/gopow_darwin64.zip ./build/gopow
|
||||||
@@ -37,13 +44,18 @@ build_win32: resources
|
|||||||
GOOS=windows GOARCH=386 godep go build -a -o ./build/gopow.exe *.go
|
GOOS=windows GOARCH=386 godep go build -a -o ./build/gopow.exe *.go
|
||||||
zip ./build/gopow_win32.zip ./build/gopow.exe
|
zip ./build/gopow_win32.zip ./build/gopow.exe
|
||||||
|
|
||||||
all: build_darwin build_linux build_arm5 build_arm7 build_win64 build_win32
|
|
||||||
rm ./build/gopow
|
|
||||||
rm ./build/gopow.exe
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
golint .
|
golint .
|
||||||
|
|
||||||
|
# Save dependencies to vendor folder
|
||||||
|
deps:
|
||||||
|
- rm -r vendor Godeps
|
||||||
|
godep save ./...
|
||||||
|
|
||||||
|
deps_restore:
|
||||||
|
godep restore ./...
|
||||||
|
- rm -r vendor
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- rm -r build
|
- rm -r build
|
||||||
- rm -rf internal/resources
|
- rm -rf internal/resources
|
||||||
|
|||||||
Reference in New Issue
Block a user