3 # Copyright (C) Dean Camera, 2011.
5 # dean [at] fourwalledcubicle [dot] com
9 # Makefile for the bootloader build test. This
10 # test attempts to build all the bootloaders
11 # with all supported device configurations.
13 # Path to the root of the LUFA tree to scan
14 LUFA_ROOT_PATH = ../..
17 all: begin testbootloaders clean end
20 @echo Executing build test "BootloaderTest".
24 @echo Build test "BootloaderTest" complete.
28 @echo "buildtest:" > BuildMakefile
32 build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \
34 if ( test -n "$$build_cfg" ); then \
35 build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
36 build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \
38 build_arch=`echo $$build_cfg | cut -d':' -f1`; \
39 build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
40 build_board=`echo $$build_cfg | cut -d':' -f3`; \
41 build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \
42 build_bootsize=`echo $$build_cfg | cut -d':' -f5`; \
44 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; \
46 printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \
47 printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ clean\n" $$build_bootloader >> BuildMakefile; \
48 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; \
50 done < BootloaderDeviceMap.cfg
52 $(MAKE) -f BuildMakefile buildtest