-#\r
-# LUFA Library\r
-# Copyright (C) Dean Camera, 2012.\r
-#\r
-# dean [at] fourwalledcubicle [dot] com\r
-# www.lufa-lib.org\r
-#\r
-\r
-# Makefile for the bootloader build test. This\r
-# test attempts to build all the bootloaders\r
-# with all supported device configurations.\r
-\r
-# Path to the root of the LUFA tree to scan\r
-LUFA_ROOT_PATH = ../..\r
-\r
-\r
-all: begin testbootloaders clean end\r
-\r
-begin:\r
- @echo Executing build test "BootloaderTest".\r
- @echo\r
-\r
-end:\r
- @echo Build test "BootloaderTest" complete.\r
- @echo\r
- \r
-testbootloaders:\r
- @echo "buildtest:" > BuildMakefile\r
- \r
- @while read line; \\r
- do \\r
- build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \\r
- \\r
- if ( test -n "$$build_cfg" ); then \\r
- build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \\r
- build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \\r
- \\r
- build_arch=`echo $$build_cfg | cut -d':' -f1`; \\r
- build_mcu=`echo $$build_cfg | cut -d':' -f2`; \\r
- build_board=`echo $$build_cfg | cut -d':' -f3`; \\r
- build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \\r
- build_bootsize=`echo $$build_cfg | cut -d':' -f5`; \\r
- \\r
- printf "Found bootloader configuration for bootloader '%s' (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch; \\r
- \\r
- printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \\r
- printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ clean\n" $$build_bootloader >> BuildMakefile; \\r
- printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s elf\n\n" $$build_bootloader $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \\r
- fi; \\r
- done < BootloaderDeviceMap.cfg\r
- \r
- $(MAKE) -f BuildMakefile buildtest\r
-\r
-clean:\r
- rm -f BuildMakefile\r
-\r
-%:\r
-
\ No newline at end of file
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2012.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+# Makefile for the bootloader build test. This
+# test attempts to build all the bootloaders
+# with all supported device configurations.
+
+# Path to the LUFA library core
+LUFA_PATH := ../../LUFA/
+
+# Build test cannot be run with multiple parallel jobs
+.NOTPARALLEL:
+
+all: begin testbootloaders clean end
+
+begin:
+ @echo Executing build test "BootloaderTest".
+ @echo
+
+end:
+ @echo Build test "BootloaderTest" complete.
+ @echo
+
+testbootloaders:
+ @echo "buildtest:" > BuildMakefile
+
+ @while read line; \
+ do \
+ build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \
+ \
+ if ( test -n "$$build_cfg" ); then \
+ build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
+ build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \
+ \
+ build_arch=`echo $$build_cfg | cut -d':' -f1`; \
+ build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
+ build_board=`echo $$build_cfg | cut -d':' -f3`; \
+ build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \
+ build_bootsize=`echo $$build_cfg | cut -d':' -f5`; \
+ \
+ printf "Found '%s' bootloader configuration (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch; \
+ \
+ printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \
+ printf "\t$(MAKE) -C $(patsubst %/,%,$(LUFA_PATH))/../Bootloaders/%s/ clean elf ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s DEBUG_LEVEL=0\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \
+ fi; \
+ done < BootloaderDeviceMap.cfg
+
+ $(MAKE) -f BuildMakefile buildtest
+
+clean:
+ rm -f BuildMakefile
+
+%:
+
+.PHONY: all begin end testbootloaders clean
+
+# Include LUFA build script makefiles
+include $(LUFA_PATH)/Build/lufa_core.mk