Skip to content
Snippets Groups Projects
Commit 951344b7 authored by ken kuo's avatar ken kuo Committed by Macpaul Lin
Browse files

nds32: Convert Makefiles to use COBJS-y style


Signed-off-by: default avatarKuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
parent 4fc96705
No related branches found
No related tags found
No related merge requests found
...@@ -31,8 +31,8 @@ LIB = $(obj)lib$(CPU).o ...@@ -31,8 +31,8 @@ LIB = $(obj)lib$(CPU).o
START = start.o START = start.o
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
START := $(addprefix $(obj),$(START)) START := $(addprefix $(obj),$(START))
all: $(obj).depend $(START) $(LIB) all: $(obj).depend $(START) $(LIB)
......
...@@ -33,15 +33,15 @@ LIB = $(obj)lib$(SOC).o ...@@ -33,15 +33,15 @@ LIB = $(obj)lib$(SOC).o
COBJS-y := cpu.o timer.o COBJS-y := cpu.o timer.o
ifndef CONFIG_SKIP_LOWLEVEL_INIT ifndef CONFIG_SKIP_LOWLEVEL_INIT
SOBJS := lowlevel_init.o SOBJS-y := lowlevel_init.o
endif endif
ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG
SOBJS += watchdog.o SOBJS-y += watchdog.o
endif endif
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
all: $(obj).depend $(LIB) all: $(obj).depend $(LIB)
......
...@@ -33,15 +33,15 @@ LIB = $(obj)lib$(SOC).o ...@@ -33,15 +33,15 @@ LIB = $(obj)lib$(SOC).o
COBJS-y := cpu.o timer.o COBJS-y := cpu.o timer.o
ifndef CONFIG_SKIP_LOWLEVEL_INIT ifndef CONFIG_SKIP_LOWLEVEL_INIT
SOBJS := lowlevel_init.o SOBJS-y := lowlevel_init.o
endif endif
ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG
SOBJS += watchdog.o SOBJS-y += watchdog.o
endif endif
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
all: $(obj).depend $(LIB) all: $(obj).depend $(LIB)
......
...@@ -29,12 +29,15 @@ include $(TOPDIR)/config.mk ...@@ -29,12 +29,15 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(ARCH).o 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-$(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)) $(call cmd_link_o_target, $(OBJS))
######################################################################### #########################################################################
......
...@@ -26,10 +26,10 @@ include $(TOPDIR)/config.mk ...@@ -26,10 +26,10 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o LIB = $(obj)lib$(BOARD).o
COBJS := adp-ag101.o COBJS-y := adp-ag101.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
$(LIB): $(OBJS) $(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS)) $(call cmd_link_o_target, $(OBJS))
......
...@@ -26,10 +26,10 @@ include $(TOPDIR)/config.mk ...@@ -26,10 +26,10 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o LIB = $(obj)lib$(BOARD).o
COBJS := adp-ag101p.o COBJS-y := adp-ag101p.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
$(LIB): $(OBJS) $(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS)) $(call cmd_link_o_target, $(OBJS))
......
...@@ -27,8 +27,8 @@ LIB = $(obj)lib$(BOARD).o ...@@ -27,8 +27,8 @@ LIB = $(obj)lib$(BOARD).o
COBJS := adp-ag102.o COBJS := adp-ag102.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
$(LIB): $(OBJS) $(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS)) $(call cmd_link_o_target, $(OBJS))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment