File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ #
3
+ #
4
+
5
+ SKETCH := CameraWebServer.ino
6
+
7
+ BOARD := esp32:esp32:esp32cam
8
+ PACKAGE_URL := https://dl.espressif.com/dl/package_esp32_index.json
9
+
10
+ BOARD_FILENAME_SLUG := $(subst :,.,$(BOARD ) )
11
+
12
+ all : $(SKETCH ) .$(BOARD_FILENAME_SLUG ) .bin
13
+
14
+ # I dont want to use curl|sh, but this is the documented install method ...
15
+ ARDUINO_URL := https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh
16
+ bin/arduino-cli : /usr/bin/curl
17
+ curl -fsSL $(ARDUINO_URL ) | sh
18
+
19
+ .PHONY : $(BOARD_FILENAME_SLUG )
20
+ $(BOARD_FILENAME_SLUG ) : bin/arduino-cli
21
+ ~ /bin/arduino-cli config init --additional-urls $(PACKAGE_URL )
22
+ ~ /bin/arduino-cli core update-index
23
+ arduino-cli core install esp32:esp32
24
+
25
+ build-deps :
26
+ sudo apt-get -y install curl
27
+ $(MAKE ) $(BOARD_FILENAME_SLUG )
28
+
29
+ % .ino.$(BOARD_FILENAME_SLUG ) .bin : % .ino
30
+ arduino-cli compile -b $(BOARD ) $<
You can’t perform that action at this time.
0 commit comments