3 # Copyright (C) Dean Camera, 2011.
5 # dean [at] fourwalledcubicle [dot] com
9 # Makefile for the board driver build test. This
10 # test attempts to build a dummy project with all
11 # possible board targets using their respective
14 # Path to the root of the LUFA tree to scan
15 LUFA_ROOT_PATH = ../..
18 all: begin makeboardlist testboards clean end
21 @echo Executing build test "BoardDriverTest".
25 @echo Build test "BoardDriverTest" complete.
29 @grep "BOARD_" $(LUFA_ROOT_PATH)/LUFA/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
32 echo "%:" > BuildMakefile
35 build_cfg=`grep "$$line " BoardDeviceMap.cfg | cut -d'=' -f2-`; \
38 build_arch=`echo $$build_cfg | cut -d':' -f1 | cut -d' ' -f1`; \
39 build_mcu=`echo $$build_cfg | cut -d':' -f2 | cut -d' ' -f2`; \
41 if ( test -z "$$build_cfg" ); then \
42 echo "No matching information set for board $$line"; \
44 printf "\tmake -f makefile.$$build_arch clean\n" >> BuildMakefile; \
45 printf "\tmake -f makefile.$$build_arch MCU=$$build_mcu BOARD=$$build_board\n" >> BuildMakefile; \
48 $(MAKE) -f BuildMakefile all
53 $(MAKE) -f makefile.avr8 clean
54 $(MAKE) -f makefile.xmega clean
55 $(MAKE) -f makefile.uc3 clean