xref: /OK3568_Linux_fs/u-boot/arch/m68k/Makefile (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#
2# SPDX-License-Identifier:	GPL-2.0+
3#
4
5head-y := arch/m68k/cpu/$(CPU)/start.o
6
7libs-y += arch/m68k/cpu/$(CPU)/
8libs-y += arch/m68k/lib/
9
10cpuflags-$(CONFIG_M5208)	:= -mcpu=5208
11cpuflags-$(CONFIG_M5235)	:= -mcpu=5235 -fPIC
12cpuflags-$(CONFIG_M52277)	:= -mcpu=52277 -fPIC
13cpuflags-$(CONFIG_M5249)	:= -mcpu=5249
14cpuflags-$(CONFIG_M5253)	:= -mcpu=5253
15cpuflags-$(CONFIG_M5271)	:= -mcpu=5271
16cpuflags-$(CONFIG_M5272)	:= -mcpu=5272
17cpuflags-$(CONFIG_M5275)	:= -mcpu=5275
18cpuflags-$(CONFIG_M5282)	:= -mcpu=5282
19cpuflags-$(CONFIG_M5307)	:= -mcpu=5307
20cpuflags-$(CONFIG_MCF5301x)	:= -mcpu=53015 -fPIC
21cpuflags-$(CONFIG_MCF532x)	:= -mcpu=5329 -fPIC
22cpuflags-$(CONFIG_MCF5441x)	:= -mcpu=54418 -fPIC
23cpuflags-$(CONFIG_MCF5445x)	:= -mcpu=54455 -fPIC
24cpuflags-$(CONFIG_MCF547x_8x)	:= -mcpu=5485 -fPIC
25
26PLATFORM_CPPFLAGS += $(cpuflags-y)
27
28
29ldflags-$(CONFIG_MCF5441x)	:= --got=single
30ldflags-$(CONFIG_MCF5445x)	:= --got=single
31ldflags-$(CONFIG_MCF547x_8x)	:= --got=single
32
33ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
34ifneq (,$(findstring GOT,$(shell $(LD) --help)))
35PLATFORM_LDFLAGS += $(ldflags-y)
36endif
37endif
38