3 # Copyright (C) Dean Camera, 2012.
5 # dean [at] fourwalledcubicle [dot] com
9 LUFA_BUILD_MODULES += CORE
10 LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional
11 LUFA_BUILD_MANDATORY_VARS +=
12 LUFA_BUILD_OPTIONAL_VARS +=
14 # -----------------------------------------------------------------------------
15 # LUFA Core Buildsystem Makefile Module.
16 # -----------------------------------------------------------------------------
18 # Provides a set of core build targets for the LUFA buildsystem
19 # -----------------------------------------------------------------------------
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
30 # MANDATORY PARAMETERS:
34 # OPTIONAL PARAMETERS:
38 # -----------------------------------------------------------------------------
40 # Build sorted and filtered lists of the included build module data
41 SORTED_LUFA_BUILD_MODULES = $(sort $(LUFA_BUILD_MODULES))
42 SORTED_LUFA_BUILD_TARGETS = $(sort $(LUFA_BUILD_TARGETS))
43 SORTED_LUFA_MANDATORY_VARS = $(sort $(LUFA_BUILD_MANDATORY_VARS))
44 SORTED_LUFA_OPTIONAL_VARS = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))
47 @echo "==================================================================="
48 @echo " LUFA Build System 2.0 "
49 @echo " (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com } "
50 @echo "==================================================================="
52 @echo " This build system is a set of makefile modules for (GNU) Make, to "
53 @echo " provide a simple system for building LUFA powered applications. "
54 @echo " Each makefile module can be included from within a user makefile, "
55 @echo " to expose the build rules documented in the comments at the top of"
56 @echo " each build module. "
59 @echo " To execute a rule, define all variables indicated in the desired "
60 @echo " module as a required parameter before including the build module "
61 @echo " in your project makefile. Parameters marked as optional will "
62 @echo " assume a default value in the modules if not user-assigned. "
64 @echo " By default the target output shows both a friendly summary, as "
65 @echo " well as the actual invoked command. To suppress the output of the "
66 @echo " invoked commands and show only the friendly command output, run "
67 @echo " make with the \"-s\" switch added before the target(s). "
68 @echo "==================================================================="
69 @echo " Currently used build system modules in this application: "
71 @printf " %b" "$(SORTED_LUFA_BUILD_MODULES:%= - %\n)"
74 @echo " Currently available build targets in this application: "
76 @printf " %b" "$(SORTED_LUFA_BUILD_TARGETS:%= - %\n)"
79 @echo " Mandatory variables required by the selected build Modules: "
81 @printf " %b" "$(SORTED_LUFA_MANDATORY_VARS:%= - %\n)"
84 @echo " Optional variables required by the selected build Modules: "
86 @printf " %b" "$(SORTED_LUFA_OPTIONAL_VARS:%= - %\n)"
88 @echo "==================================================================="
89 @echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) "
90 @echo "==================================================================="
93 @echo Currently Used Build System Modules: $(SORTED_LUFA_BUILD_MODULES)
96 @echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS)
99 @echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS)
102 @echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS)
104 # Disable default in-built make rules (those that are needed are explicitly
105 # defined, and doing so has performance benefits when recursively building)
108 # Phony build targets for this module
109 .PHONY: help list_modules list_targets list_mandatory list_optional