forked from b3nn0/stratux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make it easier to run stratux on x86/amd64 development machine, make …
…it possible to run without /root/stratux clone
- Loading branch information
Showing
6 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
ifeq "$(CIRCLECI)" "true" | ||
BUILDINFO= | ||
PLATFORMDEPENDENT= | ||
else | ||
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= | ||
endif | ||
|
||
all: xdump978 xdump1090 xgen_gdl90 $(PLATFORMDEPENDENT) | ||
|
||
xgen_gdl90: | ||
go get -t -d -v ./main ./godump978 ./uatparse ./sensors | ||
export CGO_CFLAGS_ALLOW="-L$(CURDIR)" && 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 main/lowpower_uat.go main/flarm.go main/flarm-nmea.go main/networksettings.go | ||
|
||
fancontrol: | ||
go get -t -d -v ./main | ||
go build $(BUILDINFO) -p 4 main/fancontrol.go main/equations.go main/cputemp.go | ||
|
||
xdump1090: | ||
git submodule update --init | ||
cd dump1090 && make | ||
|
||
xdump978: | ||
cd dump978 && make lib | ||
sudo cp -f ./libdump978.so /usr/lib/libdump978.so | ||
|
||
.PHONY: test | ||
test: | ||
make -C test | ||
|
||
www: | ||
cd web && make | ||
|
||
install: | ||
cp -f gen_gdl90 /usr/bin/gen_gdl90 | ||
chmod 755 /usr/bin/gen_gdl90 | ||
cp image/10-stratux.rules /etc/udev/rules.d/10-stratux.rules | ||
cp image/99-uavionix.rules /etc/udev/rules.d/99-uavionix.rules | ||
make www | ||
cp -f libdump978.so /usr/lib/libdump978.so | ||
cp -f dump1090/dump1090 /usr/bin/ | ||
|
||
# Do this last! | ||
cd /tmp && \ | ||
rm -f rtlsdr-ogn-bin-x64-0.2.6.tgz && \ | ||
wget http://download.glidernet.org/x64/rtlsdr-ogn-bin-x64-0.2.6.tgz && tar xzf rtlsdr-ogn-bin-x64-0.2.6.tgz && \ | ||
cp rtlsdr-ogn-0.2.6/ogn-rf /usr/bin && \ | ||
cp rtlsdr-ogn-0.2.6/ogn-decode /usr/bin | ||
mkdir -p /var/lib/stratux/ogn | ||
cp -f ogn/rtlsdr-ogn/stratux.conf.template /etc/stratux-ogn.conf.template | ||
|
||
rm -f /var/run/ogn-rf.fifo | ||
mkfifo /var/run/ogn-rf.fifo | ||
chmod a+s /usr/bin/ogn-rf | ||
|
||
clean: | ||
rm -f gen_gdl90 libdump978.so fancontrol ahrs_approx | ||
cd dump1090 && make clean | ||
cd dump978 && make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters