xref: /openbmc/u-boot/arch/mips/lib/Makefile (revision 3765b3e7)
1#
2# (C) Copyright 2003-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8include $(TOPDIR)/config.mk
9
10LIB	= $(obj)lib$(ARCH).o
11
12## Build a couple of necessary functions into a private libgcc
13LIBGCC	= $(obj)libgcc.o
14GLSOBJS	+= ashldi3.o
15GLSOBJS	+= ashrdi3.o
16GLSOBJS	+= lshrdi3.o
17LGOBJS	:= $(addprefix $(obj),$(GLSOBJS))
18
19SOBJS-y	+=
20
21COBJS-y	+= board.o
22COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
23
24SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
25OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
26
27# Always build libmips.o
28TARGETS	:= $(LIB)
29
30# Build private libgcc only when asked for
31ifdef USE_PRIVATE_LIBGCC
32TARGETS	+= $(LIBGCC)
33endif
34
35all:	$(TARGETS)
36
37$(LIB):	$(obj).depend $(OBJS)
38	$(call cmd_link_o_target, $(OBJS))
39
40$(LIBGCC): $(obj).depend $(LGOBJS)
41	$(call cmd_link_o_target, $(LGOBJS))
42
43#########################################################################
44
45# defines $(obj).depend target
46include $(SRCTREE)/rules.mk
47
48sinclude $(obj).depend
49
50#########################################################################
51