aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9c067d9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+BOARD_MANAGER_URLS := https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
+BOARD := esp32:esp32:esp32da
+.PHONY: upload configure clean
+
+build/hydroponics_broker.ino.bin: hydroponics_broker.ino
+ arduino --board ${BOARD} \
+ --verify \
+ --verbose \
+ --pref build.path=build \
+ --preserve-temp-files \
+ $<
+
+upload: hydroponics_broker.ino
+ arduino --board ${BOARD} \
+ --upload \
+ --verbose \
+ --verbose-upload \
+ --preserve-temp-files \
+ --port /dev/ttyUSB0 \
+ --pref upload.speed=9600 \
+ --pref upload.erase_cmd=-e \
+ $<
+
+configure:
+ ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=${BOARD_MANAGER_URLS} \
+ arduino --install-boards esp32:esp32
+ arduino --install-library OneWire
+ arduino --install-library PubSubClient
+ arduino --install-library DallasTemperature
+
+clean:
+ rm -rf build