ia64/xen-unstable

view xen/Makefile @ 8723:61e7afb7344b

The memset in init_switch_stack is overwriting the processor stack.
We need to avoid manipulating the switch stack area of the currently
running cpu. Original patch by Kevin Tian.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Feb 01 00:56:19 2006 +0100 (2006-02-01)
parents 2d32c7489a39
children c6c739bf254d
line source
1 INSTALL = install
2 INSTALL_DATA = $(INSTALL) -m0644
3 INSTALL_DIR = $(INSTALL) -d -m0755
5 # This is the correct place to edit the build version.
6 # All other places this is stored (eg. compile.h) should be autogenerated.
7 export XEN_VERSION = 3
8 export XEN_SUBVERSION = 0
9 export XEN_EXTRAVERSION = .0
10 export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
12 export BASEDIR := $(CURDIR)
14 include Rules.mk
16 default: build
17 $(TARGET).gz: $(TARGET)
18 gzip -f -9 < $< > $@.new
19 mv $@.new $@
21 debug:
22 objdump -D -S $(TARGET)-syms > $(TARGET).s
24 dist: install
26 build: $(TARGET).gz
28 install: $(TARGET).gz
29 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
30 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
31 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
32 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
33 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
34 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
35 [ -d $(DESTDIR)/usr/include/xen/io ] || \
36 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
37 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
38 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
39 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
41 clean: delete-unfresh-files
42 $(MAKE) -C tools clean
43 $(MAKE) -C common clean
44 $(MAKE) -C drivers clean
45 $(MAKE) -C acm clean
46 $(MAKE) -C arch/$(TARGET_ARCH) clean
47 rm -f include/asm *.o $(TARGET)* *~ core
48 rm -f include/asm-*/asm-offsets.h
49 rm -f include/xen/acm_policy.h
51 $(TARGET): delete-unfresh-files
52 $(MAKE) -C tools
53 $(MAKE) include/xen/compile.h
54 $(MAKE) include/xen/acm_policy.h
55 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
56 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
57 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
58 $(MAKE) -C common
59 $(MAKE) -C drivers
60 ifeq ($(ACM_SECURITY),y)
61 $(MAKE) -C acm
62 endif
63 $(MAKE) -C arch/$(TARGET_ARCH)
65 # drivers/char/console.o contains static banner/compile info. Blow it away.
66 # Don't refresh these files during e.g., 'sudo make install'
67 delete-unfresh-files:
68 @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
69 rm -f include/xen/{banner,compile}.h; \
70 fi
72 # acm_policy.h contains security policy for Xen
73 include/xen/acm_policy.h:
74 @(set -e; \
75 echo "/*"; \
76 echo " * DO NOT MODIFY."; \
77 echo " *"; \
78 echo " * This file was auto-generated by xen/Makefile $<"; \
79 echo " *"; \
80 echo " */"; \
81 echo ""; \
82 echo "#ifndef ACM_DEFAULT_SECURITY_POLICY"; \
83 echo "#define ACM_DEFAULT_SECURITY_POLICY $(ACM_DEFAULT_SECURITY_POLICY)"; \
84 echo "#endif") >$@
86 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
87 include/xen/compile.h: LANG=C
88 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
89 @sed -e 's/@@date@@/$(shell date)/g' \
90 -e 's/@@time@@/$(shell date +%T)/g' \
91 -e 's/@@whoami@@/$(shell whoami)/g' \
92 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
93 -e 's/@@hostname@@/$(shell hostname)/g' \
94 -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)/g' \
95 -e 's/@@version@@/$(XEN_VERSION)/g' \
96 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
97 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
98 -e 's!@@changeset@@!$(shell ((hg parents || head -n 7 ../ChangeLog || echo date: unavailable) | awk '{FS="changeset:[ ]+"}/^changeset/{CS=$$2};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 2>/dev/null)!g' \
99 < include/xen/compile.h.in > $@.new
100 @cat include/xen/banner.h >> $@.new
101 @mv -f $@.new $@
103 include/xen/banner.h:
104 tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) > $@.new
105 @mv -f $@.new $@
107 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
108 @(set -e; \
109 echo "/*"; \
110 echo " * DO NOT MODIFY."; \
111 echo " *"; \
112 echo " * This file was auto-generated from $<"; \
113 echo " *"; \
114 echo " */"; \
115 echo ""; \
116 echo "#ifndef __ASM_OFFSETS_H__"; \
117 echo "#define __ASM_OFFSETS_H__"; \
118 echo ""; \
119 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
120 echo ""; \
121 echo "#endif") <$< >$@
123 .PHONY: default debug install dist clean delete-unfresh-files TAGS tags
125 SUBDIRS = acm arch/$(TARGET_ARCH) common drivers
126 define all_sources
127 ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
128 find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
129 -name config \) -prune -o -name '*.h' -print; \
130 find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
131 endef
132 TAGS:
133 $(all_sources) | etags -
134 tags:
135 $(all_sources) | xargs ctags
136 cscope:
137 $(all_sources) > cscope.files
138 cscope -k -b -q
139 MAP:
140 $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map