5 include $(TOPDIR)/config.mk
7 LIB := $(obj)built-in.o
8 LIBGCC = $(obj)libgcc.o
13 # Backward compatible: obj-y is preferable
14 COBJS := $(sort $(COBJS) $(COBJS-y))
15 SOBJS := $(sort $(SOBJS) $(SOBJS-y))
17 # Going forward use the following
18 obj-y := $(sort $(obj-y))
19 extra-y := $(sort $(extra-y))
20 lib-y := $(sort $(lib-y))
22 SRCS += $(COBJS:.o=.c) $(SOBJS:.o=.S) \
23 $(wildcard $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) $(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S))
24 OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS) $(obj-y))
26 LGOBJS := $(addprefix $(obj),$(sort $(GLSOBJS) $(GLCOBJS)) $(lib-y))
28 all: $(LIB) $(addprefix $(obj),$(extra-y))
30 $(LIB): $(obj).depend $(OBJS)
31 $(call cmd_link_o_target, $(OBJS))
33 ifneq ($(strip $(lib-y)),)
36 $(LIBGCC): $(obj).depend $(LGOBJS)
37 $(call cmd_link_o_target, $(LGOBJS))
40 #########################################################################
42 # defines $(obj).depend target
44 include $(TOPDIR)/rules.mk
46 sinclude $(obj).depend
48 #########################################################################