]> git.ipfire.org Git - people/ms/u-boot.git/blob - config.mk
config.mk: specify the exact path to standalone linker script
[people/ms/u-boot.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 # clean the slate ...
10 PLATFORM_RELFLAGS =
11 PLATFORM_CPPFLAGS =
12 PLATFORM_LDFLAGS =
13
14 #########################################################################
15
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.
18 # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
19 # CPU-specific code.
20 CPUDIR=arch/$(ARCH)/cpu/$(CPU)
21 ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
22 CPUDIR=arch/$(ARCH)/cpu
23 endif
24
25 sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules
26 sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules
27
28 ifdef SOC
29 sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
30 endif
31 ifneq ($(BOARD),)
32 ifdef VENDOR
33 BOARDDIR = $(VENDOR)/$(BOARD)
34 else
35 BOARDDIR = $(BOARD)
36 endif
37 endif
38 ifdef BOARD
39 sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
40 endif
41
42 #########################################################################
43
44 RELFLAGS= $(PLATFORM_RELFLAGS)
45
46 OBJCOPYFLAGS += --gap-fill=0xff
47
48 CPPFLAGS = $(RELFLAGS)
49 CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
50
51 LDFLAGS += $(PLATFORM_LDFLAGS)
52 LDFLAGS_FINAL += -Bstatic