2 # (C) Copyright 2003-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
8 include $(TOPDIR)/config.mk
10 LIB = $(obj)lib$(ARCH).o
12 ## Build a couple of necessary functions into a private libgcc
13 LIBGCC = $(obj)libgcc.o
17 LGOBJS := $(addprefix $(obj),$(GLSOBJS))
22 COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
24 SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
25 OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
27 # Always build libmips.o
30 # Build private libgcc only when asked for
31 ifdef USE_PRIVATE_LIBGCC
37 $(LIB): $(obj).depend $(OBJS)
38 $(call cmd_link_o_target, $(OBJS))
40 $(LIBGCC): $(obj).depend $(LGOBJS)
41 $(call cmd_link_o_target, $(LGOBJS))
43 #########################################################################
45 # defines $(obj).depend target
46 include $(SRCTREE)/rules.mk
48 sinclude $(obj).depend
50 #########################################################################