]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - config.mk
dm: exynos: dts: Remove unused pinctrl information to save space
[karo-tx-uboot.git] / config.mk
1 #
2 # (C) Copyright 2000-2013
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 #
5 # SPDX-License-Identifier:      GPL-2.0+
6 #
7 #########################################################################
8
9 # This file is included from ./Makefile and spl/Makefile.
10 # Clean the state to avoid the same flags added twice.
11 #
12 # (Tegra needs different flags for SPL.
13 #  That's the reason why this file must be included from spl/Makefile too.
14 #  If we did not have Tegra SoCs, build system would be much simpler...)
15 PLATFORM_RELFLAGS :=
16 PLATFORM_CPPFLAGS :=
17 PLATFORM_LDFLAGS :=
18 LDFLAGS :=
19 LDFLAGS_FINAL :=
20 OBJCOPYFLAGS :=
21 #########################################################################
22
23 ARCH := $(CONFIG_SYS_ARCH:"%"=%)
24 CPU := $(CONFIG_SYS_CPU:"%"=%)
25 BOARD := $(CONFIG_SYS_BOARD:"%"=%)
26 ifneq ($(CONFIG_SYS_VENDOR),)
27 VENDOR := $(CONFIG_SYS_VENDOR:"%"=%)
28 endif
29 ifneq ($(CONFIG_SYS_SOC),)
30 SOC := $(CONFIG_SYS_SOC:"%"=%)
31 endif
32
33 # Some architecture config.mk files need to know what CPUDIR is set to,
34 # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
35 # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
36 # CPU-specific code.
37 CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
38
39 sinclude $(srctree)/arch/$(ARCH)/config.mk      # include architecture dependend rules
40 sinclude $(srctree)/$(CPUDIR)/config.mk         # include  CPU  specific rules
41
42 ifdef   SOC
43 sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk  # include  SoC  specific rules
44 endif
45 ifneq ($(BOARD),)
46 ifdef   VENDOR
47 BOARDDIR = $(VENDOR)/$(BOARD)
48 else
49 BOARDDIR = $(BOARD)
50 endif
51 endif
52 ifdef   BOARD
53 sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules
54 endif
55
56 ifdef FTRACE
57 PLATFORM_CPPFLAGS += -finstrument-functions -DFTRACE
58 endif
59
60 #########################################################################
61
62 RELFLAGS := $(PLATFORM_RELFLAGS)
63
64 OBJCOPYFLAGS += --gap-fill=0xff
65
66 PLATFORM_CPPFLAGS += $(RELFLAGS)
67 PLATFORM_CPPFLAGS += -pipe
68
69 LDFLAGS += $(PLATFORM_LDFLAGS)
70 LDFLAGS_FINAL += -Bstatic
71
72 export PLATFORM_CPPFLAGS
73 export RELFLAGS
74 export LDFLAGS_FINAL
75 export CONFIG_STANDALONE_LOAD_ADDR