ia64/xen-unstable

view buildconfigs/Rules.mk @ 11536:33955ca54ec1

[HVM][SVM] Add cr8 intercept to/from code for SVM.
Add proper vlapic unmapping and freeing in the svm relinquish
resources.

Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Tue Sep 19 11:03:36 2006 +0100 (2006-09-19)
parents 8273f730371b
children be8039f8bc14
line source
2 include Config.mk
4 export DESTDIR
6 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
7 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
9 # Setup pristine search path
10 PRISTINE_SRC_PATH ?= .:..
11 vpath pristine-% $(PRISTINE_SRC_PATH)
13 # Let XEN_TARGET_ARCH override ARCH.
14 ifeq ($(XEN_TARGET_ARCH),x86_32)
15 LINUX_ARCH ?= i386
16 else
17 LINUX_ARCH ?= $(XEN_TARGET_ARCH)
18 endif
20 # Expand Linux series to Linux version
21 LINUX_SERIES ?= 2.6
22 LINUX_VER ?= $(shell grep "^LINUX_VER " buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
24 # Setup Linux search path
25 LINUX_SRC_PATH ?= .:..
26 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
27 vpath patch-%.bz2 $(LINUX_SRC_PATH)
29 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
30 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
31 linux-%.tar.bz2:
32 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
33 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
35 patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
36 patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
37 patch-%.bz2:
38 @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
39 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
41 pristine-%: pristine-%/.valid-pristine
42 @true
44 pristine-%/.valid-pristine: %.tar.bz2
45 rm -rf tmp-pristine-$* $(@D)
46 mkdir -p tmp-pristine-$*
47 tar -C tmp-pristine-$* -jxf $<
48 -@rm -f tmp-pristine-$*/pax_global_header
49 mv tmp-pristine-$*/* $(@D)
50 @rm -rf tmp-pristine-$*
51 touch $(@D)/.hgskip
52 touch $@ # update timestamp to avoid rebuild
54 PATCHDIRS := $(wildcard patches/*-*)
56 ifneq ($(PATCHDIRS),)
57 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
59 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
60 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
62 ref-%/.valid-ref: pristine-%/.valid-pristine
63 set -e
64 rm -rf $(@D)
65 cp -al $(<D) $(@D)
66 if [ -d patches/$* ] ; then \
67 echo Applying patches from patches/$*... ; \
68 for i in $$(cat patches/$*/series) ; do \
69 echo ... $$i ; \
70 patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
71 done ; \
72 fi
73 touch $@ # update timestamp to avoid rebuild
74 endif
76 %-install:
77 $(MAKE) -f buildconfigs/mk.$* build
79 %-dist: DESTDIR=$(DISTDIR)/install
80 %-dist: %-install
81 @: # do nothing
83 # Legacy dist target
84 %-build: %-dist
85 @: # do nothing
87 %-prep: DESTDIR=$(DISTDIR)/install
88 %-prep:
89 $(MAKE) -f buildconfigs/mk.$* prep
91 %-config: DESTDIR=$(DISTDIR)/install
92 %-config:
93 $(MAKE) -f buildconfigs/mk.$* config
95 %-delete:
96 $(MAKE) -f buildconfigs/mk.$* delete
98 %-clean:
99 $(MAKE) -f buildconfigs/mk.$* clean
101 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
102 rm -rf tmp-$@
103 cp -al $(<D) tmp-$@
104 ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
105 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
106 rm -rf tmp-$@
108 %-xen.patch: ref-%/.valid-ref
109 rm -rf tmp-$@
110 cp -al $(<D) tmp-$@
111 ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
112 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
113 rm -rf tmp-$@
115 %-mrproper:
116 $(MAKE) -f buildconfigs/mk.$*-xen mrpropper
117 rm -rf pristine-$(*)* ref-$(*)*
118 rm -rf $*-xen.patch
120 .PHONY: config-update-pae
121 config-update-pae:
122 ifeq ($(XEN_TARGET_X86_PAE),y)
123 sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
124 else
125 grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
126 endif
128 # never delete any intermediate files.
129 .SECONDARY: