xref: /openbmc/u-boot/config.mk (revision 6b02d06f)
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...)
15PLATFORM_RELFLAGS :=
16PLATFORM_CPPFLAGS :=
17PLATFORM_LDFLAGS :=
18LDFLAGS :=
19LDFLAGS_FINAL :=
20OBJCOPYFLAGS :=
21#########################################################################
22
23# Some architecture config.mk files need to know what CPUDIR is set to,
24# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
25# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
26# CPU-specific code.
27CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
28
29sinclude $(srctree)/arch/$(ARCH)/config.mk	# include architecture dependend rules
30sinclude $(srctree)/$(CPUDIR)/config.mk		# include  CPU	specific rules
31
32ifdef	SOC
33sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk	# include  SoC	specific rules
34endif
35ifneq ($(BOARD),)
36ifdef	VENDOR
37BOARDDIR = $(VENDOR)/$(BOARD)
38else
39BOARDDIR = $(BOARD)
40endif
41endif
42ifdef	BOARD
43sinclude $(srctree)/board/$(BOARDDIR)/config.mk	# include board specific rules
44endif
45
46#########################################################################
47
48RELFLAGS := $(PLATFORM_RELFLAGS)
49
50OBJCOPYFLAGS += --gap-fill=0xff
51
52PLATFORM_CPPFLAGS += $(RELFLAGS)
53PLATFORM_CPPFLAGS += -pipe
54
55LDFLAGS += $(PLATFORM_LDFLAGS)
56LDFLAGS_FINAL += -Bstatic
57
58export PLATFORM_CPPFLAGS
59export RELFLAGS
60export LDFLAGS_FINAL
61export CONFIG_STANDALONE_LOAD_ADDR
62