aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/LowLevel')
-rw-r--r--Demos/Device/LowLevel/AudioInput/makefile5
-rw-r--r--Demos/Device/LowLevel/AudioOutput/makefile5
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/makefile5
-rw-r--r--Demos/Device/LowLevel/GenericHID/makefile5
-rw-r--r--Demos/Device/LowLevel/Joystick/makefile5
-rw-r--r--Demos/Device/LowLevel/Keyboard/makefile5
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/makefile5
-rw-r--r--Demos/Device/LowLevel/MIDI/makefile5
-rw-r--r--Demos/Device/LowLevel/MassStorage/makefile5
-rw-r--r--Demos/Device/LowLevel/Mouse/makefile5
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/makefile5
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/makefile5
12 files changed, 48 insertions, 12 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile
index dc7fa47ee..27ae109e1 100644
--- a/Demos/Device/LowLevel/AudioInput/makefile
+++ b/Demos/Device/LowLevel/AudioInput/makefile
@@ -491,7 +491,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/AudioOutput/makefile b/Demos/Device/LowLevel/AudioOutput/makefile
index 9e61803e7..c8dcbd298 100644
--- a/Demos/Device/LowLevel/AudioOutput/makefile
+++ b/Demos/Device/LowLevel/AudioOutput/makefile
@@ -493,7 +493,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/makefile b/Demos/Device/LowLevel/DualVirtualSerial/makefile
index c9f49a559..2ee5ac6e2 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/makefile
+++ b/Demos/Device/LowLevel/DualVirtualSerial/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/GenericHID/makefile b/Demos/Device/LowLevel/GenericHID/makefile
index abf347593..547f666b3 100644
--- a/Demos/Device/LowLevel/GenericHID/makefile
+++ b/Demos/Device/LowLevel/GenericHID/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/Joystick/makefile b/Demos/Device/LowLevel/Joystick/makefile
index 329163ee8..7037ec677 100644
--- a/Demos/Device/LowLevel/Joystick/makefile
+++ b/Demos/Device/LowLevel/Joystick/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/Keyboard/makefile b/Demos/Device/LowLevel/Keyboard/makefile
index 00892d9d8..eb48a2424 100644
--- a/Demos/Device/LowLevel/Keyboard/makefile
+++ b/Demos/Device/LowLevel/Keyboard/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/KeyboardMouse/makefile b/Demos/Device/LowLevel/KeyboardMouse/makefile
index eeee41e06..e92fb23a7 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/makefile
+++ b/Demos/Device/LowLevel/KeyboardMouse/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/MIDI/makefile b/Demos/Device/LowLevel/MIDI/makefile
index 308933252..92fd68519 100644
--- a/Demos/Device/LowLevel/MIDI/makefile
+++ b/Demos/Device/LowLevel/MIDI/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/MassStorage/makefile b/Demos/Device/LowLevel/MassStorage/makefile
index e1447cea2..4e8dd8c4d 100644
--- a/Demos/Device/LowLevel/MassStorage/makefile
+++ b/Demos/Device/LowLevel/MassStorage/makefile
@@ -492,7 +492,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/Mouse/makefile b/Demos/Device/LowLevel/Mouse/makefile
index 744da6b5a..348afedbd 100644
--- a/Demos/Device/LowLevel/Mouse/makefile
+++ b/Demos/Device/LowLevel/Mouse/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile
index 3e57640f7..8adb5312e 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/makefile
+++ b/Demos/Device/LowLevel/RNDISEthernet/makefile
@@ -510,7 +510,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/VirtualSerial/makefile b/Demos/Device/LowLevel/VirtualSerial/makefile
index c0d989e87..41cb02a1f 100644
--- a/Demos/Device/LowLevel/VirtualSerial/makefile
+++ b/Demos/Device/LowLevel/VirtualSerial/makefile
@@ -490,7 +490,10 @@ end:
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
sizebefore:
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \