Make fancontrol a static executable (for systems without wiringPi installed).
@@ -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
