ia64/xen-unstable

view xen/Makefile @ 3251:a169836882cb

bitkeeper revision 1.1159.170.59 (41b4c2fdJ2gj_BWy27Vj3ptayZp_yg)

sync w/ head.
author cl349@arcadians.cl.cam.ac.uk
date Mon Dec 06 20:37:17 2004 +0000 (2004-12-06)
parents 4644bea63898
children f5a6b3a8c9b9 ccba56abef17 90394f6cfd34 5ed086e1cfd0
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 = 2
5 export XEN_SUBVERSION = 0
6 export XEN_EXTRAVERSION = ""
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 figlet 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) include/xen/compile.h
42 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
43 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
44 $(MAKE) -C common
45 $(MAKE) -C drivers
46 $(MAKE) -C arch/$(TARGET_ARCH)
48 # Blow away kernel.o because build info is stored statically within it.
49 delete-unfresh-files:
50 rm -f include/xen/compile.h common/kernel.o
52 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
53 include/xen/compile.h:
54 @LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
55 @LANG=C echo >> $@
56 @LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
57 @LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
58 @LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
59 @LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
60 @LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
61 @LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> $@
62 @LANG=C echo >> $@
63 @LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
64 @LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
65 @LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
66 @LANG=C echo >> $@
67 @LANG=C echo \#define XEN_CHANGESET \"`bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo "information unavailable"`\" >> $@
68 @LANG=C echo >> $@
69 @LANG=C echo \#define XEN_BANNER \\ >> $@
70 cd ./figlet && make && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../$@ && cd ..
71 @LANG=C echo >> $@
73 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
74 @(set -e; \
75 echo "/*"; \
76 echo " * DO NOT MODIFY."; \
77 echo " *"; \
78 echo " * This file was auto-generated from $<"; \
79 echo " *"; \
80 echo " */"; \
81 echo ""; \
82 echo "#ifndef __ASM_OFFSETS_H__"; \
83 echo "#define __ASM_OFFSETS_H__"; \
84 echo ""; \
85 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
86 echo ""; \
87 echo "#endif") <$< >$@
89 .PHONY: default debug install dist clean delete-unfresh-files TAGS
91 SUBDIRS = arch common drivers
92 TAGS:
93 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
94 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
95 -name '*.h' -print; \
96 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
97 MAP:
98 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map