Keyboard firmwares for Atmel AVR and Cortex-M
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.

lufa_core.mk 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #
  2. # LUFA Library
  3. # Copyright (C) Dean Camera, 2012.
  4. #
  5. # dean [at] fourwalledcubicle [dot] com
  6. # www.lufa-lib.org
  7. #
  8. LUFA_BUILD_MODULES += CORE
  9. LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional list_provided list_macros
  10. LUFA_BUILD_MANDATORY_VARS +=
  11. LUFA_BUILD_OPTIONAL_VARS +=
  12. LUFA_BUILD_PROVIDED_VARS +=
  13. LUFA_BUILD_PROVIDED_MACROS +=
  14. # -----------------------------------------------------------------------------
  15. # LUFA Core Build System Makefile Module.
  16. # -----------------------------------------------------------------------------
  17. # DESCRIPTION:
  18. # Provides a set of core build targets for the LUFA build system
  19. # -----------------------------------------------------------------------------
  20. # TARGETS:
  21. #
  22. # help - Build system help
  23. # list_targets - List all build targets
  24. # list_modules - List all build modules
  25. # list_mandatory - List all mandatory make variables required by
  26. # the included build modules of the application
  27. # list_optional - List all optional make variables required by
  28. # the included build modules of the application
  29. # list_provided - List all provided make variables from the
  30. # included build modules of the application
  31. # list_macros - List all provided make macros from the
  32. # included build modules of the application
  33. #
  34. # MANDATORY PARAMETERS:
  35. #
  36. # (None)
  37. #
  38. # OPTIONAL PARAMETERS:
  39. #
  40. # (None)
  41. #
  42. # PROVIDED VARIABLES:
  43. #
  44. # (None)
  45. #
  46. # PROVIDED MACROS:
  47. #
  48. # (None)
  49. #
  50. # -----------------------------------------------------------------------------
  51. SHELL = /bin/sh
  52. # Build sorted and filtered lists of the included build module data
  53. SORTED_LUFA_BUILD_MODULES = $(sort $(LUFA_BUILD_MODULES))
  54. SORTED_LUFA_BUILD_TARGETS = $(sort $(LUFA_BUILD_TARGETS))
  55. SORTED_LUFA_MANDATORY_VARS = $(sort $(LUFA_BUILD_MANDATORY_VARS))
  56. SORTED_LUFA_OPTIONAL_VARS = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))
  57. SORTED_LUFA_PROVIDED_VARS = $(sort $(LUFA_BUILD_PROVIDED_VARS))
  58. SORTED_LUFA_PROVIDED_MACROS = $(sort $(LUFA_BUILD_PROVIDED_MACROS))
  59. # Create printable versions of the sorted build module data (use "(None)" when no data is available)
  60. PRINTABLE_LUFA_BUILD_MODULES = $(if $(strip $(SORTED_LUFA_BUILD_MODULES)), $(SORTED_LUFA_BUILD_MODULES), (None))
  61. PRINTABLE_LUFA_BUILD_TARGETS = $(if $(strip $(SORTED_LUFA_BUILD_TARGETS)), $(SORTED_LUFA_BUILD_TARGETS), (None))
  62. PRINTABLE_LUFA_MANDATORY_VARS = $(if $(strip $(SORTED_LUFA_MANDATORY_VARS)), $(SORTED_LUFA_MANDATORY_VARS), (None))
  63. PRINTABLE_LUFA_OPTIONAL_VARS = $(if $(strip $(SORTED_LUFA_OPTIONAL_VARS)), $(SORTED_LUFA_OPTIONAL_VARS), (None))
  64. PRINTABLE_LUFA_PROVIDED_VARS = $(if $(strip $(SORTED_LUFA_PROVIDED_VARS)), $(SORTED_LUFA_PROVIDED_VARS), (None))
  65. PRINTABLE_LUFA_PROVIDED_MACROS = $(if $(strip $(SORTED_LUFA_PROVIDED_MACROS)), $(SORTED_LUFA_PROVIDED_MACROS), (None))
  66. help:
  67. @echo "==================================================================="
  68. @echo " LUFA Build System 2.0 "
  69. @echo " (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com } "
  70. @echo "==================================================================="
  71. @echo "DESCRIPTION: "
  72. @echo " This build system is a set of makefile modules for (GNU) Make, to "
  73. @echo " provide a simple system for building LUFA powered applications. "
  74. @echo " Each makefile module can be included from within a user makefile, "
  75. @echo " to expose the build rules documented in the comments at the top of"
  76. @echo " each build module. "
  77. @echo " "
  78. @echo "USAGE: "
  79. @echo " To execute a rule, define all variables indicated in the desired "
  80. @echo " module as a required parameter before including the build module "
  81. @echo " in your project makefile. Parameters marked as optional will "
  82. @echo " assume a default value in the modules if not user-assigned. "
  83. @echo " "
  84. @echo " By default the target output shows both a friendly summary, as "
  85. @echo " well as the actual invoked command. To suppress the output of the "
  86. @echo " invoked commands and show only the friendly command output, run "
  87. @echo " make with the \"-s\" switch added before the target(s). "
  88. @echo "==================================================================="
  89. @echo " "
  90. @echo " Currently used build system modules in this application: "
  91. @echo " "
  92. @printf " %b" "$(PRINTABLE_LUFA_BUILD_MODULES:%= - %\n)"
  93. @echo " "
  94. @echo " "
  95. @echo " Currently available build targets in this application: "
  96. @echo " "
  97. @printf " %b" "$(PRINTABLE_LUFA_BUILD_TARGETS:%= - %\n)"
  98. @echo " "
  99. @echo " "
  100. @echo " Mandatory variables required by the selected build Modules: "
  101. @echo " "
  102. @printf " %b" "$(PRINTABLE_LUFA_MANDATORY_VARS:%= - %\n)"
  103. @echo " "
  104. @echo " "
  105. @echo " Optional variables required by the selected build Modules: "
  106. @echo " "
  107. @printf " %b" "$(PRINTABLE_LUFA_OPTIONAL_VARS:%= - %\n)"
  108. @echo " "
  109. @echo " "
  110. @echo " Variables provided by the selected build Modules: "
  111. @echo " "
  112. @printf " %b" "$(PRINTABLE_LUFA_PROVIDED_VARS:%= - %\n)"
  113. @echo " "
  114. @echo " "
  115. @echo " Macros provided by the selected build Modules: "
  116. @echo " "
  117. @printf " %b" "$(PRINTABLE_LUFA_PROVIDED_MACROS:%= - %\n)"
  118. @echo " "
  119. @echo "==================================================================="
  120. @echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) "
  121. @echo "==================================================================="
  122. list_modules:
  123. @echo Currently Used Build System Modules: $(PRINTABLE_LUFA_BUILD_MODULES)
  124. list_targets:
  125. @echo Currently Available Build Targets: $(PRINTABLE_LUFA_BUILD_TARGETS)
  126. list_mandatory:
  127. @echo Mandatory Variables for Included Modules: $(PRINTABLE_LUFA_MANDATORY_VARS)
  128. list_optional:
  129. @echo Optional Variables for Included Modules: $(PRINTABLE_LUFA_OPTIONAL_VARS)
  130. list_provided:
  131. @echo Variables Provided by the Included Modules: $(PRINTABLE_LUFA_PROVIDED_VARS)
  132. list_macros:
  133. @echo Macros Provided by the Included Modules: $(PRINTABLE_LUFA_PROVIDED_MACROS)
  134. # Disable default in-built make rules (those that are needed are explicitly
  135. # defined, and doing so has performance benefits when recursively building)
  136. .SUFFIXES:
  137. # Phony build targets for this module
  138. .PHONY: help list_modules list_targets list_mandatory list_optional list_provided list_macros