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