config.mk 1.36 KB
Newer Older
wdenk's avatar
wdenk committed
1
#
2
# (C) Copyright 2000-2013
wdenk's avatar
wdenk committed
3 4
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
5
# SPDX-License-Identifier:	GPL-2.0+
wdenk's avatar
wdenk committed
6 7 8
#
#########################################################################

wdenk's avatar
wdenk committed
9 10 11 12 13
# clean the slate ...
PLATFORM_RELFLAGS =
PLATFORM_CPPFLAGS =
PLATFORM_LDFLAGS =

14 15
#########################################################################

Peter Tyser's avatar
Peter Tyser committed
16 17
# Some architecture config.mk files need to know what CPUDIR is set to,
# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
18 19 20 21 22 23
# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
# CPU-specific code.
CPUDIR=arch/$(ARCH)/cpu/$(CPU)
ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
CPUDIR=arch/$(ARCH)/cpu
endif
Peter Tyser's avatar
Peter Tyser committed
24

25
sinclude $(TOPDIR)/arch/$(ARCH)/config.mk	# include architecture dependend rules
Peter Tyser's avatar
Peter Tyser committed
26 27
sinclude $(TOPDIR)/$(CPUDIR)/config.mk		# include  CPU	specific rules

28
ifdef	SOC
Peter Tyser's avatar
Peter Tyser committed
29
sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk	# include  SoC	specific rules
30 31 32 33 34 35 36 37 38 39 40 41
endif
ifdef	VENDOR
BOARDDIR = $(VENDOR)/$(BOARD)
else
BOARDDIR = $(BOARD)
endif
ifdef	BOARD
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk	# include board specific rules
endif

#########################################################################

wdenk's avatar
wdenk committed
42
RELFLAGS= $(PLATFORM_RELFLAGS)
43

44
OBJCOPYFLAGS += --gap-fill=0xff
wdenk's avatar
wdenk committed
45

46 47
CPPFLAGS = $(RELFLAGS)
CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
48

49
LDFLAGS += $(PLATFORM_LDFLAGS)
50
LDFLAGS_FINAL += -Bstatic