config.mk 1.8 KB
Newer Older
W
wdenk 已提交
1
#
2
# (C) Copyright 2000-2013
W
wdenk 已提交
3 4
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
5
# SPDX-License-Identifier:	GPL-2.0+
W
wdenk 已提交
6 7 8
#
#########################################################################

M
Masahiro Yamada 已提交
9 10 11 12 13 14 15 16 17 18 19 20
# This file is included from ./Makefile and spl/Makefile.
# Clean the state to avoid the same flags added twice.
#
# (Tegra needs different flags for SPL.
#  That's the reason why this file must be included from spl/Makefile too.
#  If we did not have Tegra SoCs, build system would be much simpler...)
PLATFORM_RELFLAGS :=
PLATFORM_CPPFLAGS :=
PLATFORM_LDFLAGS :=
LDFLAGS :=
LDFLAGS_FINAL :=
OBJCOPYFLAGS :=
21 22
#########################################################################

P
Peter Tyser 已提交
23 24
# Some architecture config.mk files need to know what CPUDIR is set to,
# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
25 26 27
# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
# CPU-specific code.
CPUDIR=arch/$(ARCH)/cpu/$(CPU)
28
ifneq ($(srctree)/$(CPUDIR),$(wildcard $(srctree)/$(CPUDIR)))
29 30
CPUDIR=arch/$(ARCH)/cpu
endif
P
Peter Tyser 已提交
31

32 33
sinclude $(srctree)/arch/$(ARCH)/config.mk	# include architecture dependend rules
sinclude $(srctree)/$(CPUDIR)/config.mk		# include  CPU	specific rules
P
Peter Tyser 已提交
34

35
ifdef	SOC
36
sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk	# include  SoC	specific rules
37
endif
38
ifneq ($(BOARD),)
39 40 41 42 43
ifdef	VENDOR
BOARDDIR = $(VENDOR)/$(BOARD)
else
BOARDDIR = $(BOARD)
endif
44
endif
45
ifdef	BOARD
46
sinclude $(srctree)/board/$(BOARDDIR)/config.mk	# include board specific rules
47 48 49 50
endif

#########################################################################

M
Masahiro Yamada 已提交
51
RELFLAGS := $(PLATFORM_RELFLAGS)
52

53
OBJCOPYFLAGS += --gap-fill=0xff
W
wdenk 已提交
54

M
Masahiro Yamada 已提交
55 56
PLATFORM_CPPFLAGS += $(RELFLAGS)
PLATFORM_CPPFLAGS += -pipe
57

58
LDFLAGS += $(PLATFORM_LDFLAGS)
59
LDFLAGS_FINAL += -Bstatic
M
Masahiro Yamada 已提交
60 61 62 63 64

export PLATFORM_CPPFLAGS
export RELFLAGS
export LDFLAGS_FINAL
export CONFIG_STANDALONE_LOAD_ADDR