# possible board targets using their respective\r
# compiler.\r
\r
-# Path to the root of the LUFA tree to scan\r
-LUFA_ROOT_PATH = ../..\r
+# Path to the LUFA library core\r
+LUFA_PATH = ../../LUFA/\r
\r
\r
all: begin makeboardlist testboards clean end\r
@echo\r
\r
makeboardlist:\r
- @grep "BOARD_" $(LUFA_ROOT_PATH)/LUFA/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt\r
+ @grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt\r
\r
testboards:\r
@echo "buildtest:" > BuildMakefile\r
echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \\r
\\r
printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \\r
- printf "\tmake -s -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \\r
+ printf "\t$(MAKE) -s -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \\r
fi; \\r
done < BoardList.txt\r
\r
$(MAKE) -s -f makefile.test clean ARCH=UC3\r
\r
%:\r
-
\ No newline at end of file
+\r
+.PHONY: all begin end makeboardlist testboards clean\r
+\r
+# Include LUFA build script makefiles\r
+include $(LUFA_PATH)/Build/lufa.core.in\r