]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mcu25: fix out of tree building
authorWolfgang Denk <wd@denx.de>
Wed, 27 Oct 2010 08:29:56 +0000 (10:29 +0200)
committerWolfgang Denk <wd@denx.de>
Wed, 27 Oct 2010 18:13:46 +0000 (20:13 +0200)
Out of tree building of the Netstal mcu25 board failed like
that:

Configuring for mcu25 board...
Assembler messages: Fatal error: can't create /work/wd/tmp-ppc/board/netstal/mcu25/../common/fixed_sdram.o: No such file or directory
Assembler messages: Fatal error: can't create /work/wd/tmp-ppc/board/netstal/mcu25/../common/nm_bsp.o: No such file or directory

Adapt (and simplify) the Makefile.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Niklaus Giger <niklaus.giger@netstal.com>
board/netstal/mcu25/Makefile

index 6722d53927e45f896ed3705fa4874ab435aedecb..cd62642894425f87b0140c7fd330d49697fa37b2 100644 (file)
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-# NOBJS : Netstal common objects
-NOBJS  = fixed_sdram.o nm_bsp.o
-COBJS  = $(BOARD).o
-SOBJS  =
+COBJS  = $(BOARD).o \
+       ../common/fixed_sdram.o \
+       ../common/nm_bsp.o
 
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix ../common/,$(NOBJS:.o=.c))
+SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
-NOBJS  := $(addprefix $(obj)../common/,$(NOBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-$(LIB):        $(OBJS) $(SOBJS) $(NOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(NOBJS)
+$(LIB):        $(OBJS)
+       $(AR) $(ARFLAGS) $@ $^
 
 clean:
-       rm -f $(SOBJS) $(OBJS)
+       rm -f $(OBJS)
 
 distclean:     clean
        rm -f $(LIB) core *.bak $(obj).depend