ia64/xen-unstable

view unmodified_drivers/linux-2.6/mkbuildtree @ 12938:b58670602d35

[POWERPC][XEN] Builtin cmdline dependency rule
Rebuild cmdline.o when the user changes the CMDLINE=X argument passed to
the make invocation. I couldn't find an example of another project that
handles this case properly, so I came up with this.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Thu Oct 05 15:48:26 2006 -0500 (2006-10-05)
parents af1403dd13af
children fcaf34bc5e41
line source
1 #! /bin/sh
3 if [ $1 ]; then
4 uname="$1"
5 else
6 uname=`uname -m`
7 echo "Defaulting to this machine's architecture, $uname, for linking."
8 echo "This may be overridden on the command line (i386,x86_64,ia64)."
9 fi
11 C=$PWD
13 XEN=$C/../../xen
14 XL=$C/../../linux-2.6-xen-sparse
16 for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
17 if ! echo $d | egrep -q back; then
18 lndir $d $(basename $d) > /dev/null 2>&1
19 fi
20 done
22 ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
23 ln -sf ${XL}/drivers/xen/core/features.c platform-pci
24 ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
25 ln -sf ${XL}/drivers/xen/core/reboot.c util
27 mkdir -p include
28 mkdir -p include/xen
29 mkdir -p include/public
30 mkdir -p include/asm
31 mkdir -p include/asm/xen
33 lndir -silent ${XL}/include/xen include/xen
34 ln -nsf ${XEN}/include/public include/xen/interface
36 # Need to be quite careful here: we don't want the files we link in to
37 # risk overriding the native Linux ones (in particular, system.h must
38 # be native and not xenolinux).
39 case "$uname"
40 in
41 "x86_64")
42 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
43 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
44 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
45 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
46 ln -sf ${XL}/include/asm-i386 include/asm-i386
47 ;;
48 i[34567]86)
49 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
50 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
51 ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
52 ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
53 ;;
54 "ia64")
55 ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
56 ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
57 ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
58 ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
59 ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
60 ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
61 ln -sf ${XL}/arch/ia64/xen/xcom_mini.c platform-pci
62 ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci
63 ;;
64 *)
65 echo unknown architecture $uname
66 exit 1
67 ;;
68 esac