summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-01-21 22:59:49 +0100
committerAki <please@ignore.pl>2024-01-21 23:02:51 +0100
commit188b980b2597d39052004cb56277b1684df0007d (patch)
treeddabfa6437968400e03085d5eaae9a8d2168add5
parentba663a7dab9c132695da3ff949cbedc516817a13 (diff)
downloadnodemcu-wakeup-188b980b2597d39052004cb56277b1684df0007d.zip
nodemcu-wakeup-188b980b2597d39052004cb56277b1684df0007d.tar.gz
nodemcu-wakeup-188b980b2597d39052004cb56277b1684df0007d.tar.bz2
Added makefile to handle subsequent transfers faster
-rw-r--r--.gitignore1
-rw-r--r--Makefile24
2 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index ae1c106..cf977ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
+wakeup.lua
.venv/
+.upload-marker
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f0fd6d1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+MARKER=.upload-marker
+PORT=/dev/ttyUSB0
+
+
+upload: $(MARKER)
+
+
+$(MARKER): run.lua
+$(MARKER): +wakeup.lua
+$(MARKER): wakeup.lua
+$(MARKER):
+ nodemcu-uploader -p $(PORT) upload $?
+ @touch $@
+
+
+upload_init:
+ nodemcu-uploader -p $(PORT) upload init.lua
+
+
+clean:
+ rm -f $(MARKER)
+
+
+.PHONY: upload upload_init clean