aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..acb3ad8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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