2016-10-03 14:25:07 +08:00
|
|
|
PACKAGES := gobot gobot/api gobot/drivers/gpio gobot/drivers/i2c gobot/platforms/firmata/client gobot/platforms/intel-iot/edison gobot/sysfs $(shell ls ./platforms | sed -e 's/^/gobot\/platforms\//')
|
2016-02-20 10:40:30 +08:00
|
|
|
.PHONY: test cover robeaux examples
|
2014-07-11 02:13:32 +08:00
|
|
|
|
2014-06-12 11:10:46 +08:00
|
|
|
test:
|
2014-06-24 09:57:41 +08:00
|
|
|
for package in $(PACKAGES) ; do \
|
2014-11-17 04:25:48 +08:00
|
|
|
go test -a github.com/hybridgroup/$$package ; \
|
2014-06-24 09:57:41 +08:00
|
|
|
done ; \
|
2014-07-19 04:18:01 +08:00
|
|
|
|
2014-06-12 11:10:46 +08:00
|
|
|
cover:
|
2014-12-20 03:26:44 +08:00
|
|
|
echo "mode: set" > profile.cov ; \
|
2014-06-12 11:10:46 +08:00
|
|
|
for package in $(PACKAGES) ; do \
|
2014-12-20 03:03:13 +08:00
|
|
|
go test -a -coverprofile=tmp.cov github.com/hybridgroup/$$package ; \
|
2014-12-20 03:26:44 +08:00
|
|
|
cat tmp.cov | grep -v "mode: set" >> profile.cov ; \
|
2014-06-12 11:10:46 +08:00
|
|
|
done ; \
|
|
|
|
rm tmp.cov ; \
|
2014-07-02 14:10:12 +08:00
|
|
|
|
|
|
|
robeaux:
|
|
|
|
ifeq (,$(shell which go-bindata))
|
|
|
|
$(error robeaux not built! https://github.com/jteeuwen/go-bindata is required to build robeaux assets )
|
|
|
|
endif
|
|
|
|
cd api ; \
|
2015-10-27 00:09:28 +08:00
|
|
|
npm install robeaux ; \
|
|
|
|
cp -r node_modules/robeaux robeaux-tmp ; \
|
2014-07-11 02:35:00 +08:00
|
|
|
cd robeaux-tmp ; \
|
2015-10-27 00:09:28 +08:00
|
|
|
rm Makefile package.json README.markdown ; \
|
2014-07-11 02:13:32 +08:00
|
|
|
touch css/fonts.css ; \
|
2015-10-27 00:09:28 +08:00
|
|
|
echo "Updating robeaux..." ; \
|
2014-07-11 02:35:00 +08:00
|
|
|
go-bindata -pkg="robeaux" -o robeaux.go -ignore=\\.git ./... ; \
|
|
|
|
mv robeaux.go ../robeaux ; \
|
2014-07-02 14:10:12 +08:00
|
|
|
cd .. ; \
|
2014-07-11 02:35:00 +08:00
|
|
|
rm -rf robeaux-tmp/ ; \
|
2015-10-27 00:09:28 +08:00
|
|
|
rm -rf node_modules/ ; \
|
2014-07-11 02:35:00 +08:00
|
|
|
go fmt ./robeaux/robeaux.go ; \
|
2016-02-20 10:40:30 +08:00
|
|
|
|
|
|
|
EXAMPLES := $(shell ls examples/*.go | sed -e 's/examples\///')
|
|
|
|
|
|
|
|
examples:
|
|
|
|
for example in $(EXAMPLES) ; do \
|
|
|
|
go build -o /tmp/$$example examples/$$example ; \
|
|
|
|
done ; \
|
2016-10-03 14:25:07 +08:00
|
|
|
|
|
|
|
deps:
|
|
|
|
go get -d -v github.com/bmizerany/pat
|
|
|
|
go get -d -v github.com/hybridgroup/go-ardrone/client
|
|
|
|
go get -d -v github.com/currantlabs/gatt
|
2016-10-03 14:38:50 +08:00
|
|
|
go get -d -v github.com/tarm/serial
|
2016-10-03 14:25:07 +08:00
|
|
|
go get -d -v github.com/veandco/go-sdl2/sdl
|
|
|
|
go get -d -v golang.org/x/net/websocket
|
|
|
|
go get -d -v github.com/eclipse/paho.mqtt.golang
|
|
|
|
go get -d -v github.com/nats-io/nats
|
2016-10-03 14:38:50 +08:00
|
|
|
go get -d -v github.com/lazywei/go-opencv
|
2016-10-03 14:25:07 +08:00
|
|
|
go get -d -v github.com/donovanhide/eventsource
|