kbuild: tools: fix a bug that always builds Denx logo
[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
WD
30endif
31ifdef VENDOR
32BOARDDIR = $(VENDOR)/$(BOARD)
33else
34BOARDDIR = $(BOARD)
35endif
36ifdef BOARD
37sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
38endif
39
40#########################################################################
41
e2211743 42RELFLAGS= $(PLATFORM_RELFLAGS)
83b7e2a7 43
95ddcd68 44OBJCOPYFLAGS += --gap-fill=0xff
e2211743 45
6825a95b
MY
46CPPFLAGS = $(RELFLAGS)
47CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
4a30f1e8 48
8aba9dce 49LDFLAGS += $(PLATFORM_LDFLAGS)
6dc1eceb 50LDFLAGS_FINAL += -Bstatic