File tree 2 files changed +17
-9
lines changed
2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 6
6
# file, You can obtain one at http://mozilla.org/MPL/2.0/
7
7
# }
8
8
9
- default : help
9
+ default : rule/ help
10
10
11
11
topdir? =${CURDIR}
12
12
extra_dir? =${topdir}/tmp
@@ -20,10 +20,10 @@ arduino_mk_url?=https://github.com/sudar/Arduino-Makefile
20
20
ARDMK_DIR? =${extra_dir}/arduino-mk
21
21
22
22
23
- help :
23
+ rule/ help :
24
24
@echo " # Usage:"
25
- @echo " # make setup # Will install tools and deps"
26
- @echo " # make all # Will build all examples"
25
+ @echo " # make rule/ setup # Will install tools and deps"
26
+ @echo " # make rule/ all # Will build all examples"
27
27
28
28
${ARDUINO_DIR} :
29
29
mkdir -p ${@ D}
@@ -60,10 +60,10 @@ rule/arduino_lib_dirs: ${ArduinoMDNS_dir} ${ArduinoJson_dir}
60
60
ls $^
61
61
# }
62
62
63
- setup : rule/arduino_dir rule/arduino_mk_dir rule/arduino_lib_dirs
63
+ rule/ setup : rule/arduino_dir rule/arduino_mk_dir rule/arduino_lib_dirs
64
64
sync
65
65
66
- all : $(wildcard examples/* /Makefile | sort)
66
+ rule/ all : $(wildcard examples/* /Makefile | sort)
67
67
for file in $^; do \
68
68
dirname =$$(dirname -- "$${file}" ) ; ${MAKE} -C $${dirname}; \
69
69
done
Original file line number Diff line number Diff line change 9
9
default : all
10
10
@echo " # $@ : $^"
11
11
12
- all : rule/setup
13
-
14
12
top_reldir? =../..
15
13
topdir? =${CURDIR}/${top_reldir}
14
+
16
15
-include ${topdir}/Makefile
17
16
18
17
AVR_TOOLS_DIR? =${ARDUINO_DIR}/hardware/tools/avr
@@ -26,7 +25,10 @@ BOARD_TAG=mega2560
26
25
BOARD_SUB =
27
26
MCU? =at${BOARD_TAG}
28
27
F_CPU? =16000000L
29
- MONITOR_PORT? =$(shell ls /dev/ttyUSB* /dev/ttyACM* | head -n1)
28
+ MONITOR_PORT? =$(shell ls /dev/ttyUSB* 2> /dev/null \
29
+ || ls /dev/ttyACM* 2> /dev/null \
30
+ || echo "/dev/TODO/setup/monitor" \
31
+ | sort | head -n1)
30
32
# }
31
33
32
34
ARCHITECTURE =avr
@@ -41,3 +43,9 @@ ARDUINO_LIBS += ArduinoMDNS
41
43
ARDUINO_LIBS += ArduinoJson
42
44
43
45
-include ${arduino_mk}
46
+
47
+ rule/setup :
48
+ @echo " Please setup your env to use ${arduino_mk} "
49
+
50
+ % : rule/setup
51
+ @echo " Please run \" make $@ \" again"
You can’t perform that action at this time.
0 commit comments