Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[kernel/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 ifdef   VENDOR
32 BOARDDIR = $(VENDOR)/$(BOARD)
33 else
34 BOARDDIR = $(BOARD)
35 endif
36 ifdef   BOARD
37 sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk  # include board specific rules
38 endif
39
40 #########################################################################
41
42 RELFLAGS= $(PLATFORM_RELFLAGS)
43
44 OBJCOPYFLAGS += --gap-fill=0xff
45
46 CPPFLAGS = $(RELFLAGS)
47 CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
48
49 BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))
50
51 LDFLAGS += $(PLATFORM_LDFLAGS)
52 LDFLAGS_FINAL += -Bstatic