Switch StaticAnalysisTest build test to use the new build system CPPCHECK module...
[pub/USBasp.git] / BuildTests / BootloaderTest / makefile
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2012.
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 "\t$(MAKE) -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ clean elf ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \
48 fi; \
49 done < BootloaderDeviceMap.cfg
50
51 $(MAKE) -f BuildMakefile buildtest
52
53 clean:
54 rm -f BuildMakefile
55
56 %:
57
58 .PHONY: all begin end testbootloaders clean
59
60 # Include LUFA build script makefiles
61 include $(LUFA_ROOT_PATH)/LUFA/Build/lufa.core.in