]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - Makefile
Makefile: Use Kbuild style for system_map.o generation step
[karo-tx-uboot.git] / Makefile
index de65e2169bdebefc77afb896279c3a4364d74281..b5b3560dacc9be1b5b35afb0385be761e5bc2ce3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1004,13 +1004,17 @@ quiet_cmd_u-boot__ ?= LD      $@
       --start-group $(u-boot-main) --end-group                 \
       $(PLATFORM_LIBS) -Map u-boot.map
 
-u-boot:        $(u-boot-init) $(u-boot-main) u-boot.lds
-       $(call if_changed,u-boot__)
-ifeq ($(CONFIG_KALLSYMS),y)
+quiet_cmd_smap = GEN     common/system_map.o
+cmd_smap = \
        smap=`$(call SYSTEM_MAP,u-boot) | \
                awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
        $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
                -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
 endif