3 # Copyright (C) Dean Camera, 2013.
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 LUFA library core
15 LUFA_PATH := ../../LUFA/
17 # Build test cannot be run with multiple parallel jobs
20 all: begin makeboardlist testboards clean end
23 @echo Executing build test "BoardDriverTest".
27 @echo Build test "BoardDriverTest" complete.
31 @grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
34 @echo "buildtest:" > BuildMakefile
38 build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \
41 build_arch=`echo $$build_cfg | cut -d':' -f1`; \
42 build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
44 if ( test -z "$$build_cfg" ); then \
45 echo "No matching information set for board $$build_board"; \
47 echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \
49 printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \
50 printf "\t$(MAKE) -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \
54 $(MAKE) -f BuildMakefile buildtest
59 $(MAKE) -f makefile.test clean BOARD=NONE ARCH=AVR8 MCU=at90usb1287
60 $(MAKE) -f makefile.test clean BOARD=NONE ARCH=XMEGA MCU=atxmega128a1u
61 $(MAKE) -f makefile.test clean BOARD=NONE ARCH=UC3 MCU=uc3a0256
65 .PHONY: all begin end makeboardlist testboards clean
67 # Include LUFA build script makefiles
68 include $(LUFA_PATH)/Build/lufa_core.mk