config.mk: specify the exact path to standalone linker script
[people/ms/u-boot.git] / config.mk
CommitLineData
e2211743 1#
eca3aeb3 2# (C) Copyright 2000-2013
e2211743
WD
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
eca3aeb3 5# SPDX-License-Identifier: GPL-2.0+
e2211743 6#
e2211743
WD
7#########################################################################
8
592c5cab
WD
9# clean the slate ...
10PLATFORM_RELFLAGS =
11PLATFORM_CPPFLAGS =
12PLATFORM_LDFLAGS =
13
c4e5f52a
WD
14#########################################################################
15
03b7004d
PT
16# Some architecture config.mk files need to know what CPUDIR is set to,
17# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
8d1f2682
PT
18# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
19# CPU-specific code.
20CPUDIR=arch/$(ARCH)/cpu/$(CPU)
21ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
22CPUDIR=arch/$(ARCH)/cpu
23endif
03b7004d 24
ea0364f1 25sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules
03b7004d
PT
26sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules
27
c4e5f52a 28ifdef SOC
03b7004d 29sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
c4e5f52a 30endif
33a02da0 31ifneq ($(BOARD),)
c4e5f52a
WD
32ifdef VENDOR
33BOARDDIR = $(VENDOR)/$(BOARD)
34else
35BOARDDIR = $(BOARD)
36endif
33a02da0 37endif
c4e5f52a
WD
38ifdef BOARD
39sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
40endif
41
42#########################################################################
43
e2211743 44RELFLAGS= $(PLATFORM_RELFLAGS)
83b7e2a7 45
95ddcd68 46OBJCOPYFLAGS += --gap-fill=0xff
e2211743 47
6825a95b
MY
48CPPFLAGS = $(RELFLAGS)
49CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
4a30f1e8 50
8aba9dce 51LDFLAGS += $(PLATFORM_LDFLAGS)
6dc1eceb 52LDFLAGS_FINAL += -Bstatic