xref: /openbmc/u-boot/arch/powerpc/lib/Makefile (revision 9e414032)
1#
2# (C) Copyright 2000-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8## Build a couple of necessary functions into a private libgcc
9## if the user asked for it
10ifdef USE_PRIVATE_LIBGCC
11lib-y	+= _ashldi3.o
12lib-y	+= _ashrdi3.o
13lib-y	+= _lshrdi3.o
14endif
15
16MINIMAL=
17
18ifdef CONFIG_SPL_BUILD
19ifdef CONFIG_SPL_INIT_MINIMAL
20MINIMAL=y
21endif
22endif
23
24ifdef MINIMAL
25obj-y += cache.o time.o
26obj-y += ticks.o
27else
28
29obj-y	+= ppcstring.o
30
31obj-y	+= ppccache.o
32obj-y	+= ticks.o
33obj-y	+= reloc.o
34
35obj-$(CONFIG_BAT_RW) += bat_rw.o
36ifndef CONFIG_SPL_BUILD
37ifndef CONFIG_SYS_GENERIC_BOARD
38obj-y	+= board.o
39endif
40endif
41obj-$(CONFIG_CMD_BOOTM) += bootm.o
42obj-y	+= cache.o
43obj-y	+= extable.o
44obj-y	+= interrupts.o
45obj-$(CONFIG_CMD_KGDB) += kgdb.o
46obj-$(CONFIG_CMD_IDE) += ide.o
47obj-y	+= time.o
48
49# Don't include the MPC5xxx special memcpy into the
50# SPL U-Boot image. memcpy is used in the SPL NOR
51# flash driver. And we need the real, fast memcpy
52# here. We have no problems with unaligned access.
53ifndef CONFIG_SPL_BUILD
54# Workaround for local bus unaligned access problems
55# on MPC512x and MPC5200
56ifdef CONFIG_MPC512X
57$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
58obj-y += memcpy_mpc5200.o
59endif
60ifdef CONFIG_MPC5200
61$(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy
62obj-y += memcpy_mpc5200.o
63endif
64endif
65
66endif # not minimal
67
68ifdef CONFIG_SPL_BUILD
69obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
70endif
71