aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: acb3ad83a38f7143947f2fea4485d2f1cfa7695a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
all: $(SOURCES:%.lua=%.up)

ifeq ($H,)
MYDIR = $(dir $(lastword $(MAKEFILE_LIST)))
UPLOAD = python $(MYDIR)/../nodemcu-uploader/nodemcu-uploader.py upload $<:$(notdir $<)
else
UPLOAD = curl http://$H/upload/$(notdir $<) --data-binary @$<
endif

%.up: %.lua
	$(UPLOAD)
	touch $@

.PHONY: salon chambre
salon chambre: %:
	$(MAKE) -C $@

serial:
	rlwrap serial -c /dev/ttyUSB0