summaryrefslogtreecommitdiff
path: root/board/integratorap
diff options
context:
space:
mode:
authorWolfgang Denk <wd@nyx.denx.de>2006-10-11 14:15:21 +0200
committerWolfgang Denk <wd@nyx.denx.de>2006-10-11 14:15:21 +0200
commitfb883a521e04437acfe989de3e152b2e4866856b (patch)
tree0cf61f45ae693082b24ced9c1da9a87bdd0cabbd /board/integratorap
parent4a39616da41840bbc5b4c3f69df9861c2e6a8425 (diff)
parent2255b2d2044d434463eb2661e18018e50f1643d9 (diff)
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'board/integratorap')
-rw-r--r--board/integratorap/Makefile20
-rw-r--r--board/integratorap/config.mk6
-rwxr-xr-xboard/integratorap/split_by_variant.sh9
3 files changed, 24 insertions, 11 deletions
diff --git a/board/integratorap/Makefile b/board/integratorap/Makefile
index 358df6251..505121e07 100644
--- a/board/integratorap/Makefile
+++ b/board/integratorap/Makefile
@@ -1,5 +1,5 @@
#
-# (C) Copyright 2000-2004
+# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# (C) Copyright 2004
@@ -27,13 +27,17 @@
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB = $(obj)lib$(BOARD).a
-OBJS := integratorap.o flash.o
+COBJS := integratorap.o flash.o
SOBJS := lowlevel_init.o memsetup.o
-$(LIB): $(OBJS) $(SOBJS)
- $(AR) crv $@ $^
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
@@ -43,9 +47,9 @@ distclean: clean
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
--include .depend
+sinclude $(obj).depend
#########################################################################
diff --git a/board/integratorap/config.mk b/board/integratorap/config.mk
index 25b79b3e7..e4c5c3b57 100644
--- a/board/integratorap/config.mk
+++ b/board/integratorap/config.mk
@@ -3,3 +3,9 @@
#
TEXT_BASE = 0x01000000
+
+ifneq ($(OBJTREE),$(SRCTREE))
+# We are building u-boot in a separate directory, use generated
+# .lds script from OBJTREE directory.
+LDSCRIPT := $(OBJTREE)/board/$(BOARDDIR)/u-boot.lds
+endif
diff --git a/board/integratorap/split_by_variant.sh b/board/integratorap/split_by_variant.sh
index 9f71babf3..53b0d1e34 100755
--- a/board/integratorap/split_by_variant.sh
+++ b/board/integratorap/split_by_variant.sh
@@ -103,14 +103,17 @@ then
echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil
echo " /* CM may not have TCRAM */" >> tmp.fil
fi
-mv tmp.fil ./include/config.h
+
+mkdir -p ${obj}include
+mkdir -p ${obj}board/integratorap
+mv tmp.fil ${obj}include/config.h
# ---------------------------------------------------------
# Ensure correct core object loaded first in U-Boot image
# ---------------------------------------------------------
-sed -r 's/CPU_FILE/cpu\/'$cpu'\/start.o/; s/#.*//' board/integratorap/u-boot.lds.template > board/integratorap/u-boot.lds
+sed -r 's/CPU_FILE/cpu\/'$cpu'\/start.o/; s/#.*//' ${src}board/integratorap/u-boot.lds.template > ${obj}board/integratorap/u-boot.lds
# ---------------------------------------------------------
# Complete the configuration
# ---------------------------------------------------------
-./mkconfig -a integratorap arm $cpu integratorap;
+$MKCONFIG -a integratorap arm $cpu integratorap;
echo "Variant:: $variant with core $cpu"