blob: f969ec55bde4f1c9057c1b33c796715778e3b024 [file] [log] [blame]
Masahiro Yamadace28d7a2013-10-17 17:34:47 +09001# our default target
2.PHONY: all
3all:
4
5include $(TOPDIR)/config.mk
6
7LIB := $(obj)built-in.o
8LIBGCC = $(obj)libgcc.o
9SRCS :=
10
11include Makefile
12
13# Backward compatible: obj-y is preferable
14COBJS := $(sort $(COBJS) $(COBJS-y))
15SOBJS := $(sort $(SOBJS) $(SOBJS-y))
16
17# Going forward use the following
18obj-y := $(sort $(obj-y))
19extra-y := $(sort $(extra-y))
20lib-y := $(sort $(lib-y))
21
22SRCS += $(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))
24OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS) $(obj-y))
25
26LGOBJS := $(addprefix $(obj),$(sort $(GLSOBJS) $(GLCOBJS)) $(lib-y))
27
28all: $(LIB) $(addprefix $(obj),$(extra-y))
29
30$(LIB): $(obj).depend $(OBJS)
31 $(call cmd_link_o_target, $(OBJS))
32
33ifneq ($(strip $(lib-y)),)
34all: $(LIBGCC)
35
36$(LIBGCC): $(obj).depend $(LGOBJS)
37 $(call cmd_link_o_target, $(LGOBJS))
38endif
39
40#########################################################################
41
42# defines $(obj).depend target
43
44include $(TOPDIR)/rules.mk
45
46sinclude $(obj).depend
47
48#########################################################################