ia64/xen-unstable

view xen/Makefile @ 5704:9b73afea874e

Certain types of event channel are now auto-bound to vcpu0 by Xen.
Make sure that xenolinux agrees with this.
author sos22@douglas.cl.cam.ac.uk
date Fri Jul 08 15:35:43 2005 +0000 (2005-07-08)
parents 579d1e771025
children c1a7ed266c7e a83ac0806d6b
line source
1 # Default is to install to local 'dist' directory.
2 DISTDIR ?= ../dist
3 DESTDIR ?= $(DISTDIR)/install
5 INSTALL = install
6 INSTALL_DATA = $(INSTALL) -m0644
7 INSTALL_DIR = $(INSTALL) -d -m0755
9 # This is the correct place to edit the build version.
10 # All other places this is stored (eg. compile.h) should be autogenerated.
11 export XEN_VERSION = 3
12 export XEN_SUBVERSION = 0
13 export XEN_EXTRAVERSION = -devel
14 export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
16 export BASEDIR := $(CURDIR)
18 include Rules.mk
20 default: build
21 $(TARGET).gz: $(TARGET)
22 gzip -f -9 < $< > $@.new
23 mv $@.new $@
25 debug:
26 objdump -D -S $(TARGET)-syms > $(TARGET).s
28 dist: install
30 build: $(TARGET).gz
32 install: $(TARGET).gz
33 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
34 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION).gz
35 ln -f -s $(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
36 ln -f -s $(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
37 ln -f -s $(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
38 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
39 [ -d $(DESTDIR)/usr/include/xen/io ] || \
40 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
41 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
42 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
43 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
45 clean: delete-unfresh-files
46 $(MAKE) -C tools clean
47 $(MAKE) -C common clean
48 $(MAKE) -C drivers clean
49 $(MAKE) -C acm clean
50 $(MAKE) -C arch/$(TARGET_ARCH) clean
51 rm -f include/asm *.o $(TARGET)* *~ core
52 rm -f include/asm-*/asm-offsets.h
53 rm -f tools/figlet/*.o tools/figlet/figlet
54 rm -f include/xen/acm_policy.h
56 $(TARGET): delete-unfresh-files
57 $(MAKE) include/xen/compile.h
58 $(MAKE) include/xen/acm_policy.h
59 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
60 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
61 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
62 $(MAKE) -C common
63 $(MAKE) -C drivers
64 ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
65 $(MAKE) -C acm
66 endif
67 $(MAKE) -C arch/$(TARGET_ARCH)
69 # drivers/char/console.o contains static banner/compile info. Blow it away.
70 # Don't refresh these files during e.g., 'sudo make install'
71 delete-unfresh-files:
72 @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
73 rm -f include/xen/{banner,compile}.h; \
74 $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files; \
75 fi
77 # acm_policy.h contains security policy for Xen
78 include/xen/acm_policy.h:
79 @(set -e; \
80 echo "/*"; \
81 echo " * DO NOT MODIFY."; \
82 echo " *"; \
83 echo " * This file was auto-generated by xen/Makefile $<"; \
84 echo " *"; \
85 echo " */"; \
86 echo ""; \
87 echo "#ifndef ACM_USE_SECURITY_POLICY"; \
88 echo "#define ACM_USE_SECURITY_POLICY $(ACM_USE_SECURITY_POLICY)"; \
89 echo "#endif") >$@
91 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
92 include/xen/compile.h: LANG=C
93 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
94 @sed -e 's/@@date@@/$(shell date)/g' \
95 -e 's/@@time@@/$(shell date +%T)/g' \
96 -e 's/@@whoami@@/$(shell whoami)/g' \
97 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
98 -e 's/@@hostname@@/$(shell hostname)/g' \
99 -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)/g' \
100 -e 's/@@version@@/$(XEN_VERSION)/g' \
101 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
102 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
103 -e 's!@@changeset@@!$(shell (hg parents | awk -F: '/^changeset/{CS=$$3};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 2>/dev/null || (head -6 ChangeLog | awk -F: '/^changeset/{CS=$$3};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 2>/dev/null || echo information unavailable)!g' \
104 < include/xen/compile.h.in > $@.new
105 @cat include/xen/banner.h >> $@.new
106 @mv -f $@.new $@
108 tools/figlet/figlet: tools/figlet/figlet.o
109 $(HOSTCC) -o $@ $<
110 tools/figlet/figlet.o: tools/figlet/figlet.c
111 $(HOSTCC) -o $@ -c $<
113 include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
114 tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) > $@.new
115 @mv -f $@.new $@
117 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
118 @(set -e; \
119 echo "/*"; \
120 echo " * DO NOT MODIFY."; \
121 echo " *"; \
122 echo " * This file was auto-generated from $<"; \
123 echo " *"; \
124 echo " */"; \
125 echo ""; \
126 echo "#ifndef __ASM_OFFSETS_H__"; \
127 echo "#define __ASM_OFFSETS_H__"; \
128 echo ""; \
129 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
130 echo ""; \
131 echo "#endif") <$< >$@
133 .PHONY: default debug install dist clean delete-unfresh-files TAGS tags
135 SUBDIRS = acm arch/$(TARGET_ARCH) common drivers
136 define all_sources
137 ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
138 find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
139 -name config \) -prune -o -name '*.h' -print; \
140 find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
141 endef
142 TAGS:
143 $(all_sources) | etags -
144 tags:
145 $(all_sources) | xargs ctags
146 cscope:
147 $(all_sources) > cscope.files
148 cscope -k -b -q
149 MAP:
150 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map