LIB = $(obj)lib$(ARCH).a
-SOBJS = _ashldi3.o _ashrdi3.o _divsi3.o _modsi3.o _udivsi3.o _umodsi3.o
-
-COBJS = board.o bootm.o \
- cache.o div0.o interrupts.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS-y += _ashldi3.o
+SOBJS-y += _ashrdi3.o
+SOBJS-y += _divsi3.o
+SOBJS-y += _modsi3.o
+SOBJS-y += _udivsi3.o
+SOBJS-y += _umodsi3.o
+
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += cache.o
+COBJS-y += div0.o
+COBJS-y += interrupts.o
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS = memset.o
+SOBJS-y += memset.o
-COBJS = board.o interrupts.o bootm.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += interrupts.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS = memcpy.o memcmp.o memset.o memmove.o
-
-COBJS = post.o tests.o board.o bootm.o bf533_string.o cache.o muldi3.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS-y += memcmp.o
+SOBJS-y += memcpy.o
+SOBJS-y += memmove.o
+SOBJS-y += memset.o
+
+COBJS-y += bf533_string.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += cache.o
+COBJS-y += muldi3.o
+COBJS-y += post.o
+COBJS-y += tests.o
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS = bios.o bios_pci.o realmode_switch.o
-
-COBJS = board.o bios_setup.o bootm.o zimage.o realmode.o \
- pci_type1.o pci.o video_bios.o video.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS-y += bios.o
+SOBJS-y += bios_pci.o
+SOBJS-y += realmode_switch.o
+
+COBJS-y += bios_setup.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += pci.o
+COBJS-y += pci_type1.o
+COBJS-y += realmode.o
+COBJS-y += video_bios.o
+COBJS-y += video.o
+COBJS-y += zimage.o
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS =
+SOBJS-y +=
-COBJS = cache.o traps.o time.o interrupts.o board.o bootm.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += cache.o
+COBJS-y += interrupts.o
+COBJS-y += time.o
+COBJS-y += traps.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS =
+SOBJS-y +=
-COBJS = board.o bootm.o time.o cache.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += cache.o
+COBJS-y += time.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS =
+SOBJS-y +=
-COBJS = board.o time.o bootm.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += time.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS =
+SOBJS-y +=
-COBJS = board.o cache.o divmod.o bootm.o mult.o time.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += cache.o
+COBJS-y += divmod.o
+COBJS-y += mult.o
+COBJS-y += time.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS = cache.o
+SOBJS-y += cache.o
-COBJS = board.o divmod.o bootm.o mult.o time.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += divmod.o
+COBJS-y += mult.o
+COBJS-y += time.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS = ppccache.o ppcstring.o ticks.o
-
-COBJS = board.o \
- bat_rw.o cache.o extable.o kgdb.o time.o interrupts.o \
- bootm.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS-y += ppccache.o
+SOBJS-y += ppcstring.o
+SOBJS-y += ticks.o
+
+COBJS-y += bat_rw.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+COBJS-y += cache.o
+COBJS-y += extable.o
+COBJS-y += interrupts.o
+COBJS-y += kgdb.o
+COBJS-y += time.o
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
LIB = $(obj)lib$(ARCH).a
-SOBJS =
+SOBJS-y +=
-COBJS = board.o bootm.o # time.o
+COBJS-y += board.o
+COBJS-y += bootm.o
+#COBJS-y += time.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)