From f575441aa66e231eff56dc8e17ddd445af179d6c Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Mon, 27 Jun 2016 21:21:36 -0500 Subject: [PATCH] Add support for ARMv5 --- Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 3a0cec5..00768e0 100644 --- a/Makefile +++ b/Makefile @@ -45,12 +45,17 @@ build: assets go build @echo "You can now execute ./pgweb" -release: assets +release: clean assets @echo "Building binaries..." @gox \ - -osarch="$(TARGETS)" \ + -osarch "$(TARGETS)" \ -ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit $(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime $(BUILD_TIME)" \ - -output="./bin/pgweb_{{.OS}}_{{.Arch}}" + -output "./bin/pgweb_{{.OS}}_{{.Arch}}" + + @echo "Building ARM binaries..." + GOOS=linux GOARCH=arm GOARM=5 go build \ + -ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit $(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime $(BUILD_TIME)" \ + -o "./bin/pgweb_linux_arm_v5" @echo "\nPackaging binaries...\n" @./script/package.sh @@ -66,10 +71,9 @@ setup: godep restore clean: - rm -f ./pgweb - rm -rf ./bin/* - rm -f bindata.go - make assets + @rm -f ./pgweb + @rm -rf ./bin/* + @rm -f bindata.go docker: docker build -t pgweb .