2 # (C) Copyright 2000-2013
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
7 #########################################################################
14 #########################################################################
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
20 CPUDIR=arch/$(ARCH)/cpu/$(CPU)
21 ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
22 CPUDIR=arch/$(ARCH)/cpu
25 sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules
26 sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules
29 sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
32 BOARDDIR = $(VENDOR)/$(BOARD)
37 sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
40 #########################################################################
42 RELFLAGS= $(PLATFORM_RELFLAGS)
44 OBJCOPYFLAGS += --gap-fill=0xff
46 CPPFLAGS = $(RELFLAGS)
47 CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
49 BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))
51 LDFLAGS += $(PLATFORM_LDFLAGS)
52 LDFLAGS_FINAL += -Bstatic