[Makefile] Sort COBJS in lib_<arch> Makefiles
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
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)