You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

makefile 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # LUFA Library
  3. # Copyright (C) Dean Camera, 2014.
  4. #
  5. # dean [at] fourwalledcubicle [dot] com
  6. # www.lufa-lib.org
  7. #
  8. # Makefile for the board driver build test. This
  9. # test attempts to build a dummy project with all
  10. # possible board targets using their respective
  11. # compiler.
  12. # Path to the LUFA library core
  13. LUFA_PATH := ../../LUFA/
  14. # Build test cannot be run with multiple parallel jobs
  15. .NOTPARALLEL:
  16. all: begin makeboardlist testboards clean end
  17. begin:
  18. @echo Executing build test "BoardDriverTest".
  19. @echo
  20. end:
  21. @echo Build test "BoardDriverTest" complete.
  22. @echo
  23. makeboardlist:
  24. @grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
  25. testboards:
  26. @echo "buildtest:" > BuildMakefile
  27. @while read line; \
  28. do \
  29. build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \
  30. \
  31. build_board=$$line; \
  32. build_arch=`echo $$build_cfg | cut -d':' -f1`; \
  33. build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
  34. \
  35. if ( test -z "$$build_cfg" ); then \
  36. echo "No matching information set for board $$build_board"; \
  37. else \
  38. echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \
  39. \
  40. printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \
  41. printf "\t$(MAKE) -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \
  42. fi; \
  43. done < BoardList.txt
  44. $(MAKE) -f BuildMakefile buildtest
  45. clean:
  46. rm -f BuildMakefile
  47. rm -f BoardList.txt
  48. $(MAKE) -f makefile.test clean BOARD=NONE ARCH=AVR8 MCU=at90usb1287
  49. $(MAKE) -f makefile.test clean BOARD=NONE ARCH=XMEGA MCU=atxmega128a1u
  50. $(MAKE) -f makefile.test clean BOARD=NONE ARCH=UC3 MCU=uc3a0256
  51. %:
  52. .PHONY: all begin end makeboardlist testboards clean
  53. # Include LUFA build script makefiles
  54. include $(LUFA_PATH)/Build/lufa_core.mk