]> git.donarmstrong.com Git - qmk_firmware.git/blob - lib/lufa/BuildTests/BootloaderTest/makefile
Keyboard: add support for kbd19x (#4272)
[qmk_firmware.git] / lib / lufa / BuildTests / BootloaderTest / makefile
1 #
2 #             LUFA Library
3 #     Copyright (C) Dean Camera, 2017.
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 LUFA library core
14 LUFA_PATH := ../../LUFA/
15
16 # Build test cannot be run with multiple parallel jobs
17 .NOTPARALLEL:
18
19 all: begin testbootloaders clean end
20
21 begin:
22         @echo Executing build test "BootloaderTest".
23         @echo
24
25 end:
26         @echo Build test "BootloaderTest" complete.
27         @echo
28
29 testbootloaders:
30         @echo "buildtest:" > BuildMakefile
31
32         @while read line;                                         \
33          do                                                       \
34            build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`;  \
35                                                                   \
36            if ( test -n "$$build_cfg" ); then                     \
37              build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
38                  build_cfg=`echo $$build_cfg | cut -d'=' -f2-`;       \
39                                                                       \
40              build_arch=`echo $$build_cfg | cut -d':' -f1`;       \
41              build_mcu=`echo $$build_cfg | cut -d':' -f2`;        \
42              build_board=`echo $$build_cfg | cut -d':' -f3`;      \
43              build_flashsize=`echo $$build_cfg | cut -d':' -f4`;  \
44              build_bootsize=`echo $$build_cfg | cut -d':' -f5`;   \
45              build_fusb=`echo $$build_cfg | cut -d':' -f6`;       \
46                                                                   \
47              printf "Found '%s' bootloader configuration (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s | BOARD: %s | F_USB: %sMHz)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch $$build_board $$build_fusb; \
48                                                                   \
49              printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB, BOARD: %s, F_USB: %sMHz\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize $$build_board $$build_fusb >> BuildMakefile; \
50              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 F_USB=%s000000 DEBUG_LEVEL=0\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize $$build_fusb >> BuildMakefile; \
51            fi;                                                    \
52          done < BootloaderDeviceMap.cfg
53
54          $(MAKE) -f BuildMakefile buildtest
55
56 clean:
57         rm -f BuildMakefile
58
59 %:
60
61 .PHONY: all begin end testbootloaders clean
62
63 # Include common DMBS build system modules
64 DMBS_PATH      ?= $(LUFA_PATH)/Build/DMBS/DMBS
65 include $(DMBS_PATH)/core.mk