tools: convert makefiles to kbuild style
[oweals/u-boot.git] / config.mk
index b3ecaa7f80abcc62beb81da2b44be1dc585c3a88..07afb350c2ba596dd20a49b36d8fe165e22e986d 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -13,12 +13,6 @@ SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 export SHELL
 
-ifeq ($(CONFIG_TPL_BUILD),y)
-SPL_BIN := u-boot-tpl
-else
-SPL_BIN := u-boot-spl
-endif
-
 ifeq ($(CURDIR),$(SRCTREE))
 dir :=
 else
@@ -64,7 +58,6 @@ PLATFORM_LDFLAGS =
 
 HOSTCFLAGS     = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
                  $(HOSTCPPFLAGS)
-HOSTSTRIP      = strip
 
 #
 # Mac OS X / Darwin's C preprocessor is Apple specific.  It
@@ -99,13 +92,6 @@ ifeq ($(HOSTOS),cygwin)
 HOSTCFLAGS     += -ansi
 endif
 
-# We build some files with extra pedantic flags to try to minimize things
-# that won't build on some weird host compiler -- though there are lots of
-# exceptions for files that aren't complaint.
-
-HOSTCFLAGS_NOPED = $(filter-out -pedantic,$(HOSTCFLAGS))
-HOSTCFLAGS     += -pedantic
-
 #########################################################################
 #
 # Option checker, gcc version (courtesy linux kernel) to ensure
@@ -131,9 +117,9 @@ endif
 
 # cc-version
 # Usage gcc-ver := $(call cc-version)
-cc-version = $(shell $(SHELL) $(SRCTREE)/tools/gcc-version.sh $(CC))
-binutils-version = $(shell $(SHELL) $(SRCTREE)/tools/binutils-version.sh $(AS))
-dtc-version = $(shell $(SHELL) $(SRCTREE)/tools/dtc-version.sh $(DTC))
+cc-version = $(shell $(SHELL) $(SRCTREE)/scripts/gcc-version.sh $(CC))
+binutils-version = $(shell $(SHELL) $(SRCTREE)/scripts/binutils-version.sh $(AS))
+dtc-version = $(shell $(SHELL) $(SRCTREE)/scripts/dtc-version.sh $(DTC))
 
 #
 # Include the make variables (CC, etc...)
@@ -219,35 +205,10 @@ CPPFLAGS += -ffunction-sections -fdata-sections
 LDFLAGS_FINAL += --gc-sections
 endif
 
-# TODO(sjg@chromium.org): Is this correct on Mac OS?
-ifdef CONFIG_FIT_SIGNATURE
-HOSTLIBS       += -lssl -lcrypto
-
-# This affects include/image.h, but including the board config file
-# is tricky, so manually define this options here.
-HOSTCFLAGS     += -DCONFIG_FIT_SIGNATURE
-endif
-
 ifneq ($(CONFIG_SYS_TEXT_BASE),)
 CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
 endif
 
-ifneq ($(CONFIG_SPL_TEXT_BASE),)
-CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE)
-endif
-
-ifneq ($(CONFIG_SPL_PAD_TO),)
-CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
-endif
-
-ifneq ($(CONFIG_TPL_PAD_TO),)
-CPPFLAGS += -DCONFIG_TPL_PAD_TO=$(CONFIG_TPL_PAD_TO)
-endif
-
-ifneq ($(CONFIG_UBOOT_PAD_TO),)
-CPPFLAGS += -DCONFIG_UBOOT_PAD_TO=$(CONFIG_UBOOT_PAD_TO)
-endif
-
 ifeq ($(CONFIG_SPL_BUILD),y)
 CPPFLAGS += -DCONFIG_SPL_BUILD
 ifeq ($(CONFIG_TPL_BUILD),y)
@@ -263,15 +224,11 @@ Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
 endif
 endif
 
-ifneq ($(RESET_VECTOR_ADDRESS),)
-CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
-endif
-
 ifneq ($(OBJTREE),$(SRCTREE))
-CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
+CPPFLAGS += -I$(OBJTREE)/include
 endif
 
-CPPFLAGS += -I$(TOPDIR)/include
+CPPFLAGS += -I$(TOPDIR)/include -I$(SRCTREE)/arch/$(ARCH)/include
 CPPFLAGS += -fno-builtin -ffreestanding -nostdinc      \
        -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
 
@@ -331,7 +288,7 @@ endif
 
 # Linus' kernel sanity checking tool
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-                  -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF)
+                 -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF)
 
 # Location of a usable BFD library, where we define "usable" as
 # "built for ${HOST}, supports ${TARGET}".  Sensible values are
@@ -358,7 +315,7 @@ endif
 
 #########################################################################
 
-export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE \
+export HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE \
        AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE
 export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS