Browse Source

Don't build .lst files for PRODUCTION builds.
also, add more help text for MCUDude targets.

WestfW 6 years ago
parent
commit
a1a552222f

+ 37 - 9
optiboot/bootloaders/optiboot/Makefile

@@ -298,7 +298,9 @@ virboot8: AVR_FREQ ?= 16000000L
 # Start address of 1D80 allows for size up to 640 bytes, app up to 7552
 virboot8: LDSECTIONS  = -Wl,--section-start=.text=0x1d80 -Wl,--section-start=.version=0x1ffe
 virboot8: $(PROGRAM)_virboot8.hex
+ifndef PRODUCTION
 virboot8: $(PROGRAM)_virboot8.lst
+endif
 
 
 HELPTEXT += "target virboot328p   - ATmega328 with virtual boot partition\n"
@@ -308,7 +310,9 @@ virboot328: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT_PARTITION'
 virboot328: AVR_FREQ ?= 16000000L
 virboot328: LDSECTIONS  = -Wl,--section-start=.text=0x7d80 -Wl,--section-start=.version=0x7ffe
 virboot328: $(PROGRAM)_virboot328.hex
+ifndef PRODUCTION
 virboot328: $(PROGRAM)_virboot328.lst
+endif
 
 virboot328_isp: virboot328
 virboot328_isp: TARGET = virboot328
@@ -351,7 +355,9 @@ else
 atmega8: LDSECTIONS  = -Wl,--section-start=.text=0x1c00 -Wl,--section-start=.version=0x1ffe -Wl,--gc-sections -Wl,--undefined=optiboot_version
 endif
 atmega8: $(PROGRAM)_atmega8.hex
+ifndef PRODUCTION
 atmega8: $(PROGRAM)_atmega8.lst
+endif
 
 atmega8_isp: atmega8
 atmega8_isp: TARGET = atmega8
@@ -367,7 +373,7 @@ endif
 atmega8_isp: LFUSE ?= BF
 atmega8_isp: isp
 
-HELPTEXT += "target atmega168     - ATmega168, ATmega168A\n"
+HELPTEXT += "target atmega168*    - ATmega168/A, ATmega168P, ATMEGA1268PB\n"
 atmega168: TARGET = atmega168
 atmega168: MCU_TARGET = atmega168
 atmega168: CFLAGS += $(COMMON_OPTIONS)
@@ -378,7 +384,9 @@ else
 atmeg168: LDSECTIONS  = -Wl,--section-start=.text=0x3c00 -Wl,--section-start=.version=0x3ffe
 endif
 atmega168: $(PROGRAM)_atmega168.hex
+ifndef PRODUCTION
 atmega168: $(PROGRAM)_atmega168.lst
+endif
 
 atmega168_isp: atmega168
 atmega168_isp: TARGET = atmega168
@@ -395,7 +403,7 @@ atmega168_isp: EFUSE ?= FA
 endif
 atmega168_isp: isp
 
-HELPTEXT += "target atmega328     - ATmega328p\n"
+HELPTEXT += "target atmega328*    - ATmega328, ATmega328p, ATmega328pb\n"
 atmega328: TARGET = atmega328
 atmega328: MCU_TARGET = atmega328p
 atmega328: CFLAGS += $(COMMON_OPTIONS)
@@ -407,7 +415,9 @@ else
 atmega328: LDSECTIONS  = -Wl,--section-start=.text=0x7c00 -Wl,--section-start=.version=0x7ffe
 endif
 atmega328: $(PROGRAM)_atmega328.hex
+ifndef PRODUCTION
 atmega328: $(PROGRAM)_atmega328.lst
+endif
 
 atmega328_isp: atmega328
 atmega328_isp: TARGET = atmega328
@@ -432,7 +442,9 @@ atmega1280: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega1280: AVR_FREQ ?= 16000000L
 atmega1280: LDSECTIONS  = -Wl,--section-start=.text=0x1fc00  -Wl,--section-start=.version=0x1fffe
 atmega1280: $(PROGRAM)_atmega1280.hex
+ifndef PRODUCTION
 atmega1280: $(PROGRAM)_atmega1280.lst
+endif
 
 
 
@@ -454,7 +466,9 @@ pro20: CHIP = atmega168
 pro20:
 	"$(MAKE)" atmega168 AVR_FREQ=20000000L LED_START_FLASHES=3
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 pro20_isp: pro20
 pro20_isp: TARGET = pro_20mhz
@@ -463,7 +477,7 @@ pro20_isp: HFUSE ?= DC
 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
 pro20_isp: LFUSE ?= F7
 # 512 byte boot
-pro20_isp: EFUSE ?= 04
+pro20_isp: EFUSE ?= FC
 pro20_isp: isp
 
 # 16MHz clocked platforms
@@ -476,7 +490,9 @@ pro16: CHIP = atmega168
 pro16:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED_START_FLASHES=3
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 pro16_isp: pro16
 pro16_isp: TARGET = pro_16MHz
@@ -485,7 +501,7 @@ pro16_isp: HFUSE ?= DD
 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
 pro16_isp: LFUSE ?= F7
 # 512 byte boot
-pro16_isp: EFUSE ?= 04
+pro16_isp: EFUSE ?= FC
 pro16_isp: isp
 
 diecimila: TARGET = diecimila
@@ -493,7 +509,9 @@ diecimila: CHIP = atmega168
 diecimila:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED_START_FLASHES=3
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 diecimila_isp: diecimila
 diecimila_isp: TARGET = diecimila
@@ -502,7 +520,7 @@ diecimila_isp: HFUSE ?= DD
 # Low power xtal (16MHz) 16KCK/14CK+65ms
 diecimila_isp: LFUSE ?= F7
 # 512 byte boot
-diecimila_isp: EFUSE ?= 04
+diecimila_isp: EFUSE ?= FC
 diecimila_isp: isp
 
 # MEGA1280 Board (this is different from the atmega1280 chip platform)
@@ -535,7 +553,9 @@ lilypad: CHIP = atmega168
 lilypad:
 	"$(MAKE)" $(CHIP) AVR_FREQ=8000000L LED_START_FLASHES=3
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 lilypad_isp: lilypad
 lilypad_isp: TARGET = lilypad
@@ -544,7 +564,7 @@ lilypad_isp: HFUSE ?= DD
 # Internal 8MHz osc (8MHz) Slow rising power
 lilypad_isp: LFUSE ?= E2
 # 512 byte boot
-lilypad_isp: EFUSE ?= 04
+lilypad_isp: EFUSE ?= FC
 lilypad_isp: isp
 
 # lilypad_resonator is the same as a 8MHz lilypad, except for fuses.
@@ -557,7 +577,7 @@ lilypad_resonator_isp: HFUSE ?= DD
 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
 lilypad_resonator_isp: LFUSE ?= C6
 # 512 byte boot
-lilypad_resonator_isp: EFUSE ?= 04
+lilypad_resonator_isp: EFUSE ?= FC
 lilypad_resonator_isp: isp
 
 pro8: TARGET = pro_8MHz
@@ -565,7 +585,9 @@ pro8: CHIP = atmega168
 pro8:
 	"$(MAKE)" $(CHIP) AVR_FREQ=8000000L LED_START_FLASHES=3
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 pro8_isp: pro8
 pro8_isp: TARGET = pro_8MHz
@@ -574,7 +596,7 @@ pro8_isp: HFUSE ?= DD
 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
 pro8_isp: LFUSE ?= C6
 # 512 byte boot
-pro8_isp: EFUSE ?= 04
+pro8_isp: EFUSE ?= FC
 pro8_isp: isp
 
 atmega328_pro8: TARGET = atmega328_pro_8MHz
@@ -582,7 +604,9 @@ atmega328_pro8: CHIP = atmega328
 atmega328_pro8:
 	"$(MAKE)" $(CHIP) AVR_FREQ=8000000L LED_START_FLASHES=3
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 atmega328_pro8_isp: atmega328_pro8
 atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
@@ -592,7 +616,7 @@ atmega328_pro8_isp: HFUSE ?= DE
 # Low power xtal (16MHz) 16KCK/14CK+65ms
 atmega328_pro8_isp: LFUSE ?= FF
 # 2.7V brownout
-atmega328_pro8_isp: EFUSE ?= 05
+atmega328_pro8_isp: EFUSE ?= FD
 atmega328_pro8_isp: isp
 
 #
@@ -634,7 +658,11 @@ isp-stk500: $(PROGRAM)_$(TARGET).hex
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
 	$(SIZE) $@
 
+#windows "rm" is dumb and objects to wildcards that don't exist
 clean:
+	@touch  __temp_.o __temp_.elf __temp_.lst __temp_.map
+	@touch  __temp_.sym __temp_.lss __temp_.eep __temp_.srec
+	@touch __temp_.bin __temp_.hex __temp_.tmp.sh
 	rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex *.tmp.sh
 
 clean_asm:

+ 14 - 0
optiboot/bootloaders/optiboot/Makefile.1284

@@ -15,7 +15,9 @@ atmega644p: AVR_FREQ ?= 16000000L
 atmega644p: LDSECTIONS  = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega644p: CFLAGS += $(UART_CMD)
 atmega644p: $(PROGRAM)_atmega644p.hex
+ifndef PRODUCTION
 atmega644p: $(PROGRAM)_atmega644p.lst
+endif
 
 HELPTEXT += "target atmega1284    - ATmega1284p (40 pin, 128k)\n"
 atmega1284: TARGET = atmega1284p
@@ -25,7 +27,9 @@ atmega1284: AVR_FREQ ?= 16000000L
 atmega1284: LDSECTIONS  = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
 atmega1284: CFLAGS += $(UART_CMD)
 atmega1284: $(PROGRAM)_atmega1284p.hex
+ifndef PRODUCTION
 atmega1284: $(PROGRAM)_atmega1284p.lst
+endif
 
 atmega1284p: atmega1284
 
@@ -52,7 +56,9 @@ sanguino: CHIP = atmega644p
 sanguino:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B0
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 sanguino_isp: sanguino
 sanguino_isp: TARGET = sanguino
@@ -71,7 +77,9 @@ mighty1284: CHIP = atmega1284p
 mighty1284:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B7
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 mighty1284_isp: mighty1284
 mighty1284_isp: TARGET = mighty1284
@@ -90,7 +98,9 @@ bobuino: CHIP = atmega1284p
 bobuino:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B7
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 bobuino_isp: bobuino
 bobuino_isp: TARGET = bobuino
@@ -113,7 +123,9 @@ wildfirev2: CHIP = atmega1284p
 wildfirev2:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B7 BAUD_RATE=1000000
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 wildfirev2_isp: wildfirev2
 wildfirev2_isp: TARGET = wildfirev2
@@ -132,7 +144,9 @@ wildfirev3: CHIP = atmega1284p
 wildfirev3:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B5
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 wildfirev3_isp: wildfirev3
 wildfirev3_isp: TARGET = wildfirev3

+ 4 - 0
optiboot/bootloaders/optiboot/Makefile.2560

@@ -15,7 +15,9 @@ atmega2560: AVR_FREQ ?= 16000000L
 atmega2560: LDSECTIONS  = -Wl,--section-start=.text=0x3fc00 -Wl,--section-start=.version=0x3fffe
 atmega2560: CFLAGS += $(UART_CMD)
 atmega2560: $(PROGRAM)_atmega2560.hex
+ifndef PRODUCTION
 atmega2560: $(PROGRAM)_atmega2560.lst
+endif
 
 
 atmega2560_isp: atmega2560
@@ -41,7 +43,9 @@ mega2560: CHIP = atmega2560
 mega2560:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 mega2560_isp: mega256
 mega2560_isp: TARGET = mega2560

+ 75 - 0
optiboot/bootloaders/optiboot/Makefile.MCUdude

@@ -7,6 +7,19 @@
 # * of AVR_FREQ, BAUD_RATE, and UART are built by a shell script.
 # */
 
+HELPTEXT += "\n target atmega1280    - ATmega1280 (100pin, 128k)\n"
+HELPTEXT += "target atmega88*     - Atmega88, ATmega88P, ATmega88PB\n"
+HELPTEXT += "target atmega16, atmega32, atmega64 - 40pin ATmegas\n"
+HELPTEXT += "target atmega164*, atmega324* - newer 40pin ATmegas\n"
+HELPTEXT += "target atmega644p, atmega1284* - newer 40pin ATmegas\n"
+HELPTEXT += "target atmega128, atmega1281, atmega2561 - 64pin ATmegas\n"
+HELPTEXT += "target atmega169, atmega329, atmega649\n"
+HELPTEXT += "target atmega640, atmega1280, atmega2560 - 100pin ATmegas\n"
+HELPTEXT += "target atmega162\n"
+HELPTEXT += "target atmega3290, atmega6490\n"
+HELPTEXT += "target atmega8515,atmega8535 - legacy 40pin chips\n"
+
+
 #ATmega16/A
 atmega16: TARGET = atmega16
 atmega16: MCU_TARGET = atmega16
@@ -14,7 +27,9 @@ atmega16: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega16: AVR_FREQ ?= 16000000L
 atmega16: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega16: $(PROGRAM)_atmega16_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega16: $(PROGRAM)_atmega16_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega16a: atmega16
 
 #ATmega64/A
@@ -24,7 +39,9 @@ atmega64: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega64: AVR_FREQ ?= 16000000L
 atmega64: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega64: $(PROGRAM)_atmega64_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega64: $(PROGRAM)_atmega64_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega64a: atmega64
 
 #ATmega88P/PA
@@ -34,7 +51,9 @@ atmega88p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega88p: AVR_FREQ ?= 16000000L 
 atmega88p: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe -Wl,--gc-sections -Wl,--undefined=optiboot_version
 atmega88p: $(PROGRAM)_atmega88p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega88p: $(PROGRAM)_atmega88p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega88pa: atmega88p
 
 #ATmega8PB
@@ -44,7 +63,9 @@ atmega88pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega88pb: AVR_FREQ ?= 16000000L
 atmega88pb: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe -Wl,--gc-sections -Wl,--undefined=optiboot_version
 atmega88pb: $(PROGRAM)_atmega88pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega88pb: $(PROGRAM)_atmega88pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega128/A
 atmega128: TARGET = atmega128
@@ -53,7 +74,9 @@ atmega128: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega128: AVR_FREQ ?= 16000000L
 atmega128: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
 atmega128: $(PROGRAM)_atmega128_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega128: $(PROGRAM)_atmega128_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega128a: atmega128
 
 #ATmega162
@@ -63,7 +86,9 @@ atmega162: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega162: AVR_FREQ ?= 16000000L
 atmega162: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega162: $(PROGRAM)_atmega162_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega162: $(PROGRAM)_atmega162_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega164/A
 atmega164a: TARGET = atmega164a
@@ -72,7 +97,9 @@ atmega164a: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega164a: AVR_FREQ ?= 16000000L
 atmega164a: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega164a: $(PROGRAM)_atmega164a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega164a: $(PROGRAM)_atmega164a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega164: atmega164a
 
 #ATmega164P/PA
@@ -82,7 +109,9 @@ atmega164p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega164p: AVR_FREQ ?= 16000000L
 atmega164p: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega164p: $(PROGRAM)_atmega164p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega164p: $(PROGRAM)_atmega164p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega164pa: atmega164p
 
 #ATmega168/A
@@ -92,7 +121,9 @@ atmega168: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega168: AVR_FREQ ?= 16000000L 
 atmega168: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega168: $(PROGRAM)_atmega168_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega168: $(PROGRAM)_atmega168_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega168a: atmega168
 
 #ATmega168P/PA
@@ -102,7 +133,9 @@ atmega168p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega168p: AVR_FREQ ?= 16000000L 
 atmega168p: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega168p: $(PROGRAM)_atmega168p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega168p: $(PROGRAM)_atmega168p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega168pa: atmega168p
 
 #ATmega168PB
@@ -112,7 +145,9 @@ atmega168pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega168pb: AVR_FREQ ?= 16000000L 
 atmega168pb: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega168pb: $(PROGRAM)_atmega168pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega168pb: $(PROGRAM)_atmega168pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega169/A
 atmega169: TARGET = atmega169
@@ -121,7 +156,9 @@ atmega169: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega169: AVR_FREQ ?= 16000000L
 atmega169: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega169: $(PROGRAM)_atmega169_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega169: $(PROGRAM)_atmega169_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega169a: atmega169
 
 #ATmega169P/PA
@@ -131,7 +168,9 @@ atmega169p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega169p: AVR_FREQ ?= 16000000L
 atmega169p: LDSECTIONS = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 atmega169p: $(PROGRAM)_atmega169p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega169p: $(PROGRAM)_atmega169p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega169pa: atmega169
 
 #ATmega324A
@@ -141,7 +180,9 @@ atmega324a: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega324a: AVR_FREQ ?= 16000000L
 atmega324a: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega324a: $(PROGRAM)_atmega324a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega324a: $(PROGRAM)_atmega324a_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega324: atmega324a
 
 #ATmega324P
@@ -151,7 +192,9 @@ atmega324p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega324p: AVR_FREQ ?= 16000000L
 atmega324p: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega324p: $(PROGRAM)_atmega324p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega324p: $(PROGRAM)_atmega324p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega324PA
 atmega324pa: TARGET = atmega324pa
@@ -160,7 +203,9 @@ atmega324pa: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega324pa: AVR_FREQ ?= 16000000L
 atmega324pa: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega324pa: $(PROGRAM)_atmega324pa_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega324pa: $(PROGRAM)_atmega324pa_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega324PB
 atmega324pb: TARGET = atmega324pb
@@ -169,7 +214,9 @@ atmega324pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega324pb: AVR_FREQ ?= 16000000L
 atmega324pb: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega324pb: $(PROGRAM)_atmega324pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega324pb: $(PROGRAM)_atmega324pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega328PB
 atmega328pb: TARGET = atmega328pb
@@ -178,7 +225,9 @@ atmega328pb: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega328pb: AVR_FREQ ?= 16000000L
 atmega328pb: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega328pb: $(PROGRAM)_atmega328pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega328pb: $(PROGRAM)_atmega328pb_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega329/A
 atmega329: TARGET = atmega329
@@ -187,7 +236,9 @@ atmega329: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega329: AVR_FREQ ?= 16000000L
 atmega329: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega329: $(PROGRAM)_atmega329_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega329: $(PROGRAM)_atmega329_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega329a: atmega329
 
 #ATmega329P/PA
@@ -197,7 +248,9 @@ atmega329p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega329p: AVR_FREQ ?= 16000000L
 atmega329p: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega329p: $(PROGRAM)_atmega329p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega329p: $(PROGRAM)_atmega329p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega329pa: atmega329p
 
 #ATmega640
@@ -207,7 +260,9 @@ atmega640: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega640: AVR_FREQ ?= 16000000L
 atmega640: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega640: $(PROGRAM)_atmega640_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega640: $(PROGRAM)_atmega640_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega649
 atmega649: TARGET = atmega649
@@ -216,7 +271,9 @@ atmega649: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega649: AVR_FREQ ?= 16000000L
 atmega649: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega649: $(PROGRAM)_atmega649_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega649: $(PROGRAM)_atmega649_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega649P
 atmega649p: TARGET = atmega649p
@@ -225,7 +282,9 @@ atmega649p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega649p: AVR_FREQ ?= 16000000L
 atmega649p: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega649p: $(PROGRAM)_atmega649p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega649p: $(PROGRAM)_atmega649p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega1281
 atmega1281: TARGET = atmega1281
@@ -234,7 +293,9 @@ atmega1281: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega1281: AVR_FREQ ?= 16000000L
 atmega1281: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
 atmega1281: $(PROGRAM)_atmega1281_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega1281: $(PROGRAM)_atmega1281_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega2561
 atmega2561: TARGET = atmega2561
@@ -243,7 +304,9 @@ atmega2561: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega2561: AVR_FREQ ?= 16000000L
 atmega2561: LDSECTIONS = -Wl,--section-start=.text=0x3fc00 -Wl,--section-start=.version=0x3fffe
 atmega2561: $(PROGRAM)_atmega2561_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega2561: $(PROGRAM)_atmega2561_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega3290
 atmega3290: TARGET = atmega3290
@@ -252,7 +315,9 @@ atmega3290: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega3290: AVR_FREQ ?= 16000000L
 atmega3290: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega3290: $(PROGRAM)_atmega3290_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega3290: $(PROGRAM)_atmega3290_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega3290P/PA
 atmega3290p: TARGET = atmega3290p
@@ -261,7 +326,9 @@ atmega3290p: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega3290p: AVR_FREQ ?= 16000000L
 atmega3290p: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 atmega3290p: $(PROGRAM)_atmega3290p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega3290p: $(PROGRAM)_atmega3290p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 atmega3290pa: atmega3290p
 
 #ATmega6490
@@ -271,7 +338,9 @@ atmega6490: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega6490: AVR_FREQ ?= 16000000L
 atmega6490: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega6490: $(PROGRAM)_atmega6490_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega6490: $(PROGRAM)_atmega6490_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega6490P
 atmega6490p: TARGET = atmega6490p
@@ -280,7 +349,9 @@ atmega6490p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT $(UART_CMD)
 atmega6490p: AVR_FREQ ?= 16000000L
 atmega6490p: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
 atmega6490p: $(PROGRAM)_atmega6490p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega6490p: $(PROGRAM)_atmega6490p_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega8515
 atmega8515: TARGET = atmega8515
@@ -289,7 +360,9 @@ atmega8515: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega8515: AVR_FREQ ?= 16000000L
 atmega8515: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
 atmega8515: $(PROGRAM)_atmega8515_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega8515: $(PROGRAM)_atmega8515_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 
 #ATmega8535
 atmega8535: TARGET := atmega8535
@@ -298,5 +371,7 @@ atmega8535: CFLAGS += $(COMMON_OPTIONS) $(UART_CMD)
 atmega8535: AVR_FREQ ?= 16000000L
 atmega8535: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
 atmega8535: $(PROGRAM)_atmega8535_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).hex
+ifndef PRODUCTION
 atmega8535: $(PROGRAM)_atmega8535_UART$(UART)_$(BAUD_RATE)_$(AVR_FREQ).lst
+endif
 

+ 6 - 0
optiboot/bootloaders/optiboot/Makefile.atmel

@@ -18,7 +18,9 @@ xplained168pb: CHIP = atmega168
 xplained168pb:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L BAUD_RATE=57600
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 HELPTEXT += "target xplained328pb - Atmel Xplained Mini 328pb Eval board\n"
 xplained328pb: TARGET = $@
@@ -26,7 +28,9 @@ xplained328pb: CHIP = atmega328
 xplained328pb:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L BAUD_RATE=57600
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 
 HELPTEXT += "target xplained328p  - Atmel Xplained Mini 328p Eval board\n"
 xplained328p: TARGET = $@
@@ -34,4 +38,6 @@ xplained328p: CHIP = atmega328
 xplained328p:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L BAUD_RATE=57600
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif

+ 2 - 0
optiboot/bootloaders/optiboot/Makefile.custom

@@ -12,5 +12,7 @@ wildfire: CHIP = atmega1284p
 wildfire:
 	"$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B5
 	mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
+endif
 

+ 91 - 1
optiboot/bootloaders/optiboot/Makefile.tiny

@@ -2,7 +2,7 @@
 # ATtiny 1634, Base instructions
 #-------------------------------
 
-HELPTEXT += "target attiny1634    - atttiny1634at<freq>  attiny1634at<freq>ser1\n"
+HELPTEXT += "\n target attiny1634    - atttiny1634at<freq>  attiny1634at<freq>ser1\n"
 HELPTEXT += "                     - atttiny1634at8_5v  attiny1634at8_5vser1\n"
 
 attiny1634:	TARGET = attiny1634
@@ -12,7 +12,9 @@ attiny1634: CFLAGS += $(COMMON_OPTIONS) -DVIRTUAL_BOOT_PARTITION -DFOURPAGEERASE
 attiny1634: AVR_FREQ ?= 8000000L
 attiny1634: LDSECTIONS  = -Wl,--section-start=.text=0x3d80 -Wl,--section-start=.version=0x3ffe
 attiny1634: $(PROGRAM)_attiny1634.hex
+ifndef PRODUCTION
 attiny1634: $(PROGRAM)_attiny1634.lst
+endif
 
 
 #-----------------------
@@ -21,42 +23,58 @@ attiny1634: $(PROGRAM)_attiny1634.lst
 attiny1634at12:
 	"$(MAKE)" attiny1634	AVR_FREQ=12000000L
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at16:
 	"$(MAKE)" attiny1634	AVR_FREQ=16000000L
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at8:
 	"$(MAKE)" attiny1634	AVR_FREQ=8000000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at8_5v:
 	"$(MAKE)" attiny1634	AVR_FREQ=8200000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at737:
 	"$(MAKE)" attiny1634	AVR_FREQ=7372800L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at921:
 	"$(MAKE)" attiny1634	AVR_FREQ=9216000L  BAUD_RATE=57600
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at110:
 	"$(MAKE)" attiny1634	AVR_FREQ=11059200L
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at147:
 	"$(MAKE)" attiny1634	AVR_FREQ=14745600L
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 
 
@@ -67,42 +85,58 @@ attiny1634at147:
 attiny1634at12ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=12000000L UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at16ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=16000000L UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at8ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=8000000L BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at8_5vser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=8200000L BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at737ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=7372800L BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at921ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=9216000L  BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at110ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=11059200L UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 attiny1634at147ser1:
 	"$(MAKE)" attiny1634	AVR_FREQ=14745600L UART=1
 	mv $(PROGRAM)_attiny1634.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny1634.lst $(PROGRAM)_$@.lst
+endif
 
 
 
@@ -120,7 +154,9 @@ attiny841: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT_PARTITION' '-DFOURPAGEERA
 attiny841: AVR_FREQ ?= 8000000L
 attiny841: LDSECTIONS  = -Wl,--section-start=.text=0x1d80 -Wl,--section-start=.version=0x1ffe
 attiny841: $(PROGRAM)_attiny841.hex
+ifndef PRODUCTION
 attiny841: $(PROGRAM)_attiny841.lst
+endif
 
 #-----------------------
 # ATtiny 841, UART 0 
@@ -128,52 +164,72 @@ attiny841: $(PROGRAM)_attiny841.lst
 attiny841at184:
 	$(MAKE) attiny841	 AVR_FREQ=18432000L
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at147:
 	$(MAKE) attiny841	 AVR_FREQ=14745600L
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at110:
 	$(MAKE) attiny841	 AVR_FREQ=11059200L
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at921:
 	$(MAKE) attiny841	 AVR_FREQ=9216000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at737:
 	$(MAKE) attiny841	 AVR_FREQ=7372800L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at20:
 	$(MAKE) attiny841	 AVR_FREQ=20000000L
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at16:
 	$(MAKE) attiny841	 AVR_FREQ=16000000L
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at12:
 	$(MAKE) attiny841	 AVR_FREQ=12000000L
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at8:
 	$(MAKE) attiny841	 AVR_FREQ=8000000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at8_5v:
 	$(MAKE) attiny841	 AVR_FREQ=8200000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 
 
@@ -183,47 +239,65 @@ attiny841at8_5v:
 attiny841at184ser1:
 	$(MAKE) attiny841	 AVR_FREQ=18432000L UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at147ser1:
 	$(MAKE) attiny841	 AVR_FREQ=14745600L UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at110ser1:
 	$(MAKE) attiny841	 AVR_FREQ=11059200L UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at921ser1:
 	$(MAKE) attiny841	 AVR_FREQ=9216000L BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at737ser1:
 	$(MAKE) attiny841	 AVR_FREQ=7372800L BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at20ser1:
 	$(MAKE) attiny841	 AVR_FREQ=20000000L UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at16ser1:
 	$(MAKE) attiny841	 AVR_FREQ=16000000L UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at12ser1:
 	$(MAKE) attiny841	 AVR_FREQ=12000000L UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at8ser1:
 	$(MAKE) attiny841	 AVR_FREQ=8000000L BAUD_RATE=57600 UART=1
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 #-----------------------
 # ATtiny 841, UART 0, no LED
@@ -234,17 +308,23 @@ attiny841at8ser1:
 attiny841at20noLED:
 	$(MAKE) attiny841	 AVR_FREQ=20000000L LED_START_FLASHES=0
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at16noLED:
 	$(MAKE) attiny841	 AVR_FREQ=16000000L LED_START_FLASHES=0
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 attiny841at8noLED:
 	$(MAKE) attiny841	 AVR_FREQ=8000000L  BAUD_RATE=57600 LED_START_FLASHES=0
 	mv $(PROGRAM)_attiny841.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny841.lst $(PROGRAM)_$@.lst
+endif
 
 
 #-------------------
@@ -260,18 +340,24 @@ attiny828: CFLAGS += $(COMMON_OPTIONS) '-DBAUD_RATE=57600'
 attiny828: AVR_FREQ ?= 8000000L
 attiny828: LDSECTIONS  = -Wl,--section-start=.text=0x1E00 -Wl,--section-start=.version=0x1ffe
 attiny828: $(PROGRAM)_attiny828.hex
+ifndef PRODUCTION
 attiny828: $(PROGRAM)_attiny828.lst
+endif
 
 
 attiny828at8: 
 	$(MAKE) attiny828at8 AVR_FREQ=8000000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny828.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny828.lst $(PROGRAM)_$@.lst
+endif
 
 attiny828at8_5v: 
 	$(MAKE) attiny828at8 AVR_FREQ=8200000L BAUD_RATE=57600
 	mv $(PROGRAM)_attiny828.hex $(PROGRAM)_$@.hex
+ifndef PRODUCTION
 	mv $(PROGRAM)_attiny828.lst $(PROGRAM)_$@.lst
+endif
 
 
 
@@ -287,7 +373,9 @@ attiny167: AVR_FREQ ?= 8000000L
 attiny167: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT_PARTITION' '-DBAUD_RATE=57600'
 attiny167: LDSECTIONS  = -Wl,--section-start=.text=0x1d80 -Wl,--section-start=.version=0x1ffe
 attiny167: $(PROGRAM)_attiny167.hex
+ifndef PRODUCTION
 attiny167: $(PROGRAM)_attiny167.lst
+endif
 
 
 attiny87: TARGET = attiny87
@@ -296,4 +384,6 @@ attiny87: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT_PARTITION' '-DBAUD_RATE=57
 attiny87: AVR_FREQ ?= 8000000L
 attiny87: LDSECTIONS  = -Wl,--section-start=.text=0x1d80 -Wl,--section-start=.version=0x1ffe
 attiny87: $(PROGRAM)_attiny87.hex
+ifndef PRODUCTION
 attiny87: $(PROGRAM)_attiny87.lst
+endif