Skip to contentSkip to conversation

cpu/mips/Makefile: Change Makefile style

U-Boot-Users Shinya Kuribayashi 1 participant 2 messages Mar 25, 2008

lore
Share & tools
lore
#0 lore raw

Split board-related objects with one line for one file.

---

 cpu/mips/Makefile |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
cpu/mips/Makefile +12 -6
index 92dcc16..c6caf1d 100644
@@ -26,12 +26,18 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(CPU).a
 
 START	= start.o
-COBJS	= asc_serial.o au1x00_serial.o au1x00_eth.o au1x00_usb_ohci.o \
-	  cpu.o interrupts.o incaip_clock.o
-SOBJS	= incaip_wdt.o cache.o
-
-SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS-y	= cache.o
+COBJS-y	= cpu.o interrupts.o
+
+COBJS-y	+= asc_serial.o
+COBJS-y	+= au1x00_serial.o
+COBJS-y	+= au1x00_eth.o
+COBJS-y	+= au1x00_usb_ohci.o
+COBJS-y	+= incaip_clock.o
+SOBJS-y	+= incaip_wdt.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 START	:= $(addprefix $(obj),$(START))
 
 all:	$(obj).depend $(START) $(LIB)
#1 lore raw
Quoted 7 lines · Shinya Kuribayashi
cpu/mips/Makefile +0 -3
@@ -26,12 +26,18 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(CPU).a
 
 START	= start.o
-COBJS	= asc_serial.o au1x00_serial.o au1x00_eth.o au1x00_usb_ohci.o \
-	  cpu.o interrupts.o incaip_clock.o
-SOBJS	= incaip_wdt.o cache.o

cpu/mips/Makefile include $(TOPDIR)/config.mk · line 35

Quoted 10 lines
cpu/mips/Makefile +7 -3
-
-SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS-y	= cache.o
+COBJS-y	= cpu.o interrupts.o
+
+COBJS-y	+= asc_serial.o
+COBJS-y	+= au1x00_serial.o
+COBJS-y	+= au1x00_eth.o
+COBJS-y	+= au1x00_usb_ohci.o

Hm, should this be something like

COBJS-y += au1x00_serial.o au1x00_eth.o au1x00_usb_ohci.o

?

Quoted 8 lines
cpu/mips/Makefile +5 -0
+COBJS-y	+= incaip_clock.o
+SOBJS-y	+= incaip_wdt.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 START	:= $(addprefix $(obj),$(START))
 
 all:	$(obj).depend $(START) $(LIB)