]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
kbuild: use Linux Kernel build scripts
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Tue, 4 Feb 2014 08:24:28 +0000 (17:24 +0900)
committerTom Rini <trini@ti.com>
Wed, 19 Feb 2014 16:07:50 +0000 (11:07 -0500)
Now we are ready to switch over to real Kbuild.

This commit disables temporary scripts:
  scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
  scripts/{Makefile.build,Makefile.host,Makefile.lib}.

This switch is triggered by the line in scripts/Kbuild.include
  -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
  +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj

We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.

Additionally, we need to fix compiler flags which are
locally added or removed.

In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
77 files changed:
Makefile
arch/arm/imx-common/Makefile
arch/blackfin/cpu/Makefile
arch/blackfin/lib/Makefile
arch/m68k/cpu/mcf5227x/Makefile
arch/m68k/cpu/mcf523x/Makefile
arch/m68k/cpu/mcf52x2/Makefile
arch/m68k/cpu/mcf532x/Makefile
arch/m68k/cpu/mcf5445x/Makefile
arch/m68k/cpu/mcf547x_8x/Makefile
arch/powerpc/cpu/mpc8xx/Makefile
arch/powerpc/lib/Makefile
arch/sandbox/cpu/Makefile
board/bct-brettl2/config.mk
board/bf518f-ezbrd/config.mk
board/bf526-ezbrd/config.mk
board/bf527-ad7160-eval/config.mk
board/bf527-ezkit/config.mk
board/bf527-sdp/config.mk
board/bf533-ezkit/config.mk
board/bf533-stamp/config.mk
board/bf537-stamp/config.mk
board/bf538f-ezkit/config.mk
board/bf548-ezkit/config.mk
board/bf561-acvilon/config.mk
board/bf561-ezkit/config.mk
board/br4/config.mk
board/cm-bf527/config.mk
board/cm-bf533/config.mk
board/cm-bf537e/config.mk
board/cm-bf537u/config.mk
board/cm-bf548/config.mk
board/cm-bf561/config.mk
board/ip04/config.mk
board/matrix_vision/mvblx/Makefile
board/pr1/config.mk
board/sandburst/karef/Makefile
board/sandburst/metrobox/Makefile
board/st-ericsson/snowball/Makefile
board/st-ericsson/u8500/Makefile
board/tcm-bf518/config.mk
board/tcm-bf537/config.mk
common/Makefile
config.mk
disk/Makefile
doc/DocBook/Makefile
drivers/bios_emulator/Makefile
drivers/hwmon/Makefile
drivers/net/npe/Makefile
drivers/rtc/Makefile
drivers/usb/musb-new/Makefile
dts/Makefile
examples/api/Makefile
examples/standalone/Makefile
fs/ubifs/Makefile
fs/yaffs2/Makefile
lib/Makefile
lib/lzma/Makefile
nand_spl/board/amcc/acadia/Makefile
nand_spl/board/amcc/bamboo/Makefile
nand_spl/board/amcc/canyonlands/Makefile
nand_spl/board/amcc/kilauea/Makefile
nand_spl/board/amcc/sequoia/Makefile
nand_spl/board/freescale/mpc8315erdb/Makefile
nand_spl/board/freescale/mpc8536ds/Makefile
nand_spl/board/freescale/mpc8569mds/Makefile
nand_spl/board/freescale/mpc8572ds/Makefile
nand_spl/board/freescale/p1023rds/Makefile
nand_spl/board/freescale/p1_p2_rdb/Makefile
nand_spl/board/sheldon/simpc8313/Makefile
net/Makefile
post/lib_powerpc/fpu/Makefile
scripts/Kbuild.include
scripts/Makefile.build
scripts/Makefile.lib
spl/Makefile
tools/Makefile

index 1409c8bf39815de08ed082a9271dfcfe0b7ac545..4f00f08d314a238b1333badf9426ef2d07293a76 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,78 @@ else
 XECHO = :
 endif
 
 XECHO = :
 endif
 
+# *DOCUMENTATION*
+# To see a list of typical targets execute "make help"
+# More info can be located in ./README
+# Comments in this file are targeted only to the developer, do not
+# expect to learn how to build the kernel reading this file.
+
+# Do not:
+# o  use make's built-in rules and variables
+#    (this increases performance and avoids hard-to-debug behaviour);
+# o  print "Entering directory ...";
+MAKEFLAGS += -rR --no-print-directory
+
+# Avoid funny character set dependencies
+unexport LC_ALL
+LC_COLLATE=C
+LC_NUMERIC=C
+export LC_COLLATE LC_NUMERIC
+
+# We are using a recursive build, so we need to do a little thinking
+# to get the ordering right.
+#
+# Most importantly: sub-Makefiles should only ever modify files in
+# their own directory. If in some directory we have a dependency on
+# a file in another dir (which doesn't happen often, but it's often
+# unavoidable when linking the built-in.o targets which finally
+# turn into vmlinux), we will call a sub make in that other dir, and
+# after that we are sure that everything which is in that other dir
+# is now up to date.
+#
+# The only cases where we need to modify files which have global
+# effects are thus separated out and done before the recursive
+# descending is started. They are now explicitly listed as the
+# prepare rule.
+
+# To put more focus on warnings, be less verbose as default
+# Use 'make V=1' to see the full commands
+
+ifeq ("$(origin V)", "command line")
+  KBUILD_VERBOSE = $(V)
+endif
+ifndef KBUILD_VERBOSE
+  KBUILD_VERBOSE = 0
+endif
+
+# Call a source code checker (by default, "sparse") as part of the
+# C compilation.
+#
+# Use 'make C=1' to enable checking of only re-compiled files.
+# Use 'make C=2' to enable checking of *all* source files, regardless
+# of whether they are re-compiled or not.
+#
+# See the file "Documentation/sparse.txt" for more details, including
+# where to get the "sparse" utility.
+
+ifeq ("$(origin C)", "command line")
+  KBUILD_CHECKSRC = $(C)
+endif
+ifndef KBUILD_CHECKSRC
+  KBUILD_CHECKSRC = 0
+endif
+
+# Use make M=dir to specify directory of external module to build
+# Old syntax make ... SUBDIRS=$PWD is still supported
+# Setting the environment variable KBUILD_EXTMOD take precedence
+ifdef SUBDIRS
+  KBUILD_EXTMOD ?= $(SUBDIRS)
+endif
+
+ifeq ("$(origin M)", "command line")
+  KBUILD_EXTMOD := $(M)
+endif
+
 # kbuild supports saving output files in a separate directory.
 # To locate output files in a separate directory two syntaxes are supported.
 # In both cases the working directory must be the root of the kernel src.
 # kbuild supports saving output files in a separate directory.
 # To locate output files in a separate directory two syntaxes are supported.
 # In both cases the working directory must be the root of the kernel src.
@@ -107,8 +179,14 @@ endif # ifeq ($(KBUILD_SRC),)
 # We process the rest of the Makefile if this is the final invocation of make
 ifeq ($(skip-makefile),)
 
 # We process the rest of the Makefile if this is the final invocation of make
 ifeq ($(skip-makefile),)
 
+# If building an external module we do not care about the all: rule
+# but instead _all depend on modules
 PHONY += all
 PHONY += all
+ifeq ($(KBUILD_EXTMOD),)
 _all: all
 _all: all
+else
+_all: modules
+endif
 
 srctree                := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
 objtree                := $(CURDIR)
 
 srctree                := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
 objtree                := $(CURDIR)
@@ -119,24 +197,6 @@ VPATH              := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
 
 export srctree objtree VPATH
 
 
 export srctree objtree VPATH
 
-# Call a source code checker (by default, "sparse") as part of the
-# C compilation.
-#
-# Use 'make C=1' to enable checking of re-compiled files.
-#
-# See the linux kernel file "Documentation/sparse.txt" for more details,
-# including where to get the "sparse" utility.
-
-ifdef C
-ifeq ("$(origin C)", "command line")
-CHECKSRC := $(C)
-endif
-endif
-ifndef CHECKSRC
-  CHECKSRC = 0
-endif
-export CHECKSRC
-
 OBJTREE                := $(objtree)
 SPLTREE                := $(OBJTREE)/spl
 TPLTREE                := $(OBJTREE)/tpl
 OBJTREE                := $(objtree)
 SPLTREE                := $(OBJTREE)/spl
 TPLTREE                := $(OBJTREE)/tpl
@@ -222,6 +282,78 @@ HOSTCFLAGS  += $(call os_x_before, 10, 4, "-traditional-cpp")
 HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
 endif
 
 HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
 endif
 
+# Decide whether to build built-in, modular, or both.
+# Normally, just do built-in.
+
+KBUILD_MODULES :=
+KBUILD_BUILTIN := 1
+
+#      If we have only "make modules", don't compile built-in objects.
+#      When we're building modules with modversions, we need to consider
+#      the built-in objects during the descend as well, in order to
+#      make sure the checksums are up to date before we record them.
+
+ifeq ($(MAKECMDGOALS),modules)
+  KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1)
+endif
+
+#      If we have "make <whatever> modules", compile modules
+#      in addition to whatever we do anyway.
+#      Just "make" or "make all" shall build modules as well
+
+# U-Boot does not need modules
+#ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
+#  KBUILD_MODULES := 1
+#endif
+
+#ifeq ($(MAKECMDGOALS),)
+#  KBUILD_MODULES := 1
+#endif
+
+export KBUILD_MODULES KBUILD_BUILTIN
+export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
+
+# Beautify output
+# ---------------------------------------------------------------------------
+#
+# Normally, we echo the whole command before executing it. By making
+# that echo $($(quiet)$(cmd)), we now have the possibility to set
+# $(quiet) to choose other forms of output instead, e.g.
+#
+#         quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
+#         cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
+#
+# If $(quiet) is empty, the whole command will be printed.
+# If it is set to "quiet_", only the short version will be printed. 
+# If it is set to "silent_", nothing will be printed at all, since
+# the variable $(silent_cmd_cc_o_c) doesn't exist.
+#
+# A simple variant is to prefix commands with $(Q) - that's useful
+# for commands that shall be hidden in non-verbose mode.
+#
+#      $(Q)ln $@ :<
+#
+# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
+# If KBUILD_VERBOSE equals 1 then the above command is displayed.
+
+ifeq ($(KBUILD_VERBOSE),1)
+  quiet =
+  Q =
+else
+  quiet=quiet_
+  Q = @
+endif
+
+# If the user is running make -s (silent mode), suppress echoing of
+# commands
+
+ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
+  quiet=silent_
+endif
+
+export quiet Q KBUILD_VERBOSE
+
+
 # Look for make include files relative to root of kernel src
 MAKEFLAGS += --include-dir=$(srctree)
 
 # Look for make include files relative to root of kernel src
 MAKEFLAGS += --include-dir=$(srctree)
 
@@ -278,6 +410,31 @@ export DTC CHECK CHECKFLAGS
 export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE
 export KBUILD_CFLAGS KBUILD_AFLAGS
 
 export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE
 export KBUILD_CFLAGS KBUILD_AFLAGS
 
+# When compiling out-of-tree modules, put MODVERDIR in the module
+# tree rather than in the kernel tree. The kernel tree might
+# even be read-only.
+export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
+
+# Files to ignore in find ... statements
+
+RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
+                  -o -name .pc -o -name .hg -o -name .git \) -prune -o
+export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
+                        --exclude CVS --exclude .pc --exclude .hg --exclude .git
+
+# ===========================================================================
+# Rules shared between *config targets and build targets
+
+# Basic helpers built in scripts/
+PHONY += scripts_basic
+scripts_basic:
+       $(Q)$(MAKE) $(build)=scripts/basic
+       $(Q)rm -f .tmp_quiet_recordmcount
+
+# To avoid any implicit rule to kick in, define an empty command.
+scripts/basic/%: scripts_basic ;
+
+
 KBUILD_CFLAGS += -Os #-fomit-frame-pointer
 
 ifdef BUILD_TAG
 KBUILD_CFLAGS += -Os #-fomit-frame-pointer
 
 ifdef BUILD_TAG
@@ -333,6 +490,10 @@ endif
 endif
 endif
 
 endif
 endif
 
+# FIX ME
+cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS)
+c_flags := $(KBUILD_CFLAGS) $(cpp_flags)
+
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
@@ -446,12 +607,12 @@ LIBS := $(sort $(LIBS-y))
 # Add GCC lib
 ifdef USE_PRIVATE_LIBGCC
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
 # Add GCC lib
 ifdef USE_PRIVATE_LIBGCC
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
-PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o
+PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/lib.a
 else
 PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
 endif
 else
 else
 PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
 endif
 else
-PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
+PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
 endif
 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 export PLATFORM_LIBS
 endif
 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 export PLATFORM_LIBS
@@ -701,7 +862,7 @@ u-boot:     depend $(SUBDIR_TOOLS) $(OBJS) $(LIBS) u-boot.lds
 ifeq ($(CONFIG_KALLSYMS),y)
                smap=`$(call SYSTEM_MAP,u-boot) | \
                        awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
 ifeq ($(CONFIG_KALLSYMS),y)
                smap=`$(call SYSTEM_MAP,u-boot) | \
                        awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
-               $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \
+               $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
                        -c $(srctree)/common/system_map.c -o common/system_map.o
                $(GEN_UBOOT) common/system_map.o
 endif
                        -c $(srctree)/common/system_map.c -o common/system_map.o
                $(GEN_UBOOT) common/system_map.o
 endif
@@ -709,27 +870,27 @@ endif
 $(OBJS):
        @:
 
 $(OBJS):
        @:
 
-$(LIBS):       depend $(SUBDIR_TOOLS)
-               $(MAKE) $(build)=$(patsubst %/,%,$(dir $@))
+$(LIBS):       depend $(SUBDIR_TOOLS) scripts_basic
+               $(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@))
 
 
-$(SUBDIRS):    depend
-               $(MAKE) $(build)=$@ all
+$(SUBDIRS):    depend scripts_basic
+               $(Q)$(MAKE) $(build)=$@
 
 $(SUBDIR_EXAMPLES-y): u-boot
 
 u-boot.lds: $(LDSCRIPT) depend
 
 $(SUBDIR_EXAMPLES-y): u-boot
 
 u-boot.lds: $(LDSCRIPT) depend
-               $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@
+               $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 
-nand_spl:      $(TIMESTAMP_FILE) $(VERSION_FILE) depend
+nand_spl:      $(TIMESTAMP_FILE) $(VERSION_FILE) depend scripts_basic
                $(MAKE) $(build)=nand_spl/board/$(BOARDDIR) all
 
 u-boot-nand.bin:       nand_spl u-boot.bin
                cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin
 
                $(MAKE) $(build)=nand_spl/board/$(BOARDDIR) all
 
 u-boot-nand.bin:       nand_spl u-boot.bin
                cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin
 
-spl/u-boot-spl.bin:    $(SUBDIR_TOOLS) depend
+spl/u-boot-spl.bin:    $(SUBDIR_TOOLS) depend scripts_basic
                $(MAKE) obj=spl -f $(srctree)/spl/Makefile all
 
                $(MAKE) obj=spl -f $(srctree)/spl/Makefile all
 
-tpl/u-boot-tpl.bin:    $(SUBDIR_TOOLS) depend
+tpl/u-boot-tpl.bin:    $(SUBDIR_TOOLS) depend scripts_basic
                $(MAKE) obj=tpl -f $(srctree)/spl/Makefile all CONFIG_TPL_BUILD=y
 
 # Explicitly make _depend in subdirs containing multiple targets to prevent
                $(MAKE) obj=tpl -f $(srctree)/spl/Makefile all CONFIG_TPL_BUILD=y
 
 # Explicitly make _depend in subdirs containing multiple targets to prevent
@@ -804,14 +965,14 @@ checkdtc:
 include/autoconf.mk.dep: include/config.h include/common.h
        @$(XECHO) Generating $@ ; \
        : Generate the dependancies ; \
 include/autoconf.mk.dep: include/config.h include/common.h
        @$(XECHO) Generating $@ ; \
        : Generate the dependancies ; \
-       $(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \
+       $(CC) -x c -DDO_DEPS_ONLY -M $(c_flags) \
                -MQ include/autoconf.mk $(srctree)/include/common.h > $@ || \
                rm $@
 
 include/autoconf.mk: include/config.h
        @$(XECHO) Generating $@ ; \
        : Extract the config macros ; \
                -MQ include/autoconf.mk $(srctree)/include/common.h > $@ || \
                rm $@
 
 include/autoconf.mk: include/config.h
        @$(XECHO) Generating $@ ; \
        : Extract the config macros ; \
-       $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
+       $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
                sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
        rm $@.tmp
 
                sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
        rm $@.tmp
 
@@ -819,7 +980,7 @@ include/autoconf.mk: include/config.h
 include/tpl-autoconf.mk: include/config.h
        @$(XECHO) Generating $@ ; \
        : Extract the config macros ; \
 include/tpl-autoconf.mk: include/config.h
        @$(XECHO) Generating $@ ; \
        : Extract the config macros ; \
-       $(CPP) $(CFLAGS) -DCONFIG_TPL_BUILD  -DCONFIG_SPL_BUILD\
+       $(CPP) $(c_flags) -DCONFIG_TPL_BUILD  -DCONFIG_SPL_BUILD\
                        -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
                sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
        rm $@.tmp
                        -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
                sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
        rm $@.tmp
@@ -827,7 +988,7 @@ include/tpl-autoconf.mk: include/config.h
 include/spl-autoconf.mk: include/config.h
        @$(XECHO) Generating $@ ; \
        : Extract the config macros ; \
 include/spl-autoconf.mk: include/config.h
        @$(XECHO) Generating $@ ; \
        : Extract the config macros ; \
-       $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
+       $(CPP) $(c_flags) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
                sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
        rm $@.tmp
 
                sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
        rm $@.tmp
 
@@ -838,7 +999,7 @@ include/generated/generic-asm-offsets.h: lib/asm-offsets.s
 lib/asm-offsets.s: include/config.h $(srctree)/lib/asm-offsets.c
        @mkdir -p lib
        $(CC) -DDO_DEPS_ONLY \
 lib/asm-offsets.s: include/config.h $(srctree)/lib/asm-offsets.c
        @mkdir -p lib
        $(CC) -DDO_DEPS_ONLY \
-               $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+               $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
                -o $@ $(srctree)/lib/asm-offsets.c -c -S
 
 include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s
                -o $@ $(srctree)/lib/asm-offsets.c -c -S
 
 include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s
@@ -849,7 +1010,7 @@ $(CPUDIR)/$(SOC)/asm-offsets.s:    include/config.h
        @mkdir -p $(CPUDIR)/$(SOC)
        if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
                $(CC) -DDO_DEPS_ONLY \
        @mkdir -p $(CPUDIR)/$(SOC)
        if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
                $(CC) -DDO_DEPS_ONLY \
-               $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+               $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
                        -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \
        else \
                touch $@; \
                        -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \
        else \
                touch $@; \
@@ -900,15 +1061,15 @@ $(TIMESTAMP_FILE):
                @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
 
 easylogo env gdb:
                @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
 
 easylogo env gdb:
-       $(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION}
+       $(Q)$(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION}
 
 gdbtools: gdb
 
 xmldocs pdfdocs psdocs htmldocs mandocs: tools/kernel-doc/docproc
 
 gdbtools: gdb
 
 xmldocs pdfdocs psdocs htmldocs mandocs: tools/kernel-doc/docproc
-       $(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@
+       $(Q)$(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@
 
 tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE)
 
 tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE)
-       $(MAKE) $(build)=tools HOST_TOOLS_ALL=y
+       $(Q)$(MAKE) $(build)=tools HOST_TOOLS_ALL=y
 
 .PHONY : CHANGELOG
 CHANGELOG:
 
 .PHONY : CHANGELOG
 CHANGELOG:
@@ -968,7 +1129,7 @@ clean:
        @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs
        @find $(OBJTREE) -type f \
                \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \
        @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs
        @find $(OBJTREE) -type f \
                \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \
-               -o -name '*.o'  -o -name '*.a' -o -name '*.exe' \
+               -o -name '*.o'  -o -name '*.a' -o -name '*.exe' -o -name '*.cmd' \
                -o -name '*.cfgtmp' \) -print \
                | xargs rm -f
 
                -o -name '*.cfgtmp' \) -print \
                | xargs rm -f
 
index ee5c872f51e6d49e3e878c4e8d93c9ac59bb805a..9dda59df04b8526e9879b664d21af7174fb453de 100644 (file)
@@ -25,7 +25,7 @@ obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o
 
 $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/%
        mkdir -p $(dir $@)
 
 $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/%
        mkdir -p $(dir $@)
-       $(CC) -E -x c $< $(CPPFLAGS) -o $@
+       $(CPP) $(cpp_flags) -x c -o $@ $<
 
 $(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
        $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
 
 $(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
        $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
index 369dc74e947848c94543b9050fb0433bbd200432..dd4d2d13e0eb2bc91062c537db8673c2d779e3f5 100644 (file)
@@ -25,7 +25,7 @@ extra-y += check_initcode
 
 # make sure our initcode (which goes into LDR) does not
 # have relocs or external references
 
 # make sure our initcode (which goes into LDR) does not
 # have relocs or external references
-$(obj)/initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
+CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections
 READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
 $(obj)/check_initcode: $(obj)/initcode.o
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
 READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
 $(obj)/check_initcode: $(obj)/initcode.o
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
@@ -35,7 +35,6 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
        fi
 endif
 
        fi
 endif
 
-$(obj)/init.lds: $(src)/init.lds.S
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@
+CPPFLAGS_init.lds := -ansi
 $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
        $(LD) $(LDFLAGS) -T $^ -o $@
 $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
        $(LD) $(LDFLAGS) -T $^ -o $@
index a5c552f38a63bb0871916cfdfb13304007107a8a..4ba7bf694934d9c2aef6dbf9dbda7244049f6419 100644 (file)
@@ -9,7 +9,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS += -DBFIN_BOARD_NAME='"$(BOARD)"'
+# Unnecessary.
+# Use CONFIG_SYS_BOARD instead of BFIN_BOARD_NAME
+# and delete this.
+ccflags-y += -DBFIN_BOARD_NAME='"$(BOARD)"'
 
 obj-y  += ins.o
 obj-y  += memcmp.o
 
 obj-y  += ins.o
 obj-y  += memcmp.o
index a47fd56739d5a9452f04256a4e8d12d45f895ec7..e0c5db60f4efb6d265fa23611f1af9101897fbfc 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y        = start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o
 
 extra-y        = start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o
index a47fd56739d5a9452f04256a4e8d12d45f895ec7..e0c5db60f4efb6d265fa23611f1af9101897fbfc 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y        = start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o
 
 extra-y        = start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o
index d9bf9008ecc5a3d9f9393b87857e17aecd1e0606..b92fd864c4d7312610b5bcf1aac6fe51bda24994 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y        = start.o
 obj-y  = interrupts.o cpu.o speed.o cpu_init.o
 
 extra-y        = start.o
 obj-y  = interrupts.o cpu.o speed.o cpu_init.o
index 97aa3f16a9fb62f3cda7134e39bc009ab21fbd08..9c53c50c4870efdcabe426ca2984300c232e01d0 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y := start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o
 
 extra-y := start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o
index b506719c8f0b27860a2b267a25e46ad1b4941720..9be91ed1572043a4e42d4fefd0cc98e9d5f227dc 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y        = start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o pci.o
 
 extra-y        = start.o
 obj-y  = cpu.o speed.o cpu_init.o interrupts.o pci.o
index 0fa50bfccd892ee3bf808c8a95ffb93a7ca2babf..4f82099b6b239e2da79408583806aa05591d6136 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y = start.o
 obj-y  = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o
 
 extra-y = start.o
 obj-y  = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o
index d40bdab1e1428906096c1ccd8e39682114f640ec..f83fd5ecf4d2045a8d039163e18d3123add3631f 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DET_DEBUG
+# ccflags-y += -DET_DEBUG
 
 extra-y += start.o
 extra-y += traps.o
 
 extra-y += start.o
 extra-y += traps.o
index ac780d4077f5d38794d906912de5a009e66033ed..e6d8be51cae831a60367cc233299e1fd98ef0811 100644 (file)
@@ -54,11 +54,11 @@ ifndef CONFIG_SPL_BUILD
 # Workaround for local bus unaligned access problems
 # on MPC512x and MPC5200
 ifdef CONFIG_MPC512X
 # Workaround for local bus unaligned access problems
 # on MPC512x and MPC5200
 ifdef CONFIG_MPC512X
-$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
+AFLAGS_ppcstring.o += -Dmemcpy=__memcpy
 obj-y += memcpy_mpc5200.o
 endif
 ifdef CONFIG_MPC5200
 obj-y += memcpy_mpc5200.o
 endif
 ifdef CONFIG_MPC5200
-$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
+AFLAGS_ppcstring.o += -Dmemcpy=__memcpy
 obj-y += memcpy_mpc5200.o
 endif
 endif
 obj-y += memcpy_mpc5200.o
 endif
 endif
index c5f5426b05f2041e5d15e14ae45ffb244d0b56f5..63dededf70f85125bbb67a9dce1c3cb31e6a23e6 100644 (file)
 obj-y  := cpu.o os.o start.o state.o
 
 # os.c is build in the system environment, so needs standard includes
 obj-y  := cpu.o os.o start.o state.o
 
 # os.c is build in the system environment, so needs standard includes
-$(obj)/os.o: CFLAGS := $(filter-out -nostdinc,\
-       $(patsubst -I%,-idirafter%,$(CFLAGS)))
-$(obj)/.depend.os: CPPFLAGS := $(filter-out -nostdinc,\
-       $(patsubst -I%,-idirafter%,$(CPPFLAGS)))
+# CFLAGS_REMOVE_os.o cannot be used to drop header include path
+quiet_cmd_cc_os.o = CC $(quiet_modtag)  $@
+cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \
+       $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
+
+$(obj)/os.o: $(src)/os.c FORCE
+       $(call if_changed_dep,cc_os.o)
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index 5f327a990e1f2875d7dcca497465356c3f382d92..af299f5f1e17256bc90c725c97b1c60e44461039 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index ae2ea0b74763208a87b2ea499ee627f4ffa9fab3..bc0e7476e504100a1289f9108448687990304d5a 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index ad3a7293dfe24003a8980e3f67adc292a4e15cec..8d2c60f308c91064f63e4054132c87cec122120f 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA       := --dma 6
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA       := --dma 6
index c33aef9d283c7ef116644705f5dc4dad3717c251..ce9471557228ccd9d926f8a4ceef2a775137d875 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
index c33aef9d283c7ef116644705f5dc4dad3717c251..ce9471557228ccd9d926f8a4ceef2a775137d875 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
index 5c18d5c9e468db4b2b518b2676cd37bf2120972c..2436ec07f43b2d117d2161c08be630f5426dd5be 100644 (file)
@@ -9,6 +9,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index c005afb881f66f80f1005f71186bd2a098058688..289c8a488e0bef7307530b2b24ba6172b8e4e540 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA       := --dma 6
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA       := --dma 6
index c33aef9d283c7ef116644705f5dc4dad3717c251..ce9471557228ccd9d926f8a4ceef2a775137d875 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
index ae2ea0b74763208a87b2ea499ee627f4ffa9fab3..bc0e7476e504100a1289f9108448687990304d5a 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index c6c09339562af7644e2c75e3dbbb4c28e80e9c8b..c056ebaf781d4a07dc787f1a69b439882e7f8ad4 100644 (file)
@@ -8,4 +8,4 @@
 obj-y += mvblx.o fpga.o
 obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o
 
 obj-y += mvblx.o fpga.o
 obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o
 
-CFLAGS += -Werror
+ccflags-y += -Werror
index 5c18d5c9e468db4b2b518b2676cd37bf2120972c..2436ec07f43b2d117d2161c08be630f5426dd5be 100644 (file)
@@ -9,6 +9,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index f890008be22885f86ce712d94a1c6cee86718ca6..d5a9b34f1d2baa922fe908c63cf8cb3ea9f342dd 100644 (file)
@@ -13,7 +13,7 @@
 BUILDUSER := $(shell whoami)
 FORCEBUILD := $(shell rm -f karef.o)
 
 BUILDUSER := $(shell whoami)
 FORCEBUILD := $(shell rm -f karef.o)
 
-CFLAGS += -DBUILDUSER='"$(BUILDUSER)"'
+ccflags-y += -DBUILDUSER='"$(BUILDUSER)"'
 # TBS: end debugging
 
 obj-y  = karef.o ../common/flash.o ../common/sb_common.o
 # TBS: end debugging
 
 obj-y  = karef.o ../common/flash.o ../common/sb_common.o
index 37d91a51a3a22f80c1d0e8356f3634c701b085b4..8121cce514db2aa74ffbf952efc1a8a668dd69c5 100644 (file)
@@ -12,7 +12,7 @@
 BUILDUSER := $(shell whoami)
 FORCEBUILD := $(shell rm -f metrobox.o)
 
 BUILDUSER := $(shell whoami)
 FORCEBUILD := $(shell rm -f metrobox.o)
 
-CFLAGS += -DBUILDUSER='"$(BUILDUSER)"'
+ccflags-y += -DBUILDUSER='"$(BUILDUSER)"'
 # TBS: end debugging
 
 obj-y  = metrobox.o ../common/flash.o ../common/sb_common.o
 # TBS: end debugging
 
 obj-y  = metrobox.o ../common/flash.o ../common/sb_common.o
index 6867a70b7cf269b4b3bb8c26fc9d26e92839af5c..f0605e2bcd3ca3685a1e85e7fbeda1c4a1b5d4c7 100644 (file)
@@ -4,6 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS += -D__RELEASE -D__STN_8500
+ccflags-y += -D__RELEASE -D__STN_8500
 
 obj-y  := snowball.o
 
 obj-y  := snowball.o
index b9dfbe935959cb3ac73d31b5742e7aa0d866a95d..d6c4280475aac343a13ed8539b9ed53ed860fa16 100644 (file)
@@ -4,6 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS += -D__RELEASE -D__STN_8500
+ccflags-y += -D__RELEASE -D__STN_8500
 
 obj-y  := u8500_href.o gpio.o
 
 obj-y  := u8500_href.o gpio.o
index f1ef9bf682dde110e7a1f50f0cf5cc853d79a953..0d3df2dbd90209ee815c93a3c6a114625c9f2267 100644 (file)
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
index 973d357559369c8cbf8ed1175938992f4018ef8d..97eaafef2e2b980b9ed66325d46cefd584c18284 100644 (file)
@@ -7,9 +7,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS_lib += -O2
-CFLAGS_lib/lzma += -O2
-CFLAGS_lib/zlib += -O2
+# FIX ME
+ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),)
+ccflags-y := -O2
+endif
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
index 2d7584362844001038e9298a135cb16ff1a83190..3b2ff9bb529476b8e60e8c5f52befebc0f4268ef 100644 (file)
@@ -238,10 +238,6 @@ obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o
 obj-y += memsize.o
 obj-y += stdio.o
 
 obj-y += memsize.o
 obj-y += stdio.o
 
-$(obj)/env_embedded.o: $(src)/env_embedded.c
-       $(CC) $(AFLAGS) -Wa,--no-warn \
-               -DENV_CRC=$(shell tools/envcrc) -c -o $@ $<
-
-# SEE README.arm-unaligned-accesses
-$(obj)/hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
-$(obj)/fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
+CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null)
+CFLAGS_hush.o := $(PLATFORM_NO_UNALIGNED)
+CFLAGS_fdt_support.o := $(PLATFORM_NO_UNALIGNED)
index 0fa316743ce99476a8bedb77fded14f28c3821f5..1336ef871c0a08df24371a6edd707939225a3c8b 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -58,19 +58,10 @@ RELFLAGS= $(PLATFORM_RELFLAGS)
 
 OBJCFLAGS += --gap-fill=0xff
 
 
 OBJCFLAGS += --gap-fill=0xff
 
-CPPFLAGS = $(KBUILD_CPPFLAGS) $(RELFLAGS)
-CPPFLAGS += $(UBOOTINCLUDE)
-CPPFLAGS += $(NOSTDINC_FLAGS) -pipe $(PLATFORM_CPPFLAGS)
-
-CFLAGS := $(KBUILD_CFLAGS) $(CPPFLAGS)
+CPPFLAGS = $(RELFLAGS)
+CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
 
 BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))
 
 
 BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))
 
-AFLAGS := $(KBUILD_AFLAGS) $(CPPFLAGS)
-
 LDFLAGS += $(PLATFORM_LDFLAGS)
 LDFLAGS_FINAL += -Bstatic
 LDFLAGS += $(PLATFORM_LDFLAGS)
 LDFLAGS_FINAL += -Bstatic
-
-#########################################################################
-
-export PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
index 48abec8328ea9bde177554dea741430f53e56be5..6970cecc71a1730b15616e3f36ce396bbd847a4d 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-#CFLAGS += -DET_DEBUG -DDEBUG
+#ccflags-y += -DET_DEBUG -DDEBUG
 
 obj-$(CONFIG_PARTITIONS)       += part.o
 obj-$(CONFIG_MAC_PARTITION)   += part_mac.o
 
 obj-$(CONFIG_PARTITIONS)       += part.o
 obj-$(CONFIG_MAC_PARTITION)   += part_mac.o
index aa7c44b127ce1f95f3a628ee697c4834e6967f21..75e59c2b0dfecad21aa247b5953ed578115c41d0 100644 (file)
@@ -24,9 +24,9 @@ PS_METHOD     = $(prefer-db2x)
 
 ###
 # The targets that may be used.
 
 ###
 # The targets that may be used.
-PHONY += $(obj).depend xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
+PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
 
 
-BOOKS := $(addprefix $(OBJTREE)/doc/DocBook/,$(DOCBOOKS))
+BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
 xmldocs: $(BOOKS)
 sgmldocs: xmldocs
 
 xmldocs: $(BOOKS)
 sgmldocs: xmldocs
 
@@ -51,10 +51,10 @@ installmandocs: mandocs
 
 ###
 #External programs used
 
 ###
 #External programs used
-KERNELDOC = $(SRCTREE)/tools/kernel-doc/kernel-doc
-DOCPROC   = $(OBJTREE)/tools/kernel-doc/docproc
+KERNELDOC = $(srctree)/tools/kernel-doc/kernel-doc
+DOCPROC   = $(objtree)/tools/kernel-doc/docproc
 
 
-XMLTOFLAGS = -m $(SRCTREE)/doc/DocBook/stylesheet.xsl
+XMLTOFLAGS = -m $(srctree)/doc/DocBook/stylesheet.xsl
 XMLTOFLAGS += --skip-validation
 
 ###
 XMLTOFLAGS += --skip-validation
 
 ###
@@ -64,28 +64,36 @@ XMLTOFLAGS += --skip-validation
 #     appropriate parameters.
 # The following rules are used to generate the .xml documentation
 # required to generate the final targets. (ps, pdf, html).
 #     appropriate parameters.
 # The following rules are used to generate the .xml documentation
 # required to generate the final targets. (ps, pdf, html).
-%.xml: %.tmpl
-       $(DOCPROC) doc $< >$@
-
-ifeq ($@, "cleandocs")
-sinclude $(obj).depend
-$(obj).depend: $(patsubst %.xml, %.tmpl, $(DOCBOOKS))
-       rm -f $(obj).depend ;                                   \
-       touch $(obj).depend ;                                   \
-       for file in $^ ; do                                     \
-               xmlfile=`echo "$${file}" |                      \
-                       sed "s/tmpl$$/xml/"` ;                  \
-               echo -n "$${xmlfile}: ">> $(obj).depend ;       \
-               $(DOCPROC) depend $$file >> $(obj).depend ;     \
-               echo -e "\n\t$(DOCPROC) doc $< >$${xmlfile} " >>        \
-                       $(obj).depend ;                         \
-       done
+quiet_cmd_docproc = DOCPROC $@
+      cmd_docproc = SRCTREE=$(srctree)/ $(DOCPROC) doc $< >$@
+define rule_docproc
+       set -e;                                                         \
+        $(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))';)        \
+        $(cmd_$(1));                                                   \
+        (                                                              \
+          echo 'cmd_$@ := $(cmd_$(1))';                                \
+          echo $@: `SRCTREE=$(srctree) $(DOCPROC) depend $<`;          \
+        ) > $(dir $@).$(notdir $@).cmd
+endef
+
+%.xml: %.tmpl FORCE
+       $(call if_changed_rule,docproc)
+
+###
+#Read in all saved dependency files
+cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd))
+
+ifneq ($(cmd_files),)
+  include $(cmd_files)
 endif
 
 ###
 # Changes in kernel-doc force a rebuild of all documentation
 $(BOOKS): $(KERNELDOC)
 
 endif
 
 ###
 # Changes in kernel-doc force a rebuild of all documentation
 $(BOOKS): $(KERNELDOC)
 
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
 notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
                   exit 1
 db2xtemplate = db2TYPE -o $(dir $@) $<
 notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
                   exit 1
 db2xtemplate = db2TYPE -o $(dir $@) $<
@@ -111,12 +119,12 @@ endif
 quiet_cmd_db2ps = PS      $@
       cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template))
 %.ps : %.xml
 quiet_cmd_db2ps = PS      $@
       cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template))
 %.ps : %.xml
-       $(call cmd_db2ps)
+       $(call cmd,db2ps)
 
 quiet_cmd_db2pdf = PDF     $@
       cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template))
 %.pdf : %.xml
 
 quiet_cmd_db2pdf = PDF     $@
       cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template))
 %.pdf : %.xml
-       $(call cmd_db2pdf)
+       $(call cmd,db2pdf)
 
 
 index = index.html
 
 
 index = index.html
@@ -132,16 +140,16 @@ build_main_index = rm -rf $(main_idx); \
 quiet_cmd_db2html = HTML    $@
       cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
                echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
 quiet_cmd_db2html = HTML    $@
       cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
                echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
-       $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
+        $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
 
 %.html:        %.xml
        @(which xmlto > /dev/null 2>&1) || \
         (echo "*** You need to install xmlto ***"; \
          exit 1)
        @rm -rf $@ $(patsubst %.html,%,$@)
 
 %.html:        %.xml
        @(which xmlto > /dev/null 2>&1) || \
         (echo "*** You need to install xmlto ***"; \
          exit 1)
        @rm -rf $@ $(patsubst %.html,%,$@)
-       $(call cmd_db2html)
+       $(call cmd,db2html)
        @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \
        @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \
-           cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
+            cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
 
 quiet_cmd_db2man = MAN     $@
       cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
 
 quiet_cmd_db2man = MAN     $@
       cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi
@@ -150,7 +158,7 @@ quiet_cmd_db2man = MAN     $@
         (echo "*** You need to install xmlto ***"; \
          exit 1)
        $(Q)mkdir -p $(obj)/man
         (echo "*** You need to install xmlto ***"; \
          exit 1)
        $(Q)mkdir -p $(obj)/man
-       $(call cmd_db2man)
+       $(call cmd,db2man)
        @touch $@
 
 ###
        @touch $@
 
 ###
@@ -162,7 +170,7 @@ quiet_cmd_fig2eps = FIG2EPS $@
        @(which fig2dev > /dev/null 2>&1) || \
         (echo "*** You need to install transfig ***"; \
          exit 1)
        @(which fig2dev > /dev/null 2>&1) || \
         (echo "*** You need to install transfig ***"; \
          exit 1)
-       $(call cmd_fig2eps)
+       $(call cmd,fig2eps)
 
 quiet_cmd_fig2png = FIG2PNG $@
       cmd_fig2png = fig2dev -Lpng $< $@
 
 quiet_cmd_fig2png = FIG2PNG $@
       cmd_fig2png = fig2dev -Lpng $< $@
@@ -171,7 +179,7 @@ quiet_cmd_fig2png = FIG2PNG $@
        @(which fig2dev > /dev/null 2>&1) || \
         (echo "*** You need to install transfig ***"; \
          exit 1)
        @(which fig2dev > /dev/null 2>&1) || \
         (echo "*** You need to install transfig ***"; \
          exit 1)
-       $(call cmd_fig2png)
+       $(call cmd,fig2png)
 
 ###
 # Rule to convert a .c file to inline XML documentation
 
 ###
 # Rule to convert a .c file to inline XML documentation
@@ -217,7 +225,6 @@ clean-files := $(DOCBOOKS) \
 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
 
 cleandocs:
 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
 
 cleandocs:
-       @rm -f $(obj).depend
        @$(Q)rm -f $(call objectify, $(clean-files))
        @$(Q)rm -rf $(call objectify, $(clean-dirs))
 
        @$(Q)rm -f $(call objectify, $(clean-files))
        @$(Q)rm -rf $(call objectify, $(clean-dirs))
 
index 330f36f3bd21a3e45641c223700b5b150c884b1f..e56356ee867f7b9d3e4ffffebe69941bd3118054 100644 (file)
@@ -8,8 +8,5 @@ obj-y = atibios.o biosemu.o besys.o bios.o \
        $(X86DIR)/sys.o \
        $(X86DIR)/debug.o
 
        $(X86DIR)/sys.o \
        $(X86DIR)/debug.o
 
-EXTRA_CFLAGS += -I$(srctree)/$(src) -I$(srctree)/$(src)/include \
+ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/include \
        -D__PPC__  -D__BIG_ENDIAN__
        -D__PPC__  -D__BIG_ENDIAN__
-
-CFLAGS += $(EXTRA_CFLAGS)
-CPPFLAGS += $(EXTRA_CFLAGS)
index a78a7242534fb3800ecf2ae8f287e1fed57451bf..25b8e8a2d79f4490e246aa2b687a522523e11818 100644 (file)
@@ -8,7 +8,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-#CFLAGS += -DDEBUG
+#ccflags-y += -DDEBUG
 
 obj-$(CONFIG_DTT_ADM1021) += adm1021.o
 obj-$(CONFIG_DTT_ADT7460) += adt7460.o
 
 obj-$(CONFIG_DTT_ADM1021) += adm1021.o
 obj-$(CONFIG_DTT_ADT7460) += adt7460.o
index 077925521675c41d193f7128c3e8c2f81b3a5b99..ff554cf152396ba8f92bef8baa9d0312ccf16cce 100644 (file)
@@ -5,9 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-LOCAL_CFLAGS  += -I$(TOPDIR)/drivers/net/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
-CFLAGS  += $(LOCAL_CFLAGS)
-CPPFLAGS  += $(LOCAL_CFLAGS) # needed for depend
+ccflags-y += -I$(src)/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
 
 obj-y := npe.o \
        miiphy.o \
 
 obj-y := npe.o \
        miiphy.o \
index d5a2725c971b3311fd336587b5ccf249edc2ff8a..003d322d23a19ed004561d1a052344aa146f634f 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-#CFLAGS += -DDEBUG
+#ccflags-y += -DDEBUG
 
 obj-$(CONFIG_RTC_AT91SAM9_RTT) += at91sam9_rtt.o
 obj-$(CONFIG_RTC_BFIN) += bfin_rtc.o
 
 obj-$(CONFIG_RTC_AT91SAM9_RTT) += at91sam9_rtt.o
 obj-$(CONFIG_RTC_BFIN) += bfin_rtc.o
index ba72348b76a60b4c1791b0377a0a4b6feb246bbc..3facf0fc105dbf430d0eeb6b884fcb7e0ee9081e 100644 (file)
@@ -9,7 +9,6 @@ obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o
 obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
 obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
 
 obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
 obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
 
-CFLAGS_NO_WARN := $(call cc-option,-Wno-unused-variable) \
-                       $(call cc-option,-Wno-unused-but-set-variable) \
-                       $(call cc-option,-Wno-unused-label)
-CFLAGS += $(CFLAGS_NO_WARN)
+ccflags-y := $(call cc-option,-Wno-unused-variable) \
+               $(call cc-option,-Wno-unused-but-set-variable) \
+               $(call cc-option,-Wno-unused-label)
index d81f32d914de1f8d9df6e0a8399c52628ec5c2b6..cc6ecf66eb50c2d2769ae9c784747fbef0184f7f 100644 (file)
@@ -36,7 +36,7 @@ process_lds = \
        $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
 
 # Run the compiler and get the link script from the linker
        $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
 
 # Run the compiler and get the link script from the linker
-GET_LDS = $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--verbose 2>&1
+GET_LDS = $(CC) $(c_flags) $(ld_flags) -Wl,--verbose 2>&1
 
 $(obj)/dt.o: $(DT_BIN)
        # We want the output format and arch.
 
 $(obj)/dt.o: $(DT_BIN)
        # We want the output format and arch.
index db0bb34afeb6eeb9fe618af8ad148701bfaf6984..8b7988607455b9214613ba7f6fab82f3a0c44fb5 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 ifdef FTRACE
 #
 
 ifdef FTRACE
-CFLAGS += -finstrument-functions -DFTRACE
+ccflags-y += -finstrument-functions -DFTRACE
 endif
 
 ifeq ($(ARCH),powerpc)
 endif
 
 ifeq ($(ARCH),powerpc)
@@ -33,12 +33,6 @@ EXT_COBJ_FILES-y += lib/time.o
 EXT_COBJ_FILES-y += lib/vsprintf.o
 EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o
 
 EXT_COBJ_FILES-y += lib/vsprintf.o
 EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o
 
-# Create a list of source files so their dependencies can be auto-generated
-SRCS   += $(addprefix $(SRCTREE)/,$(EXT_COBJ_FILES-y:.o=.c))
-SRCS   += $(addprefix $(SRCTREE)/,$(EXT_SOBJ_FILES-y:.o=.S))
-SRCS   += $(addprefix $(SRCTREE)/examples/api/,$(COBJ_FILES-y:.o=.c))
-SRCS   += $(addprefix $(SRCTREE)/examples/api/,$(SOBJ_FILES-y:.o=.S))
-
 # Create a list of object files to be compiled
 OBJS   += $(addprefix $(obj)/,$(SOBJ_FILES-y))
 OBJS   += $(addprefix $(obj)/,$(COBJ_FILES-y))
 # Create a list of object files to be compiled
 OBJS   += $(addprefix $(obj)/,$(SOBJ_FILES-y))
 OBJS   += $(addprefix $(obj)/,$(COBJ_FILES-y))
@@ -54,9 +48,10 @@ $(obj)/demo.bin: $(obj)/demo
                $(OBJCOPY) -O binary $< $@ 2>/dev/null
 
 # Rule to build generic library C files
                $(OBJCOPY) -O binary $< $@ 2>/dev/null
 
 # Rule to build generic library C files
-$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c
-       $(CC) -g $(CFLAGS) -c -o $@ $<
+$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c FORCE
+       $(call cmd,force_checksrc)
+       $(call if_changed_rule,cc_o_c)
 
 # Rule to build architecture-specific library assembly files
 $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S
 
 # Rule to build architecture-specific library assembly files
 $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S
-       $(CC) -g $(CFLAGS) -c -o $@ $<
+       $(call if_changed_dep,as_o_S)
index a6819f7792989db39692deec247ee32bcbea47c9..90e173b83ee8f1750962890dfdad66927e2bb9ed 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 ifdef FTRACE
 #
 
 ifdef FTRACE
-CFLAGS += -finstrument-functions -DFTRACE
+ccflags-y += -finstrument-functions -DFTRACE
 endif
 
 extra-y        := hello_world
 endif
 
 extra-y        := hello_world
@@ -39,10 +39,11 @@ LIBAOBJS := $(LIBAOBJS-y)
 
 LIBCOBJS = stubs.o
 
 
 LIBCOBJS = stubs.o
 
+.SECONDARY: $(call objectify,$(COBJS))
+targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBAOBJS) $(LIBCOBJS)
+
 LIBOBJS        = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS))
 
 LIBOBJS        = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS))
 
-SRCS   := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S)
-OBJS   := $(addprefix $(obj)/,$(COBJS))
 ELF    := $(addprefix $(obj)/,$(ELF))
 
 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
 ELF    := $(addprefix $(obj)/,$(ELF))
 
 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
@@ -52,19 +53,22 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
 # also causes the entry point of the standalone application to be
 # inconsistent.
 ifeq ($(ARCH),powerpc)
 # also causes the entry point of the standalone application to be
 # inconsistent.
 ifeq ($(ARCH),powerpc)
-AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS))
-CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS))
-CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS))
+# FIX ME
+CPPFLAGS := $(filter-out $(RELFLAGS), $(CPPFLAGS))
 endif
 
 # We don't want gcc reordering functions if possible.  This ensures that an
 # application's entry point will be the first function in the application's
 # source file.
 endif
 
 # We don't want gcc reordering functions if possible.  This ensures that an
 # application's entry point will be the first function in the application's
 # source file.
-CFLAGS += $(call cc-option,-fno-toplevel-reorder)
+ccflags-y += $(call cc-option,-fno-toplevel-reorder)
 
 #########################################################################
 
 #########################################################################
-$(LIB):        $(LIBOBJS)
-       $(call cmd_link_o_target, $(LIBOBJS))
+
+quiet_cmd_link_lib = LD      $@
+      cmd_link_lib = $(LD) $(ld_flags) -r -o $@ $(filter $(LIBOBJS), $^)
+
+$(LIB):        $(LIBOBJS) FORCE
+       $(call if_changed,link_lib)
 
 $(ELF):
 $(obj)/%:      $(obj)/%.o $(LIB)
 
 $(ELF):
 $(obj)/%:      $(obj)/%.o $(LIB)
index 5682b16916ad8873bb29efc6e1f4aad4cf5b755c..6b1a9a5b005cd298803b99601946cc9dfe55bcbf 100644 (file)
@@ -15,4 +15,4 @@ obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o
 obj-y += log.o orphan.o recovery.o replay.o
 
 # SEE README.arm-unaligned-accesses
 obj-y += log.o orphan.o recovery.o replay.o
 
 # SEE README.arm-unaligned-accesses
-$(obj)/super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
+CFLAGS_super.o := $(PLATFORM_NO_UNALIGNED)
index d811287ddbf0034c3b61905edaeb9dc7a0d70a51..45ff7458c60205b6884a0ebf76bda956b518d0a0 100644 (file)
@@ -24,9 +24,6 @@ obj-y := \
        yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \
        yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o
 
        yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \
        yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o
 
-YCFLAGS =  -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM
-YCFLAGS += -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE
-YCFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
-
-CFLAGS += $(YCFLAGS)
-CPPFLAGS +=  $(YCFLAGS)
+ccflags-y = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM \
+               -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE \
+               -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
index 43b13d09e2f88cddc9cf1d125728f907a3d0e996..8c483c99a3a139d0fcb9362eb22dcaae4c69f5ed 100644 (file)
@@ -67,4 +67,4 @@ obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
 obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o
 
 # SEE README.arm-unaligned-accesses
 obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o
 
 # SEE README.arm-unaligned-accesses
-$(obj)/bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
+CFLAGS_bzlib.o := $(PLATFORM_NO_UNALIGNED)
index f8eda06c9f59849382f96838c9f7a4855fd2dbfd..b6c80671b900958f470e92836bae31fcd87a8da6 100644 (file)
@@ -8,6 +8,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CFLAGS += -D_LZMA_PROB32
+ccflags-y += -D_LZMA_PROB32
 
 obj-y += LzmaDec.o LzmaTools.o
 
 obj-y += LzmaDec.o LzmaTools.o
index 041213f3346b19f2a579a826fae3b17a4b2ef0a9..d256abf9e18c03fd8af94c99ab224c0be9c8abf2 100644 (file)
@@ -12,17 +12,18 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o cache.o
 COBJS  = gpio.o nand_boot.o nand_ecc.o memory.o ndfc.o pll.o
 
 
 SOBJS  = start.o resetvec.o cache.o
 COBJS  = gpio.o nand_boot.o nand_ecc.o memory.o ndfc.o pll.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \
        $(nandobj)System.map
 
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \
        $(nandobj)System.map
 
@@ -42,7 +43,7 @@ $(nandobj)System.map: $(nandobj)u-boot-spl
                sort > $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                sort > $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index 92b604e9f56b444806f98a4e644e0411c4fdc9ae..4f36d6c882f2f95ba0cfff740affddba58edff8c 100644 (file)
@@ -12,17 +12,18 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o init.o resetvec.o
 COBJS  = nand_boot.o nand_ecc.o ndfc.o sdram.o
 
 
 SOBJS  = start.o init.o resetvec.o
 COBJS  = nand_boot.o nand_ecc.o ndfc.o sdram.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index 9a730e95f54d229382c230f117237e857e1b9793..5c9c8e83edad56ec91387fd0cfef47cb8cb34522 100644 (file)
@@ -12,8 +12,8 @@ nandobj       := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  := start.o
 SOBJS  += init.o
 
 SOBJS  := start.o
 SOBJS  += init.o
@@ -23,11 +23,12 @@ COBJS       += nand_boot.o
 COBJS  += nand_ecc.o
 COBJS  += ndfc.o
 
 COBJS  += nand_ecc.o
 COBJS  += ndfc.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -41,7 +42,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index 1c5498cfa56ef9d82dd7eeb79725963b499f0c7a..cfe308222b36d09ece5608ac7b7aa168334c7f7c 100644 (file)
@@ -12,17 +12,18 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o cache.o
 COBJS  = 44x_spd_ddr2.o nand_boot.o nand_ecc.o ndfc.o
 
 
 SOBJS  = start.o resetvec.o cache.o
 COBJS  = 44x_spd_ddr2.o nand_boot.o nand_ecc.o ndfc.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index 62131ab39963b6ec70fe64b23d6b1c26a084e62c..de02886b291d923175eb13adcb82f5141db501f3 100644 (file)
@@ -12,17 +12,18 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o init.o resetvec.o
 COBJS  = denali_data_eye.o nand_boot.o nand_ecc.o ndfc.o sdram.o
 
 
 SOBJS  = start.o init.o resetvec.o
 COBJS  = denali_data_eye.o nand_boot.o nand_ecc.o ndfc.o sdram.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index a2054ee1ab5e3683957ce9beb7665a66bf2ff914..a68567427e59b4534155126d0921a4fa7b9f6bcf 100644 (file)
@@ -13,18 +13,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
           $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
           $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o ticks.o
 COBJS  = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \
          time.o cache.o
 
 
 SOBJS  = start.o ticks.o
 COBJS  = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \
          time.o cache.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -38,7 +39,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index f711cf30ba59ee75ba576b6d99b3d4d5a1cf4a47..f0beaedf1a523b4bd93c180df586dc598ff6d05a 100644 (file)
@@ -15,18 +15,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
index f711cf30ba59ee75ba576b6d99b3d4d5a1cf4a47..f0beaedf1a523b4bd93c180df586dc598ff6d05a 100644 (file)
@@ -15,18 +15,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
index f711cf30ba59ee75ba576b6d99b3d4d5a1cf4a47..f0beaedf1a523b4bd93c180df586dc598ff6d05a 100644 (file)
@@ -15,18 +15,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
index 21a6920e6386acf9912742d4b0f50b3287e943ab..3918ac585bb47395eca44f8ba64ff79811373ccb 100644 (file)
@@ -11,18 +11,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -36,7 +37,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
index f711cf30ba59ee75ba576b6d99b3d4d5a1cf4a47..f0beaedf1a523b4bd93c180df586dc598ff6d05a 100644 (file)
@@ -15,18 +15,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
 
 SOBJS  = start.o resetvec.o
 COBJS  = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
          nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
@@ -40,7 +41,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
                -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
index ca45ecd328074f4e24d18bd0a5c6cfb77165a163..35b1f974db2f92b07910b6321039d2344c795b9a 100644 (file)
@@ -12,18 +12,19 @@ nandobj     := $(OBJTREE)/nand_spl/
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
           $(LDFLAGS) $(LDFLAGS_FINAL)
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
           $(LDFLAGS) $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_NAND_SPL
+asflags-y += -DCONFIG_NAND_SPL
+ccflags-y += -DCONFIG_NAND_SPL
 
 SOBJS  = start.o ticks.o
 COBJS  = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \
          time.o cache.o
 
 
 SOBJS  = start.o ticks.o
 COBJS  = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \
          time.o cache.o
 
-SRCS   := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c))
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
 OBJS   := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
+targets += $(__OBJS)
+
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin:  $(nandobj)u-boot-spl
 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin:  $(nandobj)u-boot-spl
@@ -37,7 +38,7 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
                -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
 
 # create symbolic links for common files
 
 
 # create symbolic links for common files
 
index 31aadc2ffc11d5882047a789e3f88e66a7aac698..942595021dad1cf3fccb27531bde72e20e0acd88 100644 (file)
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# CFLAGS += -DDEBUG
+#ccflags-y += -DDEBUG
 
 obj-$(CONFIG_CMD_NET)  += arp.o
 obj-$(CONFIG_CMD_NET)  += bootp.o
 
 obj-$(CONFIG_CMD_NET)  += arp.o
 obj-$(CONFIG_CMD_NET)  += bootp.o
index c720a26f61d141f70055bb493b918d2df238967b..556a833f6df67af6be90308af7038a261ad62331 100644 (file)
@@ -5,20 +5,19 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y  += 20001122-1.o
-obj-y  += 20010114-2.o
-obj-y  += 20010226-1.o
-obj-y  += 980619-1.o
-obj-y  += acc1.o
-obj-y  += compare-fp-1.o
-obj-y  += fpu.o
-obj-y  += mul-subnormal-single-1.o
-obj-y  += darwin-ldouble.o
+objs-before-objcopy := 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o \
+       acc1.o compare-fp-1.o fpu.o mul-subnormal-single-1.o darwin-ldouble.o
+targets += $(objs-before-objcopy)
 
 
-CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//)
-CFLAGS += -mhard-float -fkeep-inline-functions
+# remove -msoft-float flag
+$(foreach m, $(objs-before-objcopy), $(eval CFLAGS_REMOVE_$m := -msoft-float))
+ccflags-y := -mhard-float -fkeep-inline-functions
 
 
-$(addprefix $(obj)/,$(obj-y)): $(obj)/%.o: $(src)/%.c
-       $(CC)  $(ALL_CFLAGS) -o $@.fp $< -c
-       $(OBJCOPY) -R .gnu.attributes $@.fp $@
-       rm -f $@.fp
+# Do not delete intermidiate files (*.o)
+.SECONDARY: $(call objectify, $(objs-before-objcopy))
+
+obj-y := $(objs-before-objcopy:.o=_.o)
+
+OBJCOPYFLAGS := -R .gnu.attributes
+$(obj)/%_.o: $(obj)/%.o
+       $(call if_changed,objcopy)
index 30a5551a4dc870f44767b14663b6edd02e613998..6113c13d161b676cb1b367035bcf3c0d3d4b0428 100644 (file)
@@ -165,7 +165,7 @@ ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2))
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
 # Usage:
 # $(Q)$(MAKE) $(build)=dir
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
 # Usage:
 # $(Q)$(MAKE) $(build)=dir
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
 
 ###
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
 
 ###
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj=
index d5d859c8072964014971b9b1401b96f83a183e5d..2a87984a317f15b8ef07d9f10819fe0a9df66fe6 100644 (file)
@@ -2,7 +2,16 @@
 # Building
 # ==========================================================================
 
 # Building
 # ==========================================================================
 
-src := $(obj)
+# Modified for U-Boot
+ifeq ($(CONFIG_TPL_BUILD),y)
+  src := $(patsubst tpl/%,%,$(obj))
+else
+  ifeq ($(CONFIG_SPL_BUILD),y)
+    src := $(patsubst spl/%,%,$(obj))
+  else
+    src := $(obj)
+  endif
+endif
 
 PHONY := __build
 __build:
 
 PHONY := __build
 __build:
@@ -35,6 +44,11 @@ subdir-ccflags-y :=
 
 include scripts/Kbuild.include
 
 
 include scripts/Kbuild.include
 
+# Added for U-Boot
+# We must include config.mk after Kbuild.include
+# so that some config.mk can use cc-option.
+include config.mk
+
 # For backward compatibility check that these variables do not change
 save-cflags := $(CFLAGS)
 
 # For backward compatibility check that these variables do not change
 save-cflags := $(CFLAGS)
 
@@ -115,14 +129,16 @@ ifneq ($(hostprogs-y)$(hostprogs-m),)
 include scripts/Makefile.host
 endif
 
 include scripts/Makefile.host
 endif
 
-ifneq ($(KBUILD_SRC),)
+# Uncommented for U-Boot
+#  We need to create output dicrectory for SPL and TPL even for in-tree build
+#ifneq ($(KBUILD_SRC),)
 # Create output directory if not already present
 _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
 
 # Create directories for object files if directory does not exist
 # Needed when obj-y := dir/file.o syntax is used
 _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
 # Create output directory if not already present
 _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
 
 # Create directories for object files if directory does not exist
 # Needed when obj-y := dir/file.o syntax is used
 _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
-endif
+#endif
 
 ifndef obj
 $(warning kbuild: Makefile.build is included improperly)
 
 ifndef obj
 $(warning kbuild: Makefile.build is included improperly)
index 49392ecbef17baf113bb9e3771384d06413bbb25..d4b5cb5d0ea79950ff1ae42ffdd0636429d7cc73 100644 (file)
@@ -101,12 +101,13 @@ basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
 modname_flags  = $(if $(filter 1,$(words $(modname))),\
                  -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
 
 modname_flags  = $(if $(filter 1,$(words $(modname))),\
                  -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
 
-orig_c_flags   = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \
+# U-Boot also uses $(CPPFLAGS)
+orig_c_flags   = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \
                  $(ccflags-y) $(CFLAGS_$(basetarget).o)
 _c_flags       = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
                  $(ccflags-y) $(CFLAGS_$(basetarget).o)
 _c_flags       = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
-_a_flags       = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
+_a_flags       = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
                  $(asflags-y) $(AFLAGS_$(basetarget).o)
                  $(asflags-y) $(AFLAGS_$(basetarget).o)
-_cpp_flags     = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
+_cpp_flags     = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
 
 #
 # Enable gcov profiling flags for a file, directory or for all files depending
 
 #
 # Enable gcov profiling flags for a file, directory or for all files depending
@@ -137,14 +138,15 @@ __a_flags =                          $(call flags,_a_flags)
 __cpp_flags     =                          $(call flags,_cpp_flags)
 endif
 
 __cpp_flags     =                          $(call flags,_cpp_flags)
 endif
 
-c_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \
+# Modified for U-Boot: LINUXINCLUDE -> UBOOTINCLUDE
+c_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE)     \
                 $(__c_flags) $(modkern_cflags)                           \
                 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
 
                 $(__c_flags) $(modkern_cflags)                           \
                 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
 
-a_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \
+a_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE)     \
                 $(__a_flags) $(modkern_aflags)
 
                 $(__a_flags) $(modkern_aflags)
 
-cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \
+cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE)     \
                 $(__cpp_flags)
 
 ld_flags       = $(LDFLAGS) $(ldflags-y)
                 $(__cpp_flags)
 
 ld_flags       = $(LDFLAGS) $(ldflags-y)
index 18606ac34c757453f8344b303ca36b097df484cb..6b985d1e4ac76121e1f6df99f51eff7f652a1561 100644 (file)
@@ -106,8 +106,7 @@ LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y))
 
 # Add GCC lib
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
 
 # Add GCC lib
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
-PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/libgcc.o
-PLATFORM_LIBS := $(filter-out %/libgcc.o, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC)
+PLATFORM_LIBS := $(SPLTREE)/arch/$(ARCH)/lib/lib.a
 endif
 
 LIBS-y := $(sort $(LIBS-y))
 endif
 
 LIBS-y := $(sort $(LIBS-y))
@@ -155,7 +154,7 @@ $(OBJTREE)/MLO.byteswap: $(obj)/u-boot-spl.bin
        $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \
                -a $(CONFIG_SPL_TEXT_BASE) -d $< $@
 
        $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \
                -a $(CONFIG_SPL_TEXT_BASE) -d $< $@
 
-$(objtree)/SPL : $(obj)/u-boot-spl.bin depend
+$(objtree)/SPL : $(obj)/u-boot-spl.bin
                $(MAKE) $(build)=spl/arch/arm/imx-common $@
 
 ALL-y  += $(obj)/$(SPL_BIN).bin
                $(MAKE) $(build)=spl/arch/arm/imx-common $@
 
 ALL-y  += $(obj)/$(SPL_BIN).bin
@@ -191,20 +190,24 @@ GEN_UBOOT = \
                --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
                -Map $(SPL_BIN).map -o $(SPL_BIN)
 
                --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
                -Map $(SPL_BIN).map -o $(SPL_BIN)
 
-$(obj)/$(SPL_BIN):     depend $(START) $(LIBS) $(obj)/u-boot-spl.lds
+$(obj)/$(SPL_BIN): $(START) $(LIBS) $(obj)/u-boot-spl.lds
        $(GEN_UBOOT)
 
 $(START):
        @:
 
        $(GEN_UBOOT)
 
 $(START):
        @:
 
-$(LIBS):       depend
-       $(MAKE) $(build)=$(patsubst %/,%,$(dir $@))
+$(LIBS):
+       $(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@))
 
 
-$(obj)/u-boot-spl.lds: $(LDSCRIPT) depend
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
+# FIX ME
+cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS)
 
 
-depend:        $(obj)/.depend
-.PHONY: depend
+$(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE
+       $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
 
 
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
+PHONY += FORCE
+FORCE:
+
+# Declare the contents of the .PHONY variable as phony.  We keep that
+# information in a variable so we can use it in if_changed and friends.
+.PHONY: $(PHONY)
index 9b19dcb2645218a4a9b77b5cbeb47980f43c8ce7..70a3fc2155a95c11718326160d5a03ef97d7e5d0 100644 (file)
@@ -40,19 +40,19 @@ hostprogs-$(CONFIG_CMD_LICENSE) += bin2header$(SFX)
 
 hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
 hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
 
 hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
 hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
-HOSTCFLAGS_bmp_logo$(SFX) := -pedantic
+HOSTCFLAGS_bmp_logo$(SFX).o := -pedantic
 
 hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX)
 envcrc$(SFX)-objs := crc32.o env_embedded.o envcrc.o sha1.o
 
 hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
 
 hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX)
 envcrc$(SFX)-objs := crc32.o env_embedded.o envcrc.o sha1.o
 
 hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
-HOSTCFLAGS_gen_eth_addr$(SFX) := -pedantic
+HOSTCFLAGS_gen_eth_addr$(SFX).o := -pedantic
 
 hostprogs-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 
 hostprogs-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
-HOSTCFLAGS_img2srec$(SFX) := -pedantic
+HOSTCFLAGS_img2srec$(SFX).o := -pedantic
 
 hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX)
 
 hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX)
-HOSTCFLAGS_xway-swap-bytes$(SFX) := -pedantic
+HOSTCFLAGS_xway-swap-bytes$(SFX).o := -pedantic
 
 hostprogs-y += mkenvimage$(SFX)
 mkenvimage$(SFX)-objs := crc32.o mkenvimage.o os_support.o
 
 hostprogs-y += mkenvimage$(SFX)
 mkenvimage$(SFX)-objs := crc32.o mkenvimage.o os_support.o
@@ -97,7 +97,7 @@ HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto
 HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
-HOSTCFLAGS     += -DCONFIG_MXS
+HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS
 endif
 
 ifdef CONFIG_FIT_SIGNATURE
 endif
 
 ifdef CONFIG_FIT_SIGNATURE
@@ -111,11 +111,11 @@ endif
 
 hostprogs-$(CONFIG_EXYNOS5250) += mkexynosspl$(SFX)
 hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl$(SFX)
 
 hostprogs-$(CONFIG_EXYNOS5250) += mkexynosspl$(SFX)
 hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl$(SFX)
-HOSTCFLAGS_mkexynosspl$(SFX) := -pedantic
+HOSTCFLAGS_mkexynosspl$(SFX).o := -pedantic
 
 hostprogs-$(CONFIG_MX23) += mxsboot$(SFX)
 hostprogs-$(CONFIG_MX28) += mxsboot$(SFX)
 
 hostprogs-$(CONFIG_MX23) += mxsboot$(SFX)
 hostprogs-$(CONFIG_MX28) += mxsboot$(SFX)
-HOSTCFLAGS_mxsboot$(SFX) := -pedantic
+HOSTCFLAGS_mxsboot$(SFX).o := -pedantic
 
 hostprogs-$(CONFIG_NETCONSOLE) += ncb$(SFX)
 hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
 
 hostprogs-$(CONFIG_NETCONSOLE) += ncb$(SFX)
 hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
@@ -137,7 +137,7 @@ HOSTCFLAGS_sha1.o := -pedantic
 
 # Don't build by default
 #hostprogs-$(CONFIG_PPC) += mpc86x_clk$(SFX)
 
 # Don't build by default
 #hostprogs-$(CONFIG_PPC) += mpc86x_clk$(SFX)
-#HOSTCFLAGS_mpc86x_clk$(SFX) := -pedantic
+#HOSTCFLAGS_mpc86x_clk$(SFX).o := -pedantic
 
 always := $(hostprogs-y)
 
 
 always := $(hostprogs-y)
 
@@ -164,11 +164,6 @@ endif
 
 endif # !LOGO_BMP
 
 
 endif # !LOGO_BMP
 
-# now $(obj) is defined
-HOSTSRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
-HOSTSRCS += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
-HOSTSRCS += $(addprefix $(SRCTREE)/lib/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
-
 #
 # Use native tools and options
 # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
 #
 # Use native tools and options
 # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
@@ -183,7 +178,7 @@ HOST_EXTRACFLAGS += -include $(SRCTREE)/include/libfdt_env.h \
                -D__KERNEL_STRICT_NAMES \
                -D_GNU_SOURCE
 
                -D__KERNEL_STRICT_NAMES \
                -D_GNU_SOURCE
 
-all:   $(LOGO-y)
+__build:       $(LOGO-y)
 
 subdir-y := kernel-doc
 
 
 subdir-y := kernel-doc