From 7ef5efdd6e7c67363eee49dd238c76c778ea8c03 Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Sat, 13 May 2017 18:43:43 -0400 Subject: [PATCH] Make fancontrol a static executable (for systems without wiringPi installed). --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fbe4e385..ddb4e0a6 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,9 @@ ifeq "$(CIRCLECI)" "true" BUILDINFO= PLATFORMDEPENDENT= else - BUILDINFO=-ldflags "-X main.stratuxVersion=`git describe --tags --abbrev=0` -X main.stratuxBuild=`git log -n 1 --pretty=%H`" + LDFLAGS_VERSION=-X main.stratuxVersion=`git describe --tags --abbrev=0` -X main.stratuxBuild=`git log -n 1 --pretty=%H` + BUILDINFO=-ldflags "$(LDFLAGS_VERSION)" + BUILDINFO_STATIC=-ldflags "-extldflags -static $(LDFLAGS_VERSION)" $(if $(GOROOT),,$(error GOROOT is not set!)) PLATFORMDEPENDENT=fancontrol endif @@ -17,7 +19,7 @@ xgen_gdl90: fancontrol: go get -t -d -v ./main - go build $(BUILDINFO) -p 4 main/fancontrol.go main/equations.go main/cputemp.go + go build $(BUILDINFO_STATIC) -p 4 main/fancontrol.go main/equations.go main/cputemp.go xdump1090: git submodule update --init