1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 # GNU Make based build file. For details on GNU Make see:
7 # http://www.gnu.org/software/make/manual/make.html
12 #MAKEFILE_DEPS:=$(lastword $(MAKEFILE_LIST)) $(TOP_MAKE)
13 MAKEFILE_DEPS:=$(MAKEFILE_LIST) $(TOP_MAKE)
16 # Rules for output directories.
18 # Output will be places in a directory name based on Toolchain and configuration
19 # be default this will be "newlib/Debug". We use a python wrapped MKDIR to
20 # proivde a cross platform solution. The use of '|' checks for existance instead
21 # of timestamp, since the directory can update when files change.
25 @echo Directory Stamp > $@
28 # Define a LOG macro that allow a command to be run in quiet mode where
29 # the command echoed is not the same as the actual command executed.
30 # The primary use case for this is to avoid echoing the full compiler
31 # and linker command in the default case. Defining V=1 will restore
32 # the verbose behavior
34 # $1 = The name of the tool being run
35 # $2 = The target file being built
36 # $3 = The full command to run
45 @echo $(1) $(2) && $(3)
49 @echo " $(1) $(2)" && $(3)
57 # $1 = Output (fully qualified path)
58 # $2 = Input (fully qualified path)
59 # $3 = Tool (fully qualified path)
60 # $4 = PRE ARGS (before output name)
61 # $5 = STD ARGS (before input name)
62 # $6 = POST ARGS (final args)
63 # $7 = Extra Required DEPS
64 # $8 = Add to Depend list
65 # $9 = GROUP Name (compile, lib, link, etc...)
67 # The standard definition is:
69 # $(3) $(4) $(1) $(5) $(2) $(6)
72 # gcc -o a.o -c a.c $(CCFLAGS)
86 @echo DEPENDS ON: $(7)
87 @echo DEPEND FOR: $(8)
98 $(2)_clean: $(1)_clean
104 .PHONY : compile compile_info
106 # Basic Compile Target
108 define BASIC_COMPILE_TARGET
109 $(call BASIC_TARGET,$(1),$(2),$(3),$(4),$(5),$(6),$(7) $(MAKEFILE_DEPS),$(8),compile)
111 -include $(patsubst %.o,%.d,$(1))
112 $(1) : $(2) $(7) $(MAKEFILE_DEPS)
114 $(call LOG,$(notdir $(3)),$(1),$(3) $(4) -o $(1) -c $(2) $(5) $(6))
117 $(basename $(notdir $(1))).txt : $(2) $(7) $(MAKEFILE_DEPS)
118 $(call LOG,$(notdir $(3) -E),$(basename $(notdir $(1))).txt,$(3) $(4) -o $(basename $(notdir $(1))).txt -E $(2) $(5) $(6))
122 .PHONY : lib lib_info lib_clean
124 # Basic Libarary Target
126 define BASIC_LIB_TARGET
127 $(call BASIC_TARGET,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),lib)
128 $(call CLEAN_TARGET,$(1),lib)
131 $(1): $(2) $(7) | $(dir $(1))dir.stamp
133 $(call LOG,LIB ,$(1),$(3) $(4) -cr $(1) $(2) $(5) $(6))
139 .PHONY : link link_info link_clean
140 define BASIC_LINK_TARGET
141 $(call BASIC_TARGET,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),link)
142 $(call CLEAN_TARGET,$(1),link)
145 $(1): $(2) $(7) | $(dir $(1))dir.stamp
146 $(call LOG,LINK,$(1),$(3) $(4) -o $(1) $(2) $(5) $(6))
150 # Basic Install Target
152 .PHONY : install_info install_clean
153 define BASIC_INSTALL_TARGET
154 $(call BASIC_TARGET,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),install)
155 $(call CLEAN_TARGET,$(1),install)
158 $(1): $(2) $(7) | $(dir $(1))dir.stamp
159 $(call LOG,CP,$(1),$(3) $(4) $(5) $(2) $(1) $(6))
162 .PHONY : stamp_info stamp_clean
166 define BASIC_STAMP_TARGET
167 $(call BASIC_TARGET,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),stamp)
168 $(call CLEAN_TARGET,$(1),stamp)
172 $(1): $(2) $(7) | $(dir $(1))dir.stamp
173 $(call LOG,STAMP,$(1),$(3) $(4) $(5) $(6) > $(1))
183 # $4 = Extra Required DEPS
184 # $5 = Add to Depend list
185 define C_COMPILER_RULE
186 ifneq (,$(findstring x86_32,$(ARCHES)))
187 $(call BASIC_COMPILE_TARGET,$(call SRC_TO_OBJ,$(1),_x86_32,$(3)),$(1),$(X86_32_CC),$(X86_INCS) $(POSIX_FLAGS),$(2),$(X86_32_CFLAGS) $(X86_32_CCFLAGS),$(4),$(5))
190 ifneq (,$(findstring x86_64,$(ARCHES)))
191 $(call BASIC_COMPILE_TARGET,$(call SRC_TO_OBJ,$(1),_x86_64,$(3)),$(1),$(X86_64_CC),$(X86_INCS) $(POSIX_FLAGS),$(2),$(X86_64_CFLAGS) $(X86_64_CCFLAGS),$(4),$(5))
194 ifneq (,$(findstring arm,$(ARCHES)))
195 $(call BASIC_COMPILE_TARGET,$(call SRC_TO_OBJ,$(1),_arm,$(3)),$(1),$(ARM_CC),$(ARM_INCS) $(POSIX_FLAGS),$(2),$(ARM_CFLAGS) $(ARM_CCFLAGS),$(4),$(5))
199 define CXX_COMPILER_RULE
200 ifneq (,$(findstring x86_32,$(ARCHES)))
201 $(call BASIC_COMPILE_TARGET,$(call SRC_TO_OBJ,$(1),_x86_32,$(3)),$(1),$(X86_32_CXX),$(X86_INCS) $(POSIX_FLAGS),$(2),$(X86_32_CFLAGS) $(X86_32_CXXFLAGS),$(4),$(5))
204 ifneq (,$(findstring x86_64,$(ARCHES)))
205 $(call BASIC_COMPILE_TARGET,$(call SRC_TO_OBJ,$(1),_x86_64,$(3)),$(1),$(X86_64_CXX),$(X86_INCS) $(POSIX_FLAGS),$(2),$(X86_64_CFLAGS) $(X86_64_CXXFLAGS),$(4),$(5))
208 ifneq (,$(findstring arm,$(ARCHES)))
209 $(call BASIC_COMPILE_TARGET,$(call SRC_TO_OBJ,$(1),_arm,$(3)),$(1),$(ARM_CXX),$(ARM_INCS) $(POSIX_FLAGS),$(2),$(ARM_CFLAGS) $(ARM_CXXFLAGS),$(4),$(5))
215 # $2 = POSIX Compile Flags
217 # $4 = Extra Required DEPS
218 # $5 = Add to Depend list
221 ifeq ($(suffix $(1)),.c)
222 $(call C_COMPILER_RULE,$(1),$(2),$(3),$(4),$(5))
224 $(call CXX_COMPILER_RULE,$(1),$(2),$(3),$(4),$(5))
234 # $3 = Extra Required DEPS
235 # $4 = Add to Depend list
238 $(call BASIC_INSTALL_TARGET,$(1),$(2),cp,,,,$(3),$(4))
247 # $4 = Extra Required DEPS
248 # $5 = Defines target
250 ifneq (,$(findstring x86_32,$(ARCHES)))
251 $(call INSTALL_RULE,$(LIBDIR)/nacl_x86_32/$(CONFIG)/$(1).$(2),$(3)/$(1)_x86_32.$(2),$(4),$(5))
254 ifneq (,$(findstring x86_64,$(ARCHES)))
255 $(call INSTALL_RULE,$(LIBDIR)/nacl_x86_64/$(CONFIG)/$(1).$(2),$(3)/$(1)_x86_64.$(2),$(4),$(5))
258 ifneq (,$(findstring arm,$(ARCHES)))
259 $(call INSTALL_RULE,$(LIBDIR)/nacl_arm/$(CONFIG)/$(1).$(2),$(3)/$(1)_arm.$(2),$(4),$(5))
270 # $5 = Extra Required DEPS
271 # $6 = Add to Depend list
272 define INSTALL_LIB_AS
273 ifneq (,$(findstring x86_32,$(ARCHES)))
274 $(call INSTALL_RULE,$(LIBDIR)/nacl_x86_32/$(CONFIG)/$(1),$(2)/$(3)_x86_32.$(4),$(5),$(6))
277 ifneq (,$(findstring x86_64,$(ARCHES)))
278 $(call INSTALL_RULE,$(LIBDIR)/nacl_x86_64/$(CONFIG)/$(1),$(2)/$(3)_x86_64.$(4),$(5),$(6))
281 ifneq (,$(findstring arm,$(ARCHES)))
282 $(call INSTALL_RULE,$(LIBDIR)/nacl_arm/$(CONFIG)/$(1),$(2)/$(3)_arm.$(4),$(5),$(6))
290 # $2 = List of Sources
294 define LIB_RULE_X86_32
295 ifneq (,$(findstring x86_32,$(ARCHES)))
296 $(call BASIC_LIB_TARGET,$(3)/lib$(1)_x86_32.a,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_32,$(3))),$(X86_32_LIB),,,,$(4),$(5))
300 define LIB_RULE_X86_64
301 ifneq (,$(findstring x86_64,$(ARCHES)))
302 $(call BASIC_LIB_TARGET,$(3)/lib$(1)_x86_64.a,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_64,$(3))),$(X86_64_LIB),,,,$(4),$(5))
307 ifneq (,$(findstring arm,$(ARCHES)))
308 $(call BASIC_LIB_TARGET,$(3)/lib$(1)_arm.a,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm,$(3))),$(ARM_LIB),,,,$(4),$(5))
313 $(call LIB_RULE_X86_32,$(1),$(2),$(3),$(4),$(5))
314 $(call LIB_RULE_X86_64,$(1),$(2),$(3),$(4),$(5))
315 $(call LIB_RULE_ARM,$(1),$(2),$(3),$(4),$(5))
318 #DEFAULT_STATIC_LIBS ?=-lsupc++ -lc -lgcc_eh
319 #DEFAULT_STATIC_DEPS ?=libsupc++.a libc.a libgcc_eh.a crtbegin_st.o crtend_st.o
321 #DEFAULT_DYNAMIC_LIBS ?=-lsupc++ -lc -lgcc_s
322 #DEFAULT_DYNAMIC_DEPS ?=libsupc++.so libc.so libgcc_s.so crtbegin_dy.o crtend_dy.o
324 #DEFAULT_SO_LIBS ?=-lsupc++ -lc -lgcc_s -lgcc
325 #DEFAULT_SO_DEPS ?=libsupc++.so libc.so libgcc_s.so crtbegin_so.o crtend_so.o
327 DEFAULT_STATIC_LIBS ?=-lsupc++ -lc -lgcc_eh
328 DEFAULT_STATIC_DEPS ?=libsupc++.a libc.a crtbegin_st.o crtend_st.o
330 DEFAULT_DYNAMIC_LIBS ?=-lsupc++ -lc -lgcc_s
331 DEFAULT_DYNAMIC_DEPS ?=libsupc++.so libc.so libgcc_s.so crtbegin_dy.o crtend_dy.o
333 DEFAULT_SO_LIBS ?=-lsupc++ -lc -lgcc_s
334 DEFAULT_SO_DEPS ?=libsupc++.so libc.so libgcc_s.so crtbegin_so.o crtend_so.o
336 LDFLAGS_STATIC ?= -nostdlib -nostartfiles -static
337 LDFLAGS_DYNAMIC ?= -nostdlib -nostartfiles -Wl,-Ttext-segment,0x1000000 -Wl,--hash-style=sysv
338 LDFLAGS_SO ?= -nostdlib -nostartfiles -shared -fPIC -Wl,--hash-style=sysv -g
340 X86_32_LD ?= -L$(X86_32_LIB_PATH)
341 X86_64_LD ?= -L$(X86_64_LIB_PATH)
342 ARM_LD ?= -L$(ARM_LIB_PATH) -mcpu=cortex-a15 -mfloat-abi=hard -mthumb-interwork -Wl,-z,noexecstack -Wl,--fix-cortex-a8 -Wl,-Bsymbolic -Wl,--warn-shared-textrel
344 X86_32_LD_HEAD_STATIC ?= $(LIBDIR)/nacl_x86_32/$(CONFIG)/crtbegin_st.o
345 X86_64_LD_HEAD_STATIC ?= $(LIBDIR)/nacl_x86_64/$(CONFIG)/crtbegin_st.o
346 ARM_LD_HEAD_STATIC ?= $(LIBDIR)/nacl_arm/$(CONFIG)/crtbegin_st.o
348 X86_32_LD_HEAD_DYNAMIC ?= $(LIBDIR)/nacl_x86_32/$(CONFIG)/crtbegin_dy.o
349 X86_64_LD_HEAD_DYNAMIC ?= $(LIBDIR)/nacl_x86_64/$(CONFIG)/crtbegin_dy.o
350 ARM_LD_HEAD_DYNAMIC ?= $(LIBDIR)/nacl_arm/$(CONFIG)/crtbegin_dy.o
352 X86_32_LD_HEAD_SO ?= $(LIBDIR)/nacl_x86_32/$(CONFIG)/crtbegin_so.o
353 X86_64_LD_HEAD_SO ?= $(LIBDIR)/nacl_x86_64/$(CONFIG)/crtbegin_so.o
354 ARM_LD_HEAD_SO ?= $(LIBDIR)/nacl_arm/$(CONFIG)/crtbegin_so.o
356 ARM_LIBGCC_A ?= $(ARM_TC)/lib/gcc/arm-nacl/4.8.2/libgcc.a
357 X86_32_LIBGCC_A ?= $(X86_TC)/lib/gcc/x86_64-nacl/4.4.3/32/libgcc.a
358 X86_64_LIBGCC_A ?= $(X86_TC)/lib/gcc/x86_64-nacl/4.4.3/libgcc.a
360 X86_32_LD_TAIL_STATIC ?= -T $(NACL_SDK_ROOT)/arch-x86_32/lib/static.lds $(DEFAULT_STATIC_LIBS) -lgcc_eh $(X86_32_LIBGCC_A) $(LIBDIR)/nacl_x86_32/$(CONFIG)/crtend_st.o
361 X86_64_LD_TAIL_STATIC ?= -T $(NACL_SDK_ROOT)/arch-x86_64/lib/static.lds $(DEFAULT_STATIC_LIBS) -lgcc_eh $(X86_64_LIBGCC_A) $(LIBDIR)/nacl_x86_64/$(CONFIG)/crtend_st.o
362 ARM_LD_TAIL_STATIC ?= -T $(NACL_SDK_ROOT)/arch-arm/lib/static.lds $(DEFAULT_STATIC_LIBS) $(ARM_LIBGCC_A) $(LIBDIR)/nacl_arm/$(CONFIG)/crtend_st.o
364 X86_32_LD_TAIL_DYNAMIC ?= $(DEFAULT_DYNAMIC_LIBS) $(X86_32_LIBGCC_A) $(LIBDIR)/nacl_x86_32/$(CONFIG)/crtend_dy.o
365 X86_64_LD_TAIL_DYNAMIC ?= $(DEFAULT_DYNAMIC_LIBS) $(X86_64_LIBGCC_A) $(LIBDIR)/nacl_x86_64/$(CONFIG)/crtend_dy.o
366 ARM_LD_TAIL_DYNAMIC ?= $(DEFAULT_DYNAMIC_LIBS) $(ARM_LIBGCC_A) $(LIBDIR)/nacl_arm/$(CONFIG)/crtend_dy.o
368 X86_32_LD_TAIL_SO ?= $(DEFAULT_SO_LIBS) $(X86_32_LIBGCC_A) $(LIBDIR)/nacl_x86_32/$(CONFIG)/crtend_so.o
369 X86_64_LD_TAIL_SO ?= $(DEFAULT_SO_LIBS) $(X86_64_LIBGCC_A) $(LIBDIR)/nacl_x86_64/$(CONFIG)/crtend_so.o
370 ARM_LD_TAIL_SO ?= $(DEFAULT_SO_LIBS) $(ARM_LIBGCC_A) $(LIBDIR)/nacl_arm/$(CONFIG)/crtend_so.o
374 # As well as building and installing a shared library this rule adds dependencies
375 # on the library's .stamp file in STAMPDIR. However, the rule for creating the stamp
376 # file is part of LIB_RULE, so users of the DEPS system are currently required to
377 # use the LIB_RULE macro as well as the SO_RULE for each shared library.
380 # $2 = List of Sources
385 define SO_LINK_RULE_X86_32
386 ifneq (,$(findstring x86_32,$(ARCHES)))
387 $(call BASIC_LINK_TARGET,$(4)/lib$(1)_x86_32.so,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_32,$(4))),$(X86_32_LINK),$(LDFLAGS_SO) $(X86_32_LD) $(X86_32_LD_HEAD_SO),$(3),$(X86_32_LD_TAIL_SO),$(5),$(6))
391 define SO_LINK_RULE_X86_64
392 ifneq (,$(findstring x86_64,$(ARCHES)))
393 $(call BASIC_LINK_TARGET,$(4)/lib$(1)_x86_64.so,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_64,$(4))),$(X86_64_LINK),$(LDFLAGS_SO) $(X86_64_LD) $(X86_64_LD_HEAD_SO),$(3),$(X86_64_LD_TAIL_SO),$(5),$(6))
397 define SO_LINK_RULE_ARM
398 ifneq (,$(findstring arm,$(ARCHES)))
399 $(call BASIC_LINK_TARGET,$(4)/lib$(1)_arm.so,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm,$(4))),$(ARM_LINK),$(LDFLAGS_SO) $(ARM_LD) $(ARM_LD_HEAD_SO),$(3),$(ARM_LD_TAIL_SO),$(5),$(6))
404 $(call SO_LINK_RULE_X86_32,$(1),$(2),$(3),$(4),$(5) $(foreach src,$(DEFAULT_SO_DEPS),$(LIBDIR)/nacl_x86_32/$(CONFIG)/$(src)),$(6))
405 $(call SO_LINK_RULE_X86_64,$(1),$(2),$(3),$(4),$(5) $(foreach src,$(DEFAULT_SO_DEPS),$(LIBDIR)/nacl_x86_64/$(CONFIG)/$(src)),$(6))
406 $(call SO_LINK_RULE_ARM,$(1),$(2),$(3),$(4),$(5) $(foreach src,$(DEFAULT_SO_DEPS),$(LIBDIR)/nacl_arm/$(CONFIG)/$(src)),$(6))
411 # Specific Link Macro
414 # $2 = List of Sources
419 define STATIC_LINK_RULE_X86_32
420 ifneq (,$(findstring x86_32,$(ARCHES)))
421 $(call BASIC_LINK_TARGET,$(4)/$(1)_x86_32.nexe,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_32,$(4))),$(X86_32_LINK), $(LDFLAGS_STATIC) $(X86_32_LD) $(X86_32_LD_HEAD_STATIC),$(3),$(X86_32_LD_TAIL_STATIC),$(5),$(6))
425 define STATIC_LINK_RULE_X86_64
426 ifneq (,$(findstring x86_64,$(ARCHES)))
427 $(call BASIC_LINK_TARGET,$(4)/$(1)_x86_64.nexe,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_64,$(4))),$(X86_64_LINK), $(LDFLAGS_STATIC) $(X86_64_LD) $(X86_64_LD_HEAD_STATIC),$(3),$(X86_64_LD_TAIL_STATIC),$(5),$(6))
431 define STATIC_LINK_RULE_ARM
432 ifneq (,$(findstring arm,$(ARCHES)))
433 $(call BASIC_LINK_TARGET,$(4)/$(1)_arm.nexe,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm,$(4))),$(ARM_LINK), $(LDFLAGS_STATIC) $(ARM_LD) $(ARM_LD_HEAD_STATIC),$(3),$(ARM_LD_TAIL_STATIC),$(5),$(6))
437 define STATIC_LINK_RULE
438 $(call STATIC_LINK_RULE_X86_32,$(1),$(2),$(3),$(4),$(5))
439 $(call STATIC_LINK_RULE_X86_64,$(1),$(2),$(3),$(4),$(5))
440 $(call STATIC_LINK_RULE_ARM,$(1),$(2),$(3),$(4),$(5))
447 # $2 = List of Sources
452 define DYNAMIC_LINK_RULE_X86_32
453 ifneq (,$(findstring x86_32,$(ARCHES)))
454 $(call BASIC_LINK_TARGET,$(4)/$(1)_x86_32.nexe,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_32,$(4))),$(X86_32_LINK), $(LDFLAGS_DYNAMIC) $(X86_32_LD) $(X86_32_LD_HEAD_DYNAMIC),$(3),$(X86_32_LD_TAIL_DYNAMIC),$(5),$(6))
458 define DYNAMIC_LINK_RULE_X86_64
459 ifneq (,$(findstring x86_64,$(ARCHES)))
460 $(call BASIC_LINK_TARGET,$(4)/$(1)_x86_64.nexe,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_x86_64,$(4))),$(X86_64_LINK), $(LDFLAGS_DYNAMIC) $(X86_64_LD) $(X86_64_LD_HEAD_DYNAMIC),$(3),$(X86_64_LD_TAIL_DYNAMIC),$(5),$(6))
464 define DYNAMIC_LINK_RULE_ARM
465 ifneq (,$(findstring arm,$(ARCHES)))
466 $(call BASIC_LINK_TARGET,$(4)/$(1)_arm.nexe,$(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm,$(4))),$(ARM_LINK), $(LDFLAGS_DYNAMIC) $(ARM_LD) $(ARM_LD_HEAD_DYNAMIC),$(3),$(ARM_LD_TAIL_DYNAMIC),$(5),$(6))
470 define DYNAMIC_LINK_RULE
471 $(call DYNAMIC_LINK_RULE_X86_32,$(1),$(2),$(3),$(4),$(5))
472 $(call DYNAMIC_LINK_RULE_X86_64,$(1),$(2),$(3),$(4),$(5))
473 $(call DYNAMIC_LINK_RULE_ARM,$(1),$(2),$(3),$(4),$(5))
478 # Strip Macro for each arch (e.g., each arch supported by LINKER_RULE).
483 define STRIP_RULE_x86_32
484 ifneq (,$(findstring x86_32,$(ARCHES)))
485 all: $(OUTDIR)/$(1)_x86_32.nexe
486 $(OUTDIR)/$(1)_x86_32.nexe: $(OUTDIR)/$(2)_x86_32.nexe
487 $(call LOG,STRIP,$$@,$(X86_32_STRIP) -o $$@ $$^)
491 define STRIP_RULE_x86_64
492 ifneq (,$(findstring x86_64,$(ARCHES)))
493 all: $(OUTDIR)/$(1)_x86_64.nexe
494 $(OUTDIR)/$(1)_x86_64.nexe: $(OUTDIR)/$(2)_x86_64.nexe
495 $(call LOG,STRIP,$$@,$(X86_64_STRIP) -o $$@ $$^)
499 define STRIP_RULE_ARM
500 ifneq (,$(findstring arm,$(ARCHES)))
501 all: $(OUTDIR)/$(1)_arm.nexe
502 $(OUTDIR)/$(1)_arm.nexe: $(OUTDIR)/$(2)_arm.nexe
503 $(call LOG,STRIP,$$@,$(ARM_STRIP) -o $$@ $$^)
507 define STRIP_ALL_RULE
508 $(call STRIP_RULE_X86_32,$(1),$(2))
509 $(call STRIP_RULE_X86_64,$(1),$(2))
510 $(call STRIP_RULE_ARM,$(1),$(2))
515 # Top-level Strip Macro
517 # $1 = Target Basename
518 # $2 = Source Basename
521 $(call STRIP_ALL_RULE,$(1),$(2))
525 # Strip Macro for each arch (e.g., each arch supported by MAP_RULE).
531 ifneq (,$(findstring x86_32,$(ARCHES)))
532 all: $(OUTDIR)/$(1)_x86_32.map
533 $(OUTDIR)/$(1)_x86_32.map: $(OUTDIR)/$(2)_x86_32.nexe
534 $(call LOG,MAP,$$@,$(X86_32_NM) -l $$^ > $$@)
537 ifneq (,$(findstring x86_64,$(ARCHES)))
538 all: $(OUTDIR)/$(1)_x86_64.map
539 $(OUTDIR)/$(1)_x86_64.map: $(OUTDIR)/$(2)_x86_64.nexe
540 $(call LOG,MAP,$$@,$(X86_64_NM) -l $$^ > $$@)
543 ifneq (,$(findstring arm,$(ARCHES)))
544 all: $(OUTDIR)/$(1)_arm.map
545 $(OUTDIR)/$(1)_arm.map: $(OUTDIR)/$(2)_arm.nexe
546 $(call LOG,MAP,$$@,$(ARM_NM) -l $$^ > $$@ )
551 # Top-level MAP Generation Macro
553 # $1 = Target Basename
554 # $2 = Source Basename
557 $(call MAP_ALL_RULE,$(1),$(2))
563 # $1 = Target Basename
564 # $2 = Source Basename
570 $(call BASIC_STAMP_TARGET,$(1),$(2),echo,$(3),$(4),$(5))
573 info: compile_info lib_info link_info
574 @echo TOOLCHAIN=$(TOOLCHAIN)
575 @echo CONFIG=$(CONFIG)
576 @echo LIBDIR=$(LIBDIR)
577 @echo ARCHES=$(ARCHES)
578 @echo OUTDIR=$(OUTDIR)