2018-12-13 16:33:37 +01:00
|
|
|
.POSIX:
|
|
|
|
|
2018-12-14 09:45:13 +01:00
|
|
|
MIFLORA_ADDR?=00:00:00:00:00:00
|
|
|
|
|
2018-12-13 16:33:37 +01:00
|
|
|
.PHONY: all
|
|
|
|
all: clean build test
|
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run: clean build test
|
2018-12-14 09:45:13 +01:00
|
|
|
sudo cmd/munin-miflora/munin-miflora xyz $(MIFLORA_ADDR)
|
2018-12-13 16:33:37 +01:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f cmd/munin-miflora/munin-miflora
|
2018-12-14 09:45:13 +01:00
|
|
|
rm -f cmd/munin-miflora/munin-miflora-gatt
|
2018-12-13 16:33:37 +01:00
|
|
|
|
|
|
|
.PHONY: build
|
2018-12-14 09:45:13 +01:00
|
|
|
build: cmd/munin-miflora/munin-miflora cmd/munin-miflora/munin-miflora-gatt
|
2018-12-13 16:33:37 +01:00
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: build
|
2018-12-14 13:34:16 +01:00
|
|
|
cd common && go test -v -race && cd ..
|
2018-12-13 16:33:37 +01:00
|
|
|
|
2018-12-14 09:45:13 +01:00
|
|
|
.PHONY: cmd/munin-miflora/munin-miflora
|
2018-12-13 16:33:37 +01:00
|
|
|
cmd/munin-miflora/munin-miflora:
|
|
|
|
cd cmd/munin-miflora && go build && cd ../..
|
2018-12-14 09:45:13 +01:00
|
|
|
|
|
|
|
.PHONY: cmd/munin-miflora/munin-miflora-gatt
|
|
|
|
cmd/munin-miflora/munin-miflora-gatt:
|
|
|
|
cd cmd/munin-miflora-gatt && go build && cd ../..
|