Created
November 4, 2020 05:19
-
-
Save spro/6139930fd9bfb6b240dfe4078b8c9f21 to your computer and use it in GitHub Desktop.
Example makefile for ESP8266/ESP32 with NodeMCU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PORT=/dev/cu.usbserial-AL00FP1H | |
LUAS=name.lc helpers.lc sta.lc blink.lc tcpclient.lc ir.lc | |
all: name init $(LUAS) | |
init: | |
nodemcu-tool -p $(PORT) upload init.lua | |
name: | |
@[ "${DEVICE_NAME}" ] || ( echo ">> DEVICE_NAME is not set"; exit 1 ) | |
echo "DEVICE_NAME = '$(DEVICE_NAME)'" > name.lua | |
nodemcu-tool -p $(PORT) upload --minify --compile name.lua | |
%.lc: %.lua | |
nodemcu-tool -p $(PORT) upload --minify --compile $< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment