janet/Makefile

24 lines
498 B
Makefile

ESPHOMES = $(wildcard etc/*.yaml)
ESPHOMES_BIN = $(ESPHOMES:%.yaml=%.elf)
PLATFORMIO_BUILD_CACHE_DIR = $(PWD)/.cache
export PLATFORMIO_BUILD_CACHE_DIR
build:
pip3 install -r requirements.txt
flake8 janet
-mypy --ignore-missing-imports janet
esphomes: $(ESPHOMES_BIN)
etc/%.elf: etc/%.yaml
pip3 install esphome
cd $(<D) && esphome $(<F) compile
cp $(<D)/$*/.pioenvs/$*/firmware.elf $@
DESTDIR ?= dist
install:
-cp etc/*.elf $(DESTDIR)
python3 setup.py bdist -d $(DESTDIR)
.PHONY: build