]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/powerpc/lib/Makefile
2 # (C) Copyright 2000-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
8 include $(TOPDIR
)/config.mk
10 ## Build a couple of necessary functions into a private libgcc
11 LIBGCC
= $(obj
)libgcc.o
15 LGOBJS
:= $(addprefix $(obj
),$(GLSOBJS
)) \
16 $(addprefix $(obj
),$(GLCOBJS
))
18 ## But only build it if the user asked for it
19 ifdef USE_PRIVATE_LIBGCC
23 LIB
= $(obj
)lib
$(ARCH
).o
27 ifdef CONFIG_SPL_BUILD
28 ifdef CONFIG_SPL_INIT_MINIMAL
34 COBJS-y
+= cache.o time.o
38 SOBJS-y
+= ppcstring.o
44 COBJS-
$(CONFIG_BAT_RW
) += bat_rw.o
45 ifndef CONFIG_SPL_BUILD
46 ifndef CONFIG_SYS_GENERIC_BOARD
50 COBJS-
$(CONFIG_CMD_BOOTM
) += bootm.o
53 COBJS-y
+= interrupts.o
54 COBJS-
$(CONFIG_CMD_KGDB
) += kgdb.o
55 COBJS-
${CONFIG_CMD_IDE} += ide.o
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.
62 ifndef CONFIG_SPL_BUILD
63 # Workaround for local bus unaligned access problems
64 # on MPC512x and MPC5200
66 $(obj
)ppcstring.o
: AFLAGS
+= -Dmemcpy
=__memcpy
67 COBJS-y
+= memcpy_mpc5200.o
70 $(obj
)ppcstring.o
: AFLAGS
+= -Dmemcpy
=__memcpy
71 COBJS-y
+= memcpy_mpc5200.o
77 ifdef CONFIG_SPL_BUILD
78 COBJS-
$(CONFIG_SPL_FRAMEWORK
) += spl.o
81 COBJS
+= $(sort $(COBJS-y
))
83 SRCS
:= $(GLSOBJS
:.o
=.S
) $(GLCOBJS
:.o
=.c
) \
84 $(SOBJS-y
:.o
=.S
) $(COBJS-y
:.o
=.c
)
85 OBJS
:= $(addprefix $(obj
),$(SOBJS-y
) $(COBJS-y
))
91 $(LIB
): $(obj
).depend
$(OBJS
)
92 $(call cmd_link_o_target
, $(OBJS
))
94 $(LIBGCC
): $(obj
).depend
$(LGOBJS
)
95 $(call cmd_link_o_target
, $(LGOBJS
))
97 #########################################################################
99 # defines $(obj).depend target
100 include $(SRCTREE
)/rules.mk
102 sinclude
$(obj
).depend
104 #########################################################################