]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/blackfin/cpu/Makefile
Various Makefiles: Add SPDX-License-Identifier tags
[thirdparty/u-boot.git] / arch / blackfin / cpu / Makefile
CommitLineData
9171fc81
MF
1#
2# U-boot - Makefile
3#
4# Copyright (c) 2005-2008 Analog Device Inc.
5#
6# (C) Copyright 2000-2006
7# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8#
da58dec8 9# SPDX-License-Identifier: GPL-2.0+
9171fc81
MF
10#
11
36fde45c
MY
12extra-y := init.elf
13extra-y += initcode.o
14extra-y += start.o
15obj-y := interrupt.o cache.o
16obj-y += cpu.o
c0bb110b 17obj-y += gpio.o
36fde45c
MY
18obj-y += interrupts.o
19obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
20obj-y += os_log.o
21obj-y += reset.o
22obj-y += traps.o
23
24extra-y += check_initcode
efcf8619 25clean-files := init.lds
36fde45c 26
9171fc81
MF
27# make sure our initcode (which goes into LDR) does not
28# have relocs or external references
6825a95b 29CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections
9171fc81 30READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
9e414032 31$(obj)/check_initcode: $(obj)/initcode.o
9171fc81
MF
32ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
33 @if $(READINIT) | grep '\<GLOBAL\>.*\<UND\>' ; then \
34 echo "$< contains external references!" 1>&2 ; \
35 exit 1 ; \
36 fi
37endif
38
6825a95b 39CPPFLAGS_init.lds := -ansi
04a34c96
MY
40
41quiet_cmd_link_init = LD $@
42 cmd_link_init = $(LD) $(LDFLAGS) -T $^ -o $@
9e414032 43$(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
04a34c96
MY
44 $(call if_changed,link_init)
45targets += init.lds init.o