ia64/xen-unstable

view xen/include/Makefile @ 19673:f3bed18decfc

[VTD] laying the ground work for ATS

These changes lay the ground work for ATS enabling in Xen. It will be
followed by patch which enables PCI MMCFG which is needed for actual
enabling of ATS functionality.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri May 29 09:19:30 2009 +0100 (2009-05-29)
parents f210a633571c
children aaab04808ee7
line source
1 ifneq ($(CONFIG_COMPAT),)
3 compat-arch-$(CONFIG_X86) := x86_32
5 headers-y := \
6 compat/callback.h \
7 compat/elfnote.h \
8 compat/event_channel.h \
9 compat/features.h \
10 compat/grant_table.h \
11 compat/kexec.h \
12 compat/memory.h \
13 compat/nmi.h \
14 compat/physdev.h \
15 compat/platform.h \
16 compat/sched.h \
17 compat/tmem.h \
18 compat/trace.h \
19 compat/vcpu.h \
20 compat/version.h \
21 compat/xen.h \
22 compat/xencomm.h \
23 compat/xenoprof.h
24 headers-$(CONFIG_X86) += compat/arch-x86/xen-mca.h
25 headers-$(CONFIG_X86) += compat/arch-x86/xen.h
26 headers-$(CONFIG_X86) += compat/arch-x86/xen-$(compat-arch-y).h
27 headers-y += compat/arch-$(compat-arch-y).h compat/xlat.h
29 cppflags-y := -include public/xen-compat.h
30 cppflags-$(CONFIG_X86) += -m32
32 # 8-byte types are 4-byte aligned on x86_32 ...
33 prefix-$(CONFIG_X86) := \#pragma pack(4)
34 suffix-$(CONFIG_X86) := \#pragma pack()
36 endif
38 .PHONY: all
39 all: $(headers-y)
41 compat/%.h: compat/%.i Makefile
42 set -e; id=_$$(echo $@ | tr '[:lower:]-/.' '[:upper:]___'); \
43 echo "#ifndef $$id" >$@.new; \
44 echo "#define $$id" >>$@.new; \
45 echo "#include <xen/compat.h>" >>$@.new; \
46 $(if $(filter-out compat/arch-%.h,$@),echo "#include <$(patsubst compat/%,public/%,$@)>" >>$@.new;) \
47 $(if $(prefix-y),echo "$(prefix-y)" >>$@.new;) \
48 grep -v '^# [0-9]' $< | \
49 $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \
50 $(if $(suffix-y),echo "$(suffix-y)" >>$@.new;) \
51 echo "#endif /* $$id */" >>$@.new
52 mv -f $@.new $@
54 compat/%.i: compat/%.c Makefile
55 $(CPP) $(filter-out -M% .%.d,$(CFLAGS)) $(cppflags-y) -o $@ $<
57 compat/%.c: public/%.h xlat.lst Makefile
58 mkdir -p $(@D)
59 grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' $< | \
60 $(BASEDIR)/tools/compat-build-source.py >$@.new
61 mv -f $@.new $@
63 compat/xlat.h: xlat.lst $(filter-out compat/xlat.h,$(headers-y)) $(BASEDIR)/tools/get-fields.sh Makefile
64 grep -v '^[ ]*#' xlat.lst | \
65 while read what name hdr; do \
66 $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $$(echo compat/$$hdr | sed 's,@arch@,$(compat-arch-y),g') || exit $$?; \
67 done >$@.new
68 mv -f $@.new $@
70 clean::
71 rm -rf compat