correct makefile

This commit is contained in:
Cedric Girard 2019-05-07 19:56:11 +02:00
parent 5adbc0c4e2
commit e515beb4d0
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4

View file

@ -1,6 +1,7 @@
FQBN := esp32:esp32:esp32
SOURCE := esp32-env-monitor.ino
TARGET := $(addsuffix .$(subst :,.,$(FQBN)).bin, $(SOURCE))
NAME := esp32-env-monitor
SOURCE := $(addsuffix .ino, $(NAME)) wifi_login.h
TARGET := $(addsuffix .$(subst :,.,$(FQBN)).bin, $(NAME))
ESPTOOL := ~/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py
PORT := /dev/ttyUSB0
ADDRESS := 0x10000
@ -16,4 +17,4 @@ upload: $(TARGET)
$(ESPTOOL) --port $(PORT) write_flash $(ADDRESS) $(TARGET)
$(TARGET): $(SOURCE)
ARDUINO_SKETCHBOOK_DIR=$(CURDIR) arduino-cli compile -b $(FQBN) $(SOURCE)
ARDUINO_SKETCHBOOK_DIR=$(CURDIR) arduino-cli compile -b $(FQBN)