Minor documentation improvements.
[pub/USBasp.git] / BuildTests / BootloaderTest / makefile
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2011.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.lufa-lib.org
7 #
8
9 # Makefile for the bootloader build test. This
10 # test attempts to build all the bootloaders
11 # with all supported device configurations.
12
13 # Path to the root of the LUFA tree to scan
14 LUFA_ROOT_PATH = ../..
15
16
17 all: begin testbootloaders clean end
18
19 begin:
20 @echo Executing build test "BootloaderTest".
21 @echo
22
23 end:
24 @echo Build test "BootloaderTest" complete.
25 @echo
26
27 testbootloaders:
28 @echo "buildtest:" > BuildMakefile
29
30 @while read line; \
31 do \
32 build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \
33 \
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-`; \
37 \
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`; \
43 \
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; \
45 \
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; \
49 fi; \
50 done < BootloaderDeviceMap.cfg
51
52 $(MAKE) -f BuildMakefile buildtest
53
54 clean:
55 rm -f BuildMakefile
56
57 %:
58