]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/powerpc/lib/Makefile
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / arch / powerpc / lib / Makefile
CommitLineData
0c8959d6 1#
f9328639 2# (C) Copyright 2000-2006
0c8959d6
WD
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
1a459660 5# SPDX-License-Identifier: GPL-2.0+
0c8959d6
WD
6#
7
8include $(TOPDIR)/config.mk
9
01baa056
KM
10## Build a couple of necessary functions into a private libgcc
11LIBGCC = $(obj)libgcc.o
12GLSOBJS += _ashldi3.o
13GLSOBJS += _ashrdi3.o
14GLSOBJS += _lshrdi3.o
15LGOBJS := $(addprefix $(obj),$(GLSOBJS)) \
16 $(addprefix $(obj),$(GLCOBJS))
17
18## But only build it if the user asked for it
19ifdef USE_PRIVATE_LIBGCC
20TARGETS += $(LIBGCC)
21endif
22
6d8962e8 23LIB = $(obj)lib$(ARCH).o
0c8959d6 24
4b919725
SW
25MINIMAL=
26
27ifdef CONFIG_SPL_BUILD
28ifdef CONFIG_SPL_INIT_MINIMAL
29MINIMAL=y
30endif
31endif
32
33ifdef MINIMAL
06f60ae3
SW
34COBJS-y += cache.o time.o
35SOBJS-y += ticks.o
4b919725
SW
36else
37
823afe7c 38SOBJS-y += ppcstring.o
4b919725
SW
39
40SOBJS-y += ppccache.o
823afe7c 41SOBJS-y += ticks.o
fc4e1887 42SOBJS-y += reloc.o
823afe7c 43
4bbfd3e2 44COBJS-$(CONFIG_BAT_RW) += bat_rw.o
083f2e08 45ifndef CONFIG_SPL_BUILD
660c60c4 46ifndef CONFIG_SYS_GENERIC_BOARD
823afe7c 47COBJS-y += board.o
083f2e08 48endif
660c60c4 49endif
b8eee435 50COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
823afe7c
MB
51COBJS-y += cache.o
52COBJS-y += extable.o
53COBJS-y += interrupts.o
425d3b66 54COBJS-$(CONFIG_CMD_KGDB) += kgdb.o
8d1165e1 55COBJS-${CONFIG_CMD_IDE} += ide.o
823afe7c
MB
56COBJS-y += time.o
57
083f2e08
SR
58# Don't include the MPC5xxx special memcpy into the
59# SPL U-Boot image. memcpy is used in the SPL NOR
60# flash driver. And we need the real, fast memcpy
61# here. We have no problems with unaligned access.
62ifndef CONFIG_SPL_BUILD
4ccd5510
WD
63# Workaround for local bus unaligned access problems
64# on MPC512x and MPC5200
65ifdef CONFIG_MPC512X
66$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
67COBJS-y += memcpy_mpc5200.o
68endif
460c2ce3
WD
69ifdef CONFIG_MPC5200
70$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
4ccd5510 71COBJS-y += memcpy_mpc5200.o
460c2ce3 72endif
083f2e08 73endif
460c2ce3 74
4b919725
SW
75endif # not minimal
76
ea8256f0
SR
77ifdef CONFIG_SPL_BUILD
78COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o
79endif
80
4ccd5510
WD
81COBJS += $(sort $(COBJS-y))
82
01baa056
KM
83SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
84 $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
4ccd5510
WD
85OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
86
01baa056
KM
87TARGETS += $(LIB)
88
89all: $(TARGETS)
90
f9328639 91$(LIB): $(obj).depend $(OBJS)
6d8962e8 92 $(call cmd_link_o_target, $(OBJS))
0c8959d6 93
01baa056
KM
94$(LIBGCC): $(obj).depend $(LGOBJS)
95 $(call cmd_link_o_target, $(LGOBJS))
96
0c8959d6
WD
97#########################################################################
98
f9328639
MB
99# defines $(obj).depend target
100include $(SRCTREE)/rules.mk
0c8959d6 101
f9328639 102sinclude $(obj).depend
0c8959d6
WD
103
104#########################################################################