-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.skel
196 lines (163 loc) · 10.1 KB
/
Makefile.skel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# Defines the basis of the binary name to be built, as well as the name used while SBS prints to
# screen what is being built.
# If the binary type is 'binary', the module artifact name will be 'MODULE_NAME'.
# If the binary type is 'shared', the module artifact name will be 'lib<MODULE_NAME>.so'.
# If the binary type is 'static', the module artifact name will be 'lib<MODULE_NAME>.a'.
# See MODULE_BIN_TYPE for more details about binary types. If no module name is given, the
# Makefile's directory basename is used instead.
#MODULE_NAME :=
# Sets the binary artifact type. 4 types are supported:
# 1. 'exec' for executable
# 2. 'shared' for shared objects library (a '.so' files)
# 3. 'static' for static library (a '.a' file)
# 4. 'none' for no artifact creation. This will only compile objects if such are defined, but no
# binary artifact is linked.
# If no type is defined, SBS defaults to 'exec'.
# If MODULE_BIN_TYPE is set to anything but the 4 allowed values, SBS issues an error and quit.
#MODULE_BIN_TYPE :=
# Space separated list of source files to compile and link to create the module's artifact. Each
# entry in the list represents a source file in the module's directory. Source files files are
# expected to have a valid suffix.
# See the MODULE_C_SUFFIXES and MODULE_CXX_SUFFIXES suffixes settings.
#MODULE_SRCS :=
# Flags to be added to source file compilation. When a dedicated setting is available, like
# MODULE_INCLUDE_DIRS, it is usually recommended to prefer it over adding it here, as it clarifies
# the Makefile structure and make it easier read and maintain. However It is possible to place all
# compilation flags in this setting though.
# Overridden by MODULE_CFLAGS_OVERRIDE
#MODULE_CFLAGS :=
# Space separated list of pre-processor definitions. Each <DEFINITION> token yields a -D<DEFINITION>
# flag in the module's compilation command. So a value of 'DEF1 DEF2=xxx' adds '-DDEF1 -DDEF2=xxx'
# to the compilation flags.
# Overridden by MODULE_CFLAGS_OVERRIDE
#MODULE_CDEFS :=
# Space separated list of compiler warnings settings. Each <WARN> token yields a -W<WARN> flag in the
# module's compilation command. So a value of 'pedantic no-variadic-macros' adds '-Wpedantic
# -Wno-variadic-macros' to the objects compilation command.
# Overridden by MODULE_CFLAGS_OVERRIDE.
#MODULE_CWARNS :=
# Space separated list of directories to be searched for header files during preprocessing. Each
# <DIR> token yields a '-I<DIR>' flag in the module's compilation command. So a value of
# '/opt/package_1/include /home/user/package_1/include' adds '-I/opt/package_1/include
# -I/home/user/package_2/include' to the objects compilation command.
# Overridden by MODULE_CFLAGS_OVERRIDE
#MODULE_INCLUDE_DIRS :=
# Same as MODULE_INCLUDE_DIRS, only that directories listed in this setting are relative to the
# project root directory. Each <DIR> yields a '-I<PROJECT_ROOT>/<DIR>' flag in the module's
# compilation command. Assuming the project root is at '/home/user/project', a value of 'include
# subproject/include' adds '-I/home/user/project/include -I/home/user/project/subproject/include'
# to the objects compilation command.
# Overridden by MODULE_CFLAGS_OVERRIDE
#MODULE_PROJECT_INCLUDE_DIRS :=
# By default, SBS adds the '-MMD -MP' setting to the compilation flags, and includes generated
# dependency file ('*.d') so header dependencies are handled correctly. To disable this behavior,
# set this setting to 0. See GCC's documentation for more information about it's dependency flags.
# Overridden by MODULE_CFLAGS_OVERRIDE
#MODULE_DEP_FLAGS :=
# Overrides all compilation flags. If you find yourself using this setting extensively, you are
# probably either misusing SBS or should look for a better suited build system.
#MODULE_CFLAGS_OVERRIDE :=
# Linking flags to be added to the module's linker command. When a dedicated setting is
# available, like MODULE_PROJECT_LIB_DIRS for adding libraries search path directories, it is
# usually recommended to prefer it over adding it here, as it clarifies the Makefile structure and
# make it easier read and maintain. However it is possible to place all link flags in this setting.
# Overridden by MODULE_LDFAGS_OVERRIDE
#MODULE_LDFLAGS :=
# Space separated list of directories to be searched for libraries during linking. Each <DIR> token
# yields a '-L<DIR>' in the module's linking command flags. So a value of '/opt/package_1/lib
# /home/user/package_2/lib' adds '-L/opt/package_1/lib -L/home/user/package_2/lib' to the linking
# command.
# Overridden by MODULE_LDFLAGS_OVERRIDE
#MODULE_LIB_DIRS :=
# Same as MODULE_LIB_DIRS, only that directories are relative to the project root directory. Each
# <DIR> token in the list is translated to -L<PROJECT_ROOT>/<DIR> in the module's linking command
# flags. So assuming the project root is at '/home/user/project' setting this setting value to 'lib
# subproject/lib' will generate a '-L/home/user/project/lib -L/home/user/project/subproject/lib'
# string in the linking command.
# Overridden by MODULE_LDFLAGS_OVERRIDE
#MODULE_PROJECT_LIB_DIRS :=
# List of libraries to be link against the module's artifact. Each <LIB> token yields a '-l<LIB>'
# flags in the module's linking command flags. For example setting this setting value to 'm mylib'
# translates to '-lm -lmylib' string in the linking command flags.
# NOTE: this setting *ISN'T* overridden by MODULE_LDFLAGS_OVERRIDE, as libraries placement and order
# has significance.
#MODULE_LIBS :=
# Sets the module's build type (flavor). Flavors sets the objects and default artifact output
# directory. It is up to the user to put meaning into a given flavor. SBS does provide two
# internal flavors for use:
# 1. dbg - Sets "-g -O0 DEBUG=1 __DEBUG__=1" compilation flags.
# 2. rel - Sets "-O3" compilation flag.
# These flags are overridden by MODULE_CFLAGS_OVERRIDE
# If no flavor is set, SBS defaults to 'dbg'
# See also MODULE_USE_DEF_FLAV
#MODULE_FLAV :=
# Set to 0 to prevent 'dbg' and 'rel' flavor to set any compilation flags. Can be useful if one
# wants to use these flavor names himself without SBS adding any flags.
# Default is 1
#MODULE_USE_DEF_FLAV :=
# Set this to 1 to add '-pthread' for both compilation flags and linking flags, so pthreads are
# enabled in the build.
# Overridden by MODULE_CFLAGS_OVERRIDE (for compilation)
# Overridden by MODULE_LDFLAGS_OVERRIDE (for link)
#MODULE_USE_PTHREAD :=
# Sets the module's final artifact output directory. Unless set, link targets are created in the
# same directory as their object files. This setting has no meaning if MODULE_BIN_TYPE was set to
# 'none'.
#MODULE_ARTIFACT_DIR :=
# Set to 1 if the MODULE_ARTIFACT_DIR should be treated as relative to the project's root directory.
# If set MODULE_ARTIFACT_DIR is set to '/bin' and MODULE_ARTIFACT_DIR_REL is set to 0, the module
# will try to link the target to '/bin'. Set to 1, the link target directory will be a
# <PROJECT_ROOT>/bin. Default value is 0.
# This setting has no meaning if MODULE_ARTIFACT_DIR is empty.
#MODULE_ARTIFACT_DIR_REL :=
# Overrides other linking flags. If you find yourself using this setting extensively, you are
# probably either misusing SBS or should look for a better suited build system.
#MODULE_LDFLAGS_OVERRIDE :=
# Space separated list of additional dependencies for target link. By default, the link target is
# built if any objects or any makefiles are newer. If there's a and additional dependency the
# developer wants to add, she can do it through this setting.
#MODULE_BIN_DEPS :=
# Space separated list objects files created outside of this module's scope and responsibility.
# These module's artifact is linked against these objects, but doesn't build them or clean them.
# Objects in this list are also added to the module's artifact dependencies.
#MODULE_EXTERN_OBJS :=
# Space separated list of file suffixes that will be treated as C source files.
#MODULE_C_SUFFIXES :=
# Space separated list of file suffixes that will be treated as C++ source files.
#MODULE_CXX_SUFFIXES :=
# Sets the module's linking tool. If no tool is defined, SBS will set the linker according to the
# source files list: If a C++ file is found among the list of source files, the C++ linker is used,
# otherwise the C linker is used.
#MODULE_LD :=
# Sets the build suite to use. Possible values are 'gcc` and `clang`. SBS will use the appropriate C
# and C++ compilers and linkers accordingly. Default is 'gcc'.
#MODULE_CSUITE :=
# Space separated list of modules (directories) to build the current module. For each token <MODULE>
# in the list, a 'make -C <MODULE>' is invoked. For parallel builds, (i.e. Using 'make -j'), sub
# modules are built in parallel to current module.
#MODULE_SUB_MODULES :=
# String separated list of modules (directories) to be built before this module. For each token
# <MODULE> in the list a 'make -C <MODULE>' is invoked.
#MODULE_PRE_SUB_MODULES :=
# Space separated list of modules (directories) that are to be built after this module. For each
# token <MODULE> in the list a 'make -C <MODULE>' is invoked.
#MODULE_PRE_POS_MODULES :=
# Space separated list of make targets to run before the module and it's sub module are built. For
# any of the sub modules of this module. For each <TARGET> token in this list, a 'make <TARGET>' is
# invoked. It's the users responsibility to make sure targets on this list are valid.
#MODULE_PRE_BUILD :=
# Space separated list of make targets to run after the module and it's sub module are built. For
# each <TARGET> token in this list, a 'make <TARGET>' is invoked. It's the users responsibility to
# make sure targets on this list are valid.
#MODULE_POST_BUILD :=
# Space separated list of make targets to run before the module and it's sub module are cleaned. For
# each <TARGET> token in this list, a 'make <TARGET>' is invoked. It's the users responsibility to
# make sure targets on this list are valid.
#MODULE_PRE_CLEAN :=
# Space separated list of make targets to run after the module and it's sub module are cleaned. For
# each <TARGET> token in this list, a 'make <TARGET>' is invoked. It's the users responsibility to
# make sure targets on this list are valid.
#MODULE_POST_CLEAN :=
# Set this to 1 to show the full compile and link command SBS as running, with all the set and
# derived flags.
#MODULE_VERBOSE :=