ia64/xen-unstable

view xen/Makefile @ 9601:bbd1057d38f0

Use PAGE_OFFSET instead of __PAGE_OFFSET in netfront.c.
__PAGE_OFFSET is not defined on all platforms.
Linux/ia64 and Linux/ppc don't have __PAGE_OFFSET definition.

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