[Makefile] Sort COBJS in lib_<arch> Makefiles

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
diff --git a/lib_arm/Makefile b/lib_arm/Makefile
index 18c9e97..12a8748 100644
--- a/lib_arm/Makefile
+++ b/lib_arm/Makefile
@@ -25,13 +25,21 @@
 
 LIB	= $(obj)lib$(ARCH).a
 
-SOBJS	= _ashldi3.o _ashrdi3.o _divsi3.o _modsi3.o _udivsi3.o _umodsi3.o
+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	= board.o bootm.o \
-	  cache.o div0.o interrupts.o
+COBJS-y	+= board.o
+COBJS-y	+= bootm.o
+COBJS-y	+= cache.o
+COBJS-y	+= div0.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)
diff --git a/lib_avr32/Makefile b/lib_avr32/Makefile
index ebe237b..37b8051 100644
--- a/lib_avr32/Makefile
+++ b/lib_avr32/Makefile
@@ -27,12 +27,14 @@
 
 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)
diff --git a/lib_blackfin/Makefile b/lib_blackfin/Makefile
index ac3fb28..dfaed6d 100644
--- a/lib_blackfin/Makefile
+++ b/lib_blackfin/Makefile
@@ -29,12 +29,21 @@
 
 LIB	= $(obj)lib$(ARCH).a
 
-SOBJS	= memcpy.o memcmp.o memset.o memmove.o
+SOBJS-y	+= memcmp.o
+SOBJS-y	+= memcpy.o
+SOBJS-y	+= memmove.o
+SOBJS-y	+= memset.o
 
-COBJS	= post.o tests.o board.o bootm.o bf533_string.o cache.o muldi3.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:.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)
diff --git a/lib_i386/Makefile b/lib_i386/Makefile
index ef0ba54..4cc29f4 100644
--- a/lib_i386/Makefile
+++ b/lib_i386/Makefile
@@ -25,13 +25,22 @@
 
 LIB	= $(obj)lib$(ARCH).a
 
-SOBJS	= bios.o bios_pci.o realmode_switch.o
+SOBJS-y	+= bios.o
+SOBJS-y	+= bios_pci.o
+SOBJS-y	+= 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
+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:.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)
diff --git a/lib_m68k/Makefile b/lib_m68k/Makefile
index d515223..f6924cd 100644
--- a/lib_m68k/Makefile
+++ b/lib_m68k/Makefile
@@ -25,12 +25,17 @@
 
 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)
diff --git a/lib_microblaze/Makefile b/lib_microblaze/Makefile
index 9b317a2..141b082 100644
--- a/lib_microblaze/Makefile
+++ b/lib_microblaze/Makefile
@@ -25,12 +25,15 @@
 
 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)
diff --git a/lib_mips/Makefile b/lib_mips/Makefile
index 93cca7a..799eaf2 100644
--- a/lib_mips/Makefile
+++ b/lib_mips/Makefile
@@ -25,12 +25,14 @@
 
 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)
diff --git a/lib_nios/Makefile b/lib_nios/Makefile
index d8ae7bd..c41d981 100644
--- a/lib_nios/Makefile
+++ b/lib_nios/Makefile
@@ -25,12 +25,17 @@
 
 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)
diff --git a/lib_nios2/Makefile b/lib_nios2/Makefile
index 5f996d3..717aa9b 100644
--- a/lib_nios2/Makefile
+++ b/lib_nios2/Makefile
@@ -25,12 +25,16 @@
 
 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)
diff --git a/lib_ppc/Makefile b/lib_ppc/Makefile
index 61507b0..3d76b70 100644
--- a/lib_ppc/Makefile
+++ b/lib_ppc/Makefile
@@ -25,14 +25,21 @@
 
 LIB	= $(obj)lib$(ARCH).a
 
-SOBJS	= ppccache.o ppcstring.o ticks.o
+SOBJS-y	+= ppccache.o
+SOBJS-y	+= ppcstring.o
+SOBJS-y	+= ticks.o
 
-COBJS	= board.o \
-	  bat_rw.o cache.o extable.o kgdb.o time.o interrupts.o \
-	  bootm.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:.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)
diff --git a/lib_sh/Makefile b/lib_sh/Makefile
index edb03d0..a5772a0 100644
--- a/lib_sh/Makefile
+++ b/lib_sh/Makefile
@@ -22,12 +22,14 @@
 
 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)