kopia lustrzana https://github.com/cyoung/stratux
Undo cab2a81c26
.
See commit comments: https://github.com/cyoung/stratux/commit/cab2a81c26f214709f8cda941ff8ea1 9ca4549ba. A static build of wiringPi is all that is needed to produce the static binary. Static linking is needed to produce a working binary on current production images.pull/610/head
rodzic
8c0364c04a
commit
fcfe8adeaf
11
Makefile
11
Makefile
|
@ -3,7 +3,9 @@ ifeq "$(CIRCLECI)" "true"
|
||||||
BUILDINFO=
|
BUILDINFO=
|
||||||
PLATFORMDEPENDENT=
|
PLATFORMDEPENDENT=
|
||||||
else
|
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!))
|
$(if $(GOROOT),,$(error GOROOT is not set!))
|
||||||
PLATFORMDEPENDENT=fancontrol
|
PLATFORMDEPENDENT=fancontrol
|
||||||
endif
|
endif
|
||||||
|
@ -12,12 +14,12 @@ all:
|
||||||
make xdump978 xdump1090 xgen_gdl90 $(PLATFORMDEPENDENT)
|
make xdump978 xdump1090 xgen_gdl90 $(PLATFORMDEPENDENT)
|
||||||
|
|
||||||
xgen_gdl90:
|
xgen_gdl90:
|
||||||
go get -t -d -v ./main ./test ./godump978 ./uatparse ./sensors
|
go get -t -d -v ./main ./test ./godump978 ./uatparse
|
||||||
go build $(BUILDINFO) -p 4 main/gen_gdl90.go main/traffic.go main/gps.go main/network.go main/managementinterface.go main/sdr.go main/ping.go main/uibroadcast.go main/monotonic.go main/datalog.go main/equations.go main/sensors.go main/cputemp.go
|
go build $(BUILDINFO) -p 4 main/gen_gdl90.go main/traffic.go main/gps.go main/network.go main/managementinterface.go main/sdr.go main/ping.go main/uibroadcast.go main/monotonic.go main/datalog.go main/equations.go main/cputemp.go
|
||||||
|
|
||||||
fancontrol:
|
fancontrol:
|
||||||
go get -t -d -v ./main
|
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:
|
xdump1090:
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
@ -59,3 +61,4 @@ clean:
|
||||||
rm -f gen_gdl90 libdump978.so fancontrol
|
rm -f gen_gdl90 libdump978.so fancontrol
|
||||||
cd dump1090 && make clean
|
cd dump1090 && make clean
|
||||||
cd dump978 && make clean
|
cd dump978 && make clean
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue