aboutsummaryrefslogblamecommitdiff
path: root/Makefile
blob: 9c067d93c75b2b560f85e2b209851784a96769dd (plain) (tree)































                                                                                                                 
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