blob: be34b045253adb0377afd4c84122cca4c5e8ddd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
PORT ?= ttyUSB0
ifeq ($(origin IDF_PATH),undefined)
IDF_ENV=0
else
IDF_ENV=1
endif
all: kociemba master slave
kociemba slave:
$(MAKE) -C $(shell pwd)/$@ all PROD=1
master:
ifeq ($(IDF_ENV), 1)
cd $(shell pwd)/$@ && PATH=$(PATH) idf.py build
else
@echo "FAILED: ESP-IDF export script is not sourced!"
@echo -e "\t(use 'source <esp-idf path>/export.sh')"
@exit 1
endif
run: kociemba slave master
ifeq ($(FLASH),1)
ifeq ($(IDF_ENV),1)
cd $(shell pwd)/master && idf.py flash -p $(PORT)
else
@echo "FAILED: FLASH is set to 1 but ESP-IDS export script is not sourced!"
@exit 1
endif
endif
$(MAKE) -C $(shell pwd)/kociemba run
.PHONY: all kociemba slave master run
|