Makefile: Use Kbuild style for system_map.o generation step

The command generating the "common/system_map.o" file was always shown
during the build making the output messy. Now it is called using the
Kbuild "cmd" macro, so that the full command is shown only when
building in verbose mode.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
master
Vasili Galka 10 years ago committed by Tom Rini
parent 478a32875a
commit cac8f38aff
  1. 10
      Makefile

@ -1004,13 +1004,17 @@ quiet_cmd_u-boot__ ?= LD $@
--start-group $(u-boot-main) --end-group \ --start-group $(u-boot-main) --end-group \
$(PLATFORM_LIBS) -Map u-boot.map $(PLATFORM_LIBS) -Map u-boot.map
u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds quiet_cmd_smap = GEN common/system_map.o
$(call if_changed,u-boot__) cmd_smap = \
ifeq ($(CONFIG_KALLSYMS),y)
smap=`$(call SYSTEM_MAP,u-boot) | \ smap=`$(call SYSTEM_MAP,u-boot) | \
awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
$(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
-c $(srctree)/common/system_map.c -o common/system_map.o -c $(srctree)/common/system_map.c -o common/system_map.o
u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds
$(call if_changed,u-boot__)
ifeq ($(CONFIG_KALLSYMS),y)
$(call cmd,smap)
$(call cmd,u-boot__) common/system_map.o $(call cmd,u-boot__) common/system_map.o
endif endif

Loading…
Cancel
Save