3 # Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 # SPDX-License-Identifier: GPL-2.0+
8 include $(TOPDIR)/config.mk
10 LIB = $(obj)lib$(ARCH).o
11 LIBGCC = $(obj)libgcc.o
23 COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
24 ifeq ($(CONFIG_SH2),y)
29 ifeq ($(CONFIG_CMD_SH_ZIMAGEBOOT),y)
30 COBJS-y += zimageboot.o
33 SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
34 OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
35 LGOBJS := $(addprefix $(obj),$(GLSOBJS)) \
36 $(addprefix $(obj),$(GLCOBJS))
38 # Always build libsh.o
41 # Build private libgcc only when asked for
42 ifdef USE_PRIVATE_LIBGCC
48 $(LIB): $(obj).depend $(OBJS)
49 $(call cmd_link_o_target, $(OBJS))
51 $(LIBGCC): $(obj).depend $(LGOBJS)
52 $(call cmd_link_o_target, $(LGOBJS))
54 #########################################################################
56 # defines $(obj).depend target
57 include $(SRCTREE)/rules.mk
59 sinclude $(obj).depend
61 #########################################################################