sh: Fix up rsk7203 target for out of tree build

Fix up rsk7203 target to build successfully using out-of-tree build.

Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
Kieran Bingham 2008-12-30 01:16:03 +00:00 committed by Nobuhiro Iwamatsu
parent f7e78f3b74
commit a5b04d00bf
3 changed files with 19 additions and 10 deletions

View File

@ -3230,8 +3230,8 @@ mimc200_config : unconfig
## sh2 (Renesas SuperH) ## sh2 (Renesas SuperH)
######################################################################### #########################################################################
rsk7203_config: unconfig rsk7203_config: unconfig
@ >include/config.h @mkdir -p $(obj)include
@echo "#define CONFIG_RSK7203 1" >> include/config.h @echo "#define CONFIG_RSK7203 1" > $(obj)/include/config.h
@$(MKCONFIG) -a $(@:_config=) sh sh2 rsk7203 renesas @$(MKCONFIG) -a $(@:_config=) sh sh2 rsk7203 renesas
######################################################################### #########################################################################

View File

@ -26,6 +26,10 @@ LIB = lib$(BOARD).a
OBJS := rsk7203.o OBJS := rsk7203.o
SOBJS := lowlevel_init.o SOBJS := lowlevel_init.o
LIB := $(addprefix $(obj),$(LIB))
OBJS := $(addprefix $(obj),$(OBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS) $(LIB): $(obj).depend $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)

View File

@ -28,19 +28,24 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a LIB = $(obj)lib$(CPU).a
START = start.o SOBJS = start.o
OBJS = cpu.o interrupts.o watchdog.o COBJS = cpu.o interrupts.o watchdog.o
all: .depend $(START) $(LIB) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(LIB): $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend
######################################################################### #########################################################################
.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c)
$(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@
# defines $(obj).depend target # defines $(obj).depend target
include $(SRCTREE)/rules.mk include $(SRCTREE)/rules.mk