2015-12-06 18:01:21 +00:00
|
|
|
|
2015-11-12 01:07:34 +00:00
|
|
|
ifeq "$(CIRCLECI)" "true"
|
|
|
|
BUILDINFO=
|
|
|
|
else
|
2015-11-14 01:31:21 +00:00
|
|
|
BUILDINFO=-ldflags "-X main.stratuxVersion=`git describe --tags --abbrev=0` -X main.stratuxBuild=`git log -n 1 --pretty=%H`"
|
2016-03-24 16:39:26 +00:00
|
|
|
$(if $(GOROOT),,$(error GOROOT is not set!))
|
2015-11-12 01:07:34 +00:00
|
|
|
endif
|
|
|
|
|
2015-08-15 03:10:16 +00:00
|
|
|
all:
|
2015-12-30 00:50:33 +00:00
|
|
|
make xdump978
|
|
|
|
make xdump1090
|
|
|
|
make xlinux-mpu9150
|
|
|
|
make xgen_gdl90
|
|
|
|
|
|
|
|
xgen_gdl90:
|
|
|
|
go get -t -d -v ./main ./test ./linux-mpu9150/mpu ./godump978 ./mpu6050 ./uatparse
|
2016-04-02 20:01:07 +00:00
|
|
|
go build $(BUILDINFO) -p 4 main/gen_gdl90.go main/traffic.go main/ry835ai.go main/network.go main/managementinterface.go main/sdr.go main/uibroadcast.go main/monotonic.go main/datalog.go
|
2015-12-30 00:50:33 +00:00
|
|
|
|
|
|
|
xdump1090:
|
|
|
|
git submodule update --init
|
|
|
|
cd dump1090 && make
|
|
|
|
|
|
|
|
xdump978:
|
2015-10-05 14:19:24 +00:00
|
|
|
cd dump978 && make lib
|
2016-03-09 14:01:55 +00:00
|
|
|
sudo cp -f ./libdump978.so /usr/lib/libdump978.so
|
2015-12-30 00:50:33 +00:00
|
|
|
|
|
|
|
xlinux-mpu9150:
|
2015-12-27 23:42:24 +00:00
|
|
|
git submodule update --init
|
2015-12-27 18:33:04 +00:00
|
|
|
cd linux-mpu9150 && make -f Makefile-native-shared
|
2015-08-21 23:49:34 +00:00
|
|
|
|
2015-12-06 18:01:21 +00:00
|
|
|
.PHONY: test
|
2015-08-31 03:40:38 +00:00
|
|
|
test:
|
2015-12-06 18:01:21 +00:00
|
|
|
make -C test
|
2015-08-31 03:40:38 +00:00
|
|
|
|
2015-10-01 21:19:28 +00:00
|
|
|
www:
|
2016-02-15 17:35:37 +00:00
|
|
|
cd web && make
|
2015-10-01 21:19:28 +00:00
|
|
|
|
2015-08-21 23:49:34 +00:00
|
|
|
install:
|
|
|
|
cp -f gen_gdl90 /usr/bin/gen_gdl90
|
|
|
|
chmod 755 /usr/bin/gen_gdl90
|
2015-11-12 19:34:04 +00:00
|
|
|
cp init.d-stratux /etc/init.d/stratux
|
|
|
|
chmod 755 /etc/init.d/stratux
|
2015-11-12 19:53:07 +00:00
|
|
|
ln -sf /etc/init.d/stratux /etc/rc2.d/S01stratux
|
|
|
|
ln -sf /etc/init.d/stratux /etc/rc6.d/K01stratux
|
2015-11-12 19:34:04 +00:00
|
|
|
make www
|
2015-12-30 00:50:33 +00:00
|
|
|
cp -f dump1090/dump1090 /usr/bin/
|
2015-11-11 00:14:29 +00:00
|
|
|
|
2015-08-15 03:10:16 +00:00
|
|
|
clean:
|
2015-10-10 00:08:46 +00:00
|
|
|
rm -f gen_gdl90 libdump978.so
|
2015-12-30 00:50:33 +00:00
|
|
|
cd dump1090 && make clean
|
|
|
|
cd dump978 && make clean
|
|
|
|
rm -f linux-mpu9150/*.o linux-mpu9150/*.so
|