ia64/xen-unstable

view xen/Makefile @ 3361:bdac3ae67e39

bitkeeper revision 1.1159.1.522 (41d49c4comhlitBINhom6DG5l00gaA)

Merge scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author kaf24@scramble.cl.cam.ac.uk
date Fri Dec 31 00:24:44 2004 +0000 (2004-12-31)
parents b2fa96909734 41bc56b8d4e3
children 09041bbc0e2c d8ba911dce48
line source
2 # This is the correct place to edit the build version.
3 # All other places this is stored (eg. compile.h) should be autogenerated.
4 export XEN_VERSION = 3
5 export XEN_SUBVERSION = 0
6 export XEN_EXTRAVERSION = "-devel"
8 export BASEDIR := $(shell pwd)
10 include Rules.mk
12 default: $(TARGET)
13 gzip -f -9 < $(TARGET) > $(TARGET).gz
15 debug:
16 objdump -D -S $(TARGET)-syms > $(TARGET).s
18 install: $(TARGET)
19 gzip -f -9 < $(TARGET) > $(TARGET).gz
20 mkdir -p $(prefix)/boot
21 install -m0644 $(TARGET).gz $(prefix)/boot
22 install -m0644 $(TARGET)-syms $(prefix)/boot
23 mkdir -p $(prefix)/usr/include/xen/io
24 install -m0644 include/public/*.h $(prefix)/usr/include/xen
25 install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io
26 install -m0644 include/public/COPYING $(prefix)/usr/include/xen
28 dist: $(TARGET)
29 $(MAKE) prefix=`pwd`/../dist/install dist=yes install
31 clean:
32 $(MAKE) -C tools clean
33 $(MAKE) -C common clean
34 $(MAKE) -C drivers clean
35 $(MAKE) -C arch/$(TARGET_ARCH) clean
36 rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
37 rm -f include/asm-*/asm-offsets.h
39 $(TARGET): delete-unfresh-files
40 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
41 $(MAKE) -C tools
42 $(MAKE) include/xen/compile.h
43 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
44 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
45 $(MAKE) -C common
46 $(MAKE) -C drivers
47 $(MAKE) -C arch/$(TARGET_ARCH)
49 # Blow away kernel.o because build info is stored statically within it.
50 delete-unfresh-files:
51 rm -f include/xen/compile.h common/kernel.o
53 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
54 include/xen/compile.h:
55 @LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
56 @LANG=C echo >> $@
57 @LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
58 @LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
59 @LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
60 @LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
61 @LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
62 @LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> $@
63 @LANG=C echo >> $@
64 @LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
65 @LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
66 @LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
67 @LANG=C echo >> $@
68 @LANG=C echo \#define XEN_CHANGESET \"`bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo "information unavailable"`\" >> $@
69 @LANG=C echo >> $@
70 @LANG=C echo \#define XEN_BANNER \\ >> $@
71 ( cd ./tools/figlet && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../../$@ )
72 @LANG=C echo >> $@
74 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
75 @(set -e; \
76 echo "/*"; \
77 echo " * DO NOT MODIFY."; \
78 echo " *"; \
79 echo " * This file was auto-generated from $<"; \
80 echo " *"; \
81 echo " */"; \
82 echo ""; \
83 echo "#ifndef __ASM_OFFSETS_H__"; \
84 echo "#define __ASM_OFFSETS_H__"; \
85 echo ""; \
86 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
87 echo ""; \
88 echo "#endif") <$< >$@
90 .PHONY: default debug install dist clean delete-unfresh-files TAGS
92 SUBDIRS = arch common drivers
93 TAGS:
94 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
95 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
96 -name '*.h' -print; \
97 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
98 MAP:
99 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map