Correct BuildTest makefiles to use LUFA_PATH rather than LUFA_ROOT_PATH.
[pub/USBasp.git] / BuildTests / BoardDriverTest / 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 board driver build test. This
10 # test attempts to build a dummy project with all
11 # possible board targets using their respective
12 # compiler.
13
14 # Path to the LUFA library core
15 LUFA_PATH = ../../LUFA/
16
17
18 all: begin makeboardlist testboards clean end
19
20 begin:
21 @echo Executing build test "BoardDriverTest".
22 @echo
23
24 end:
25 @echo Build test "BoardDriverTest" complete.
26 @echo
27
28 makeboardlist:
29 @grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
30
31 testboards:
32 @echo "buildtest:" > BuildMakefile
33
34 @while read line; \
35 do \
36 build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \
37 \
38 build_board=$$line; \
39 build_arch=`echo $$build_cfg | cut -d':' -f1`; \
40 build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
41 \
42 if ( test -z "$$build_cfg" ); then \
43 echo "No matching information set for board $$build_board"; \
44 else \
45 echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \
46 \
47 printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \
48 printf "\t$(MAKE) -s -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \
49 fi; \
50 done < BoardList.txt
51
52 $(MAKE) -f BuildMakefile buildtest
53
54 clean:
55 rm -f BuildMakefile
56 rm -f BoardList.txt
57 $(MAKE) -s -f makefile.test clean ARCH=AVR8
58 $(MAKE) -s -f makefile.test clean ARCH=XMEGA
59 $(MAKE) -s -f makefile.test clean ARCH=UC3
60
61 %:
62
63 .PHONY: all begin end makeboardlist testboards clean
64
65 # Include LUFA build script makefiles
66 include $(LUFA_PATH)/Build/lufa.core.in