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