1 | #
|
---|
2 | # Copyright (c) 2005 Martin Decky
|
---|
3 | # Copyright (c) 2007 Jakub Jermar
|
---|
4 | # All rights reserved.
|
---|
5 | #
|
---|
6 | # Redistribution and use in source and binary forms, with or without
|
---|
7 | # modification, are permitted provided that the following conditions
|
---|
8 | # are met:
|
---|
9 | #
|
---|
10 | # - Redistributions of source code must retain the above copyright
|
---|
11 | # notice, this list of conditions and the following disclaimer.
|
---|
12 | # - Redistributions in binary form must reproduce the above copyright
|
---|
13 | # notice, this list of conditions and the following disclaimer in the
|
---|
14 | # documentation and/or other materials provided with the distribution.
|
---|
15 | # - The name of the author may not be used to endorse or promote products
|
---|
16 | # derived from this software without specific prior written permission.
|
---|
17 | #
|
---|
18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
19 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
20 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
21 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
22 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
23 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
28 | #
|
---|
29 |
|
---|
30 | # Individual makefiles set:
|
---|
31 | #
|
---|
32 | # USPACE_PREFIX (*) relative path to uspace/ directory
|
---|
33 | # SOURCES (*) list of source files
|
---|
34 | # LIBS libraries to link with
|
---|
35 | # DEFS compiler defines
|
---|
36 | # EXTRA_CFLAGS additional flags to pass to C compiler
|
---|
37 | # LINKER_SCRIPT linker script
|
---|
38 | # PRE_DEPEND targets required for dependency check
|
---|
39 | #
|
---|
40 | # BINARY (/) binary output name (like appname)
|
---|
41 | # LIBRARY (/) library output name (like libname)
|
---|
42 | #
|
---|
43 | # EXTRA_OUTPUT additional output targets
|
---|
44 | # EXTRA_CLEAN additional cleanup targets
|
---|
45 | #
|
---|
46 | # Optionally, for a binary:
|
---|
47 | # STATIC_NEEDED set to 'y' for init binaries, will build statically
|
---|
48 | # linked version
|
---|
49 | # STATIC_ONLY set to 'y' if binary cannot be linked dynamically
|
---|
50 | # (e.g. uses thread-local variables)
|
---|
51 | #
|
---|
52 | # Optionally, for a library:
|
---|
53 | # SOVERSION shared library version (major.minor),
|
---|
54 | # if missing, no shared library is built
|
---|
55 | #
|
---|
56 | # (x) required variables
|
---|
57 | # (/) exactly one of the variables must be defined
|
---|
58 | #
|
---|
59 |
|
---|
60 | ROOT_PATH = $(USPACE_PREFIX)/..
|
---|
61 |
|
---|
62 | VERSION_DEF = $(ROOT_PATH)/version
|
---|
63 |
|
---|
64 | COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
|
---|
65 | COMMON_HEADER = $(ROOT_PATH)/common.h
|
---|
66 |
|
---|
67 | CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
|
---|
68 | CONFIG_HEADER = $(ROOT_PATH)/config.h
|
---|
69 |
|
---|
70 | -include $(VERSION_DEF)
|
---|
71 | -include $(COMMON_MAKEFILE)
|
---|
72 | -include $(CONFIG_MAKEFILE)
|
---|
73 |
|
---|
74 | OUTPUTS = $(EXTRA_OUTPUT)
|
---|
75 |
|
---|
76 | ifneq ($(BINARY),)
|
---|
77 | JOB = $(BINARY).job
|
---|
78 | TEST_BINARY = test-$(BINARY)
|
---|
79 | OUTPUTS += $(BINARY) $(BINARY).disasm
|
---|
80 | EXTRA_CLEAN += $(BINARY).map
|
---|
81 | endif
|
---|
82 |
|
---|
83 | ifneq ($(LIBRARY),)
|
---|
84 | JOB = $(LIBRARY).job
|
---|
85 | TEST_BINARY = test-$(LIBRARY)
|
---|
86 | OUTPUTS += $(LIBRARY).a
|
---|
87 | endif
|
---|
88 |
|
---|
89 | ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
|
---|
90 | ifneq ($(SOVERSION),)
|
---|
91 | SLIBRARY = $(LIBRARY).so.$(SOVERSION)
|
---|
92 | LSONAME = $(LIBRARY).so.$(basename $(SOVERSION))
|
---|
93 | OUTPUTS += $(SLIBRARY) $(SLIBRARY).disasm $(LSONAME)
|
---|
94 | EXTRA_CLEAN += $(LIBRARY).la $(SLIBRARY).map
|
---|
95 | endif
|
---|
96 | endif
|
---|
97 |
|
---|
98 | LIB_PREFIX = $(USPACE_PREFIX)/lib
|
---|
99 |
|
---|
100 | LIBC_PREFIX = $(LIB_PREFIX)/c
|
---|
101 | LIBC_INCLUDES_FLAGS = \
|
---|
102 | -I$(LIBC_PREFIX)/include \
|
---|
103 | -I$(LIBC_PREFIX)/arch/$(UARCH)/include \
|
---|
104 | -I$(ROOT_PATH)/abi/include
|
---|
105 |
|
---|
106 | LIBCPP_PREFIX = $(LIB_PREFIX)/cpp
|
---|
107 | LIBCPP_INCLUDES_FLAGS = -I$(LIBCPP_PREFIX)/include
|
---|
108 |
|
---|
109 | LIBSOFTFLOAT_PREFIX = $(LIB_PREFIX)/softfloat
|
---|
110 | LIBSOFTINT_PREFIX = $(LIB_PREFIX)/softint
|
---|
111 |
|
---|
112 | LIBMATH_PREFIX = $(LIB_PREFIX)/math
|
---|
113 | LIBMATH_INCLUDES_FLAGS = \
|
---|
114 | -I$(LIBMATH_PREFIX)/include \
|
---|
115 | -I$(LIBMATH_PREFIX)/arch/$(UARCH)/include
|
---|
116 |
|
---|
117 | LIBPOSIX_PREFIX = $(LIB_PREFIX)/posix
|
---|
118 | LIBDLTEST_PREFIX = $(LIB_PREFIX)/dltest
|
---|
119 |
|
---|
120 | AFLAGS = --fatal-warnings
|
---|
121 | LDFLAGS = -Wl,--fatal-warnings,--warn-common
|
---|
122 |
|
---|
123 | ifeq ($(STATIC_NEEDED),y)
|
---|
124 | STATIC_BUILD = y
|
---|
125 | else
|
---|
126 | ifeq ($(STATIC_ONLY),y)
|
---|
127 | STATIC_BUILD = y
|
---|
128 | else
|
---|
129 | ifeq ($(CONFIG_USE_SHARED_LIBS),y)
|
---|
130 | STATIC_BUILD = n
|
---|
131 | else
|
---|
132 | STATIC_BUILD = y
|
---|
133 | endif
|
---|
134 | endif
|
---|
135 | endif
|
---|
136 |
|
---|
137 | ifeq ($(STATIC_BUILD),y)
|
---|
138 | BASE_LIBS = $(LIBC_PREFIX)/libc.a
|
---|
139 | else
|
---|
140 | BASE_LIBS = $(LIBC_PREFIX)/libc.so.0
|
---|
141 | LINK_DYNAMIC = y
|
---|
142 | endif
|
---|
143 |
|
---|
144 | BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a $(LIBSOFTINT_PREFIX)/libsoftint.a
|
---|
145 |
|
---|
146 | ifeq ($(LINK_DYNAMIC),y)
|
---|
147 | LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld
|
---|
148 | else
|
---|
149 | LDFLAGS += -static
|
---|
150 | LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
|
---|
151 | endif
|
---|
152 |
|
---|
153 | LIB_LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld
|
---|
154 |
|
---|
155 | INCLUDES_FLAGS = $(LIBC_INCLUDES_FLAGS)
|
---|
156 |
|
---|
157 | ifneq ($(LIBRARY),)
|
---|
158 | INCLUDES_FLAGS += -Iinclude -I.
|
---|
159 | endif
|
---|
160 |
|
---|
161 | INCLUDES_FLAGS += $(foreach lib,$(LIBS), -I$(LIB_PREFIX)/$(lib) -I$(LIB_PREFIX)/$(lib)/include)
|
---|
162 |
|
---|
163 | # TODO: get rid of this special case
|
---|
164 | ifneq ($(filter math, $(LIBS)),)
|
---|
165 | INCLUDES_FLAGS += $(LIBMATH_INCLUDES_FLAGS)
|
---|
166 | endif
|
---|
167 |
|
---|
168 | # PCUT-based unit tests
|
---|
169 | ifneq ($(TEST_SOURCES),)
|
---|
170 | TEST_OUTPUTS = $(TEST_BINARY) $(TEST_BINARY).disasm
|
---|
171 | TEST_CFLAGS = -I$(LIB_PREFIX)/pcut/include -D__helenos__ $(EXTRA_TEST_CFLAGS)
|
---|
172 | TEST_BINARY_LIBS = $(LIB_PREFIX)/pcut/libpcut.a
|
---|
173 | EXTRA_CLEAN += $(TEST_OUTPUTS) $(TEST_BINARY).map
|
---|
174 | ifneq ($(LIBRARY),)
|
---|
175 | TEST_BINARY_LIBS += $(LIBRARY).a
|
---|
176 | endif
|
---|
177 | TEST_BINARY_LIBS += $(TEST_LIBS)
|
---|
178 | endif
|
---|
179 |
|
---|
180 | # Flags that are not necessary, and can be overriden, but are used by default.
|
---|
181 | DEFAULT_CFLAGS = \
|
---|
182 | -O$(OPTIMIZATION) \
|
---|
183 | -ffunction-sections \
|
---|
184 | -pipe \
|
---|
185 | -Wall \
|
---|
186 | -Wextra \
|
---|
187 | -Wno-unused-parameter \
|
---|
188 | -Wmissing-prototypes \
|
---|
189 | -Wwrite-strings \
|
---|
190 | -Werror-implicit-function-declaration
|
---|
191 |
|
---|
192 | ifeq ($(CONFIG_DEBUG),y)
|
---|
193 | DEFAULT_CFLAGS += -Werror
|
---|
194 | endif
|
---|
195 |
|
---|
196 | ifeq ($(CONFIG_UBSAN),y)
|
---|
197 | DEFAULT_CFLAGS += -fsanitize=undefined
|
---|
198 | endif
|
---|
199 |
|
---|
200 | ifeq ($(COMPILER),clang)
|
---|
201 | DEFAULT_CFLAGS += \
|
---|
202 | -Wno-missing-field-initializers \
|
---|
203 | -Wno-typedef-redefinition \
|
---|
204 | -Wno-unused-command-line-argument
|
---|
205 | else
|
---|
206 | DEFAULT_CFLAGS += \
|
---|
207 | -Wno-clobbered
|
---|
208 | endif
|
---|
209 |
|
---|
210 | ifeq ($(CONFIG_LINE_DEBUG),y)
|
---|
211 | DEFAULT_CFLAGS += -ggdb
|
---|
212 | endif
|
---|
213 |
|
---|
214 | # Flags that should always be used, even for third-party software.
|
---|
215 | COMMON_CPPFLAGS = \
|
---|
216 | -nostdinc \
|
---|
217 | -D__$(ENDIANESS)__
|
---|
218 |
|
---|
219 | COMMON_CFLAGS = \
|
---|
220 | -ffreestanding \
|
---|
221 | -nostdlib
|
---|
222 |
|
---|
223 | # Flags that are always used for HelenOS code, but not for third-party.
|
---|
224 | HELENOS_CFLAGS = \
|
---|
225 | -std=gnu99 \
|
---|
226 | $(INCLUDES_FLAGS) \
|
---|
227 | -imacros $(CONFIG_HEADER) \
|
---|
228 | -D_HELENOS_SOURCE \
|
---|
229 | -fexec-charset=UTF-8 \
|
---|
230 | -finput-charset=UTF-8 \
|
---|
231 | -fno-common \
|
---|
232 | -fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
|
---|
233 |
|
---|
234 | # TODO: Use a different name.
|
---|
235 | # CFLAGS variable is traditionally used for overridable flags.
|
---|
236 | CFLAGS = $(COMMON_CPPFLAGS) $(COMMON_CFLAGS) $(HELENOS_CFLAGS) $(DEFAULT_CFLAGS)
|
---|
237 |
|
---|
238 | # Flags for the compilation of C++ code.
|
---|
239 | CXX_BASE_LIBS = $(LIBCPP_PREFIX)/libcpp.a $(BASE_LIBS)
|
---|
240 | DEFAULT_CXXFLAGS = \
|
---|
241 | -O$(OPTIMIZATION) \
|
---|
242 | -ffunction-sections \
|
---|
243 | -pipe \
|
---|
244 | -Wall \
|
---|
245 | -Wextra \
|
---|
246 | -Wno-unused-parameter \
|
---|
247 | -Wwrite-strings \
|
---|
248 | -Werror-implicit-function-declaration
|
---|
249 |
|
---|
250 | COMMON_CXXFLAGS = $(COMMON_CFLAGS)
|
---|
251 | HELENOS_CXXFLAGS = \
|
---|
252 | -std=c++17 -frtti \
|
---|
253 | $(LIBCPP_INCLUDES_FLAGS) $(INCLUDES_FLAGS) \
|
---|
254 | -imacros $(CONFIG_HEADER) \
|
---|
255 | -D_HELENOS_SOURCE \
|
---|
256 | -fexec-charset=UTF-8 \
|
---|
257 | -finput-charset=UTF-8 \
|
---|
258 | -fno-common \
|
---|
259 | -fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
|
---|
260 |
|
---|
261 | CXXFLAGS = $(COMMON_CPPFLAGS) $(COMMON_CXXFLAGS) $(HELENOS_CXXFLAGS) $(DEFAULT_CXXFLAGS)
|
---|
262 |
|
---|
263 | ## Setup platform configuration
|
---|
264 | #
|
---|
265 |
|
---|
266 | -include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.common
|
---|
267 |
|
---|
268 | ## Compilation options
|
---|
269 | #
|
---|
270 |
|
---|
271 | ifeq ($(PRECHECK),y)
|
---|
272 | JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
|
---|
273 | # XXX: Do not change the order of arguments.
|
---|
274 | CC_JOB = $(JOBFILE) $(JOB) $(CC) $< -o $@
|
---|
275 | CXX_JOB = $(JOBFILE) $(JOB) $(CXX) $< -o $@
|
---|
276 | else
|
---|
277 | CC_JOB = $(CC) $< -o $@
|
---|
278 | CXX_JOB = $(CXX) $< -o $@
|
---|
279 | endif
|
---|
280 |
|
---|
281 | ifeq ($(CONFIG_STRIP_BINARIES),y)
|
---|
282 | LDFLAGS += -s
|
---|
283 | endif
|
---|
284 |
|
---|
285 | LIB_CFLAGS = $(CFLAGS) -fPIC
|
---|
286 | LIB_LDFLAGS = $(LDFLAGS) -shared -Wl,-soname,$(LSONAME)
|
---|
287 |
|
---|
288 | AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
|
---|
289 |
|
---|
290 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
|
---|
291 | LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES)))
|
---|
292 | TEST_OBJECTS := $(addsuffix .test.o,$(basename $(TEST_SOURCES)))
|
---|
293 | DEPENDS := $(addsuffix .d,$(basename $(SOURCES))) $(addsuffix .test.d,$(basename $(TEST_SOURCES)))
|
---|
294 |
|
---|
295 | LIBTAGS := $(foreach lib,$(LIBS), $(USPACE_PREFIX)/lib/$(lib)/tag)
|
---|
296 | LIBARGS := $(addprefix -L$(USPACE_PREFIX)/lib/, $(LIBS)) $(addprefix -l, $(LIBS))
|
---|
297 |
|
---|
298 | .PHONY: all all-test clean fasterclean depend
|
---|
299 |
|
---|
300 | all: tag $(OUTPUTS)
|
---|
301 |
|
---|
302 | all-test: $(TEST_OUTPUTS)
|
---|
303 |
|
---|
304 | clean: fasterclean
|
---|
305 | find . -name '*.o' -follow -exec rm \{\} \;
|
---|
306 | find . -name '*.lo' -follow -exec rm \{\} \;
|
---|
307 | find . -name '*.d' -follow -exec rm \{\} \;
|
---|
308 |
|
---|
309 | fasterclean:
|
---|
310 | rm -rf $(JOB) $(OUTPUTS) $(EXTRA_CLEAN) tag deps.mk
|
---|
311 |
|
---|
312 | depend: $(PRE_DEPEND)
|
---|
313 |
|
---|
314 | # "Tag" files are used to force relink of binaries when dependencies get rebuilt,
|
---|
315 | # regardless of whether the dependency was linked statically or dynamically,
|
---|
316 | # or which version of a dynamic library was used. Prerequisites for this file
|
---|
317 | # are defined further down.
|
---|
318 | tag:
|
---|
319 | touch tag
|
---|
320 |
|
---|
321 | # Generate inter-module make dependencies.
|
---|
322 | # This is needed to ensure correct build order of libraries and code depending on them.
|
---|
323 | deps.mk: Makefile
|
---|
324 | echo > $@.new
|
---|
325 | for lib in $(LIBS); do \
|
---|
326 | echo "$(SELF_TARGET): lib/$$lib.build" >> $@.new; \
|
---|
327 | done
|
---|
328 | mv -f $@.new $@
|
---|
329 |
|
---|
330 | %.disasm: %
|
---|
331 | ifeq ($(CONFIG_LINE_DEBUG),y)
|
---|
332 | $(OBJDUMP) -d -S $< > $@
|
---|
333 | else
|
---|
334 | $(OBJDUMP) -d $< > $@
|
---|
335 | endif
|
---|
336 |
|
---|
337 | ifneq ($(BINARY),)
|
---|
338 |
|
---|
339 | ifneq ($(filter %.cpp %.cc %.cxx, $(SOURCES)),)
|
---|
340 | $(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS) $(CXX_BASE_LIBS)
|
---|
341 | $(CXX) $(CXXFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(OBJECTS) $(LIBARGS) $(CXX_BASE_LIBS)
|
---|
342 | else
|
---|
343 | $(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBTAGS) $(BASE_LIBS)
|
---|
344 | $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(OBJECTS) $(LIBARGS) $(BASE_LIBS)
|
---|
345 | endif
|
---|
346 |
|
---|
347 | endif
|
---|
348 |
|
---|
349 | ifneq ($(TEST_BINARY),)
|
---|
350 | $(TEST_BINARY): $(LINKER_SCRIPT) $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBTAGS) $(BASE_LIBS)
|
---|
351 | $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) -T $(LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ $(TEST_OBJECTS) $(TEST_BINARY_LIBS) $(LIBARGS) $(BASE_LIBS)
|
---|
352 | endif
|
---|
353 |
|
---|
354 | ifneq ($(LIBRARY),)
|
---|
355 | tag: $(LIBRARY).a
|
---|
356 |
|
---|
357 | $(LIBRARY).a: $(OBJECTS)
|
---|
358 | $(AR) rc $@ $(OBJECTS)
|
---|
359 | endif
|
---|
360 |
|
---|
361 | ifneq ($(SLIBRARY),)
|
---|
362 | tag: $(SLIBRARY)
|
---|
363 |
|
---|
364 | $(LIBRARY).la: $(LOBJECTS)
|
---|
365 | $(AR) rc $@ $(LOBJECTS)
|
---|
366 |
|
---|
367 | $(SLIBRARY): $(LIB_LINKER_SCRIPT) $(LIBRARY).la
|
---|
368 | $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) -T $(LIB_LINKER_SCRIPT) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive
|
---|
369 |
|
---|
370 | $(LSONAME):
|
---|
371 | ln -s $(SLIBRARY) $@
|
---|
372 | endif
|
---|
373 |
|
---|
374 | %.o: %.S | depend
|
---|
375 | $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
|
---|
376 |
|
---|
377 | %.o: %.s | depend
|
---|
378 | $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
|
---|
379 |
|
---|
380 | %.o: %.c | depend
|
---|
381 | $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS)
|
---|
382 |
|
---|
383 | %.o: %.cpp | depend
|
---|
384 | $(CXX_JOB) -c -MD -MP $(DEFS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
---|
385 |
|
---|
386 | %.o: %.cxx | depend
|
---|
387 | $(CXX_JOB) -c -MD -MP $(DEFS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
---|
388 |
|
---|
389 | %.o: %.cc | depend
|
---|
390 | $(CXX_JOB) -c -MD -MP $(DEFS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
---|
391 |
|
---|
392 | %.test.o: %.c | depend
|
---|
393 | $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS)
|
---|
394 |
|
---|
395 | %.lo: %.S | depend
|
---|
396 | $(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
|
---|
397 |
|
---|
398 | %.lo: %.s | depend
|
---|
399 | $(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
|
---|
400 |
|
---|
401 | %.lo: %.c | depend
|
---|
402 | $(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS)
|
---|
403 |
|
---|
404 | %.lo: %.cpp | depend
|
---|
405 | $(CXX_JOB) -c -MD -MP $(DEFS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
---|
406 |
|
---|
407 | %.lo: %.cxx | depend
|
---|
408 | $(CXX_JOB) -c -MD -MP $(DEFS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
---|
409 |
|
---|
410 | %.lo: %.cc | depend
|
---|
411 | $(CXX_JOB) -c -MD -MP $(DEFS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
|
---|
412 |
|
---|
413 | -include $(DEPENDS)
|
---|
414 |
|
---|