Skip to contentSkip to conversation

nds32: Convert Makefiles to use COBJS-y style

PATCH New Kuan-Yu Kuo 2 participants 2 messages Jul 24, 2013 – Jul 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nds32: Convert Makefiles to use COBJS-y style

---
 arch/nds32/cpu/n1213/Makefile       |    4 ++--
 arch/nds32/cpu/n1213/ag101/Makefile |    8 ++++----
 arch/nds32/cpu/n1213/ag102/Makefile |    8 ++++----
 arch/nds32/lib/Makefile             |    9 ++++++---
 board/AndesTech/adp-ag101/Makefile  |    6 +++---
 board/AndesTech/adp-ag101p/Makefile |    6 +++---
 board/AndesTech/adp-ag102/Makefile  |    4 ++--
 7 files changed, 24 insertions(+), 21 deletions(-)
arch/nds32/cpu/n1213/Makefile +2 -2
index da15574..7e80082 100644
@@ -31,8 +31,8 @@ LIB	= $(obj)lib$(CPU).o
 
 START	= start.o
 
-SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
 START	:= $(addprefix $(obj),$(START))
 
 all:	$(obj).depend $(START) $(LIB)
arch/nds32/cpu/n1213/ag101/Makefile +4 -4
index 8716c4e..737a972 100644
@@ -33,15 +33,15 @@ LIB	= $(obj)lib$(SOC).o
 COBJS-y	:= cpu.o timer.o
 
 ifndef CONFIG_SKIP_LOWLEVEL_INIT
-SOBJS	:= lowlevel_init.o
+SOBJS-y	:= lowlevel_init.o
 endif
 
 ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG
-SOBJS	+= watchdog.o
+SOBJS-y	+= watchdog.o
 endif
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 
 all:	$(obj).depend $(LIB)
 
arch/nds32/cpu/n1213/ag102/Makefile +4 -4
index 8716c4e..737a972 100644
@@ -33,15 +33,15 @@ LIB	= $(obj)lib$(SOC).o
 COBJS-y	:= cpu.o timer.o
 
 ifndef CONFIG_SKIP_LOWLEVEL_INIT
-SOBJS	:= lowlevel_init.o
+SOBJS-y	:= lowlevel_init.o
 endif
 
 ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG
-SOBJS	+= watchdog.o
+SOBJS-y	+= watchdog.o
 endif
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 
 all:	$(obj).depend $(LIB)
 
arch/nds32/lib/Makefile +6 -3
index 705e1ff..022b21a 100644
@@ -29,12 +29,15 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(ARCH).o
 
-OBJS	:= board.o cache.o interrupts.o
+COBJS-y += board.o
+COBJS-y += cache.o
 COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
+COBJS-y += interrupts.o
 
-all:	$(LIB)
+SRCS  := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 
-$(LIB):	$(OBJS) $(SOBJS)
+$(LIB): $(obj).depend $(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
 #########################################################################
board/AndesTech/adp-ag101/Makefile +3 -3
index d55a799..867e1cf 100644
@@ -26,10 +26,10 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= adp-ag101.o
+COBJS-y	:= adp-ag101.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
 
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
board/AndesTech/adp-ag101p/Makefile +3 -3
index 03c3ff4..5f513c8 100644
@@ -26,10 +26,10 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= adp-ag101p.o
+COBJS-y	:= adp-ag101p.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
 
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
board/AndesTech/adp-ag102/Makefile +2 -2
index 1cbf2d4..44f117d 100644
@@ -27,8 +27,8 @@ LIB	= $(obj)lib$(BOARD).o
 
 COBJS	:= adp-ag102.o
 
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
 
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 nds32: Convert Makefiles to use COBJS-y style

Hi Kuan-Yu,

2013/7/25 Kuan-Yu Kuo <[email protected]>:

Quoted 12 lines
---
 arch/nds32/cpu/n1213/Makefile       |    4 ++--
 arch/nds32/cpu/n1213/ag101/Makefile |    8 ++++----
 arch/nds32/cpu/n1213/ag102/Makefile |    8 ++++----
 arch/nds32/lib/Makefile             |    9 ++++++---
 board/AndesTech/adp-ag101/Makefile  |    6 +++---
 board/AndesTech/adp-ag101p/Makefile |    6 +++---
 board/AndesTech/adp-ag102/Makefile  |    4 ++--
 7 files changed, 24 insertions(+), 21 deletions(-)

Applied to u-boot-nds32.
Thanks!

Signature · 2 lines
Best regards,
Macpaul Lin