]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - Makefile
kbuild: fix a bug of make rule of version_autogenerated.h
[karo-tx-uboot.git] / Makefile
index ecac2925b713d93a6c0dee834dc3088060e0302f..f3f3a2a995e86ab165d5ea2743827155e077859f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -358,13 +358,13 @@ UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
 UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
 
 export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION
-export ARCH CPU BOARD VENDOR SOC
+export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
 export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC
 export CPP AR NM LDR STRIP OBJCOPY OBJDUMP
 export MAKE AWK
 export DTC CHECK CHECKFLAGS
 
-export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE
+export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS
 export KBUILD_CFLAGS KBUILD_AFLAGS
 
 # When compiling out-of-tree modules, put MODVERDIR in the module
@@ -567,7 +567,8 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 CHECKFLAGS     += $(NOSTDINC_FLAGS)
 
 # FIX ME
-cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS)
+cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \
+                                                       $(NOSTDINC_FLAGS)
 c_flags := $(KBUILD_CFLAGS) $(cpp_flags)
 
 #########################################################################
@@ -651,11 +652,11 @@ u-boot-main := $(libs-y)
 
 
 # Add GCC lib
-ifdef USE_PRIVATE_LIBGCC
-ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
+ifdef CONFIG_USE_PRIVATE_LIBGCC
+ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
 PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
 else
-PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
+PLATFORM_LIBGCC = -L $(CONFIG_USE_PRIVATE_LIBGCC) -lgcc
 endif
 else
 PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
@@ -1021,7 +1022,7 @@ define filechk_timestamp.h
        LC_ALL=C date +'#define U_BOOT_TIME "%T"')
 endef
 
-$(version_h): $(srctree)/Makefile FORCE
+$(version_h): include/config/uboot.release FORCE
        $(call filechk,version.h)
 
 $(timestamp_h): $(srctree)/Makefile FORCE
@@ -1113,23 +1114,6 @@ SYSTEM_MAP = \
 System.map:    u-boot
                @$(call SYSTEM_MAP,$<) > $@
 
-checkthumb:
-       @if test $(call cc-version) -lt 0404; then \
-               echo -n '*** Your GCC does not produce working '; \
-               echo 'binaries in THUMB mode.'; \
-               echo '*** Your board is configured for THUMB mode.'; \
-               false; \
-       fi
-
-# GCC 3.x is reported to have problems generating the type of relocation
-# that U-Boot wants.
-# See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html
-checkgcc4:
-       @if test $(call cc-version) -lt 0400; then \
-               echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \
-               false; \
-       fi
-
 checkdtc:
        @if test $(call dtc-version) -lt 0104; then \
                echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
@@ -1177,7 +1161,6 @@ include/license.h: tools/bin2header COPYING
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR)
 CLEAN_FILES += u-boot.lds include/bmp_logo.h include/bmp_logo_data.h \
-              board/*/config.tmp board/*/*/config.tmp \
               include/autoconf.mk* include/spl-autoconf.mk \
               include/tpl-autoconf.mk