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.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 bootloader build test. This
  9. # test attempts to build all the bootloaders
  10. # with all supported device configurations.
  11. # Path to the LUFA library core
  12. LUFA_PATH := ../../LUFA/
  13. # Build test cannot be run with multiple parallel jobs
  14. .NOTPARALLEL:
  15. all: begin testbootloaders clean end
  16. begin:
  17. @echo Executing build test "BootloaderTest".
  18. @echo
  19. end:
  20. @echo Build test "BootloaderTest" complete.
  21. @echo
  22. testbootloaders:
  23. @echo "buildtest:" > BuildMakefile
  24. @while read line; \
  25. do \
  26. build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \
  27. \
  28. if ( test -n "$$build_cfg" ); then \
  29. build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
  30. build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \
  31. \
  32. build_arch=`echo $$build_cfg | cut -d':' -f1`; \
  33. build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
  34. build_board=`echo $$build_cfg | cut -d':' -f3`; \
  35. build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \
  36. build_bootsize=`echo $$build_cfg | cut -d':' -f5`; \
  37. build_fusb=`echo $$build_cfg | cut -d':' -f6`; \
  38. \
  39. printf "Found '%s' bootloader configuration (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s | BOARD: %s | F_USB: %sMHz)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch $$build_board $$build_fusb; \
  40. \
  41. printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB, BOARD: %s, F_USB: %sMHz\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize $$build_board $$build_fusb >> BuildMakefile; \
  42. printf "\t$(MAKE) -C $(patsubst %/,%,$(LUFA_PATH))/../Bootloaders/%s/ clean elf ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s F_USB=%s000000 DEBUG_LEVEL=0\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize $$build_fusb >> BuildMakefile; \
  43. fi; \
  44. done < BootloaderDeviceMap.cfg
  45. $(MAKE) -f BuildMakefile buildtest
  46. clean:
  47. rm -f BuildMakefile
  48. %:
  49. .PHONY: all begin end testbootloaders clean
  50. # Include LUFA build script makefiles
  51. include $(LUFA_PATH)/Build/lufa_core.mk