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