ia64/xen-unstable

view xen/Makefile @ 3562:308203ddc173

bitkeeper revision 1.1159.223.48 (41f9204fFDaBv7jCdF63bwx5zXNlNA)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into arcadians.cl.cam.ac.uk:/local/scratch-2/cl349/xen-2.0-testing.bk
author cl349@arcadians.cl.cam.ac.uk
date Thu Jan 27 17:09:35 2005 +0000 (2005-01-27)
parents 5c6d547e4e59 0a8bc30a7c4b
children 2e60786262c4 1207ae53e15f
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 = 2
8 export XEN_SUBVERSION = 0
9 export XEN_EXTRAVERSION = ""
11 export BASEDIR := $(CURDIR)
13 include Rules.mk
15 default: $(TARGET).gz
16 $(TARGET).gz: $(TARGET)
17 gzip -f -9 < $< > $@.new
18 mv $@.new $@
20 debug:
21 objdump -D -S $(TARGET)-syms > $(TARGET).s
23 install: $(TARGET).gz
24 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
25 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
26 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot
27 [ -d $(DESTDIR)/usr/include/xen/io ] || \
28 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
29 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
30 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
31 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
33 clean:
34 $(MAKE) -C tools clean
35 $(MAKE) -C common clean
36 $(MAKE) -C drivers clean
37 $(MAKE) -C arch/$(TARGET_ARCH) clean
38 rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
39 rm -f include/asm-*/asm-offsets.h
40 rm -f tools/figlet/*.o tools/figlet/figlet
42 $(TARGET): delete-unfresh-files include/xen/compile.h
43 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
44 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
45 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
46 $(MAKE) -C common
47 $(MAKE) -C drivers
48 $(MAKE) -C arch/$(TARGET_ARCH)
50 delete-unfresh-files:
51 rm -f include/xen/banner.h include/xen/compile.h
52 $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files
54 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
55 include/xen/compile.h: LANG=C
56 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
57 @sed -e 's/@@date@@/$(shell date)/g' \
58 -e 's/@@time@@/$(shell date +%T)/g' \
59 -e 's/@@whoami@@/$(shell whoami)/g' \
60 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
61 -e 's/@@hostname@@/$(shell hostname)/g' \
62 -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)/g' \
63 -e 's/@@version@@/$(XEN_VERSION)/g' \
64 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
65 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
66 -e 's!@@changeset@@!$(shell bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo information unavailable)!g' \
67 < include/xen/compile.h.in > $@.new
68 @cat include/xen/banner.h >> $@.new
69 @mv -f $@.new $@
71 tools/figlet/figlet: tools/figlet/figlet.o
72 $(CC) -o $@ $<
73 tools/figlet/figlet.o: tools/figlet/figlet.c
74 $(CC) -o $@ -c $<
76 include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
77 tools/figlet/figlet -d tools/figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new
78 @mv -f $@.new $@
80 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
81 @(set -e; \
82 echo "/*"; \
83 echo " * DO NOT MODIFY."; \
84 echo " *"; \
85 echo " * This file was auto-generated from $<"; \
86 echo " *"; \
87 echo " */"; \
88 echo ""; \
89 echo "#ifndef __ASM_OFFSETS_H__"; \
90 echo "#define __ASM_OFFSETS_H__"; \
91 echo ""; \
92 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
93 echo ""; \
94 echo "#endif") <$< >$@
96 .PHONY: default debug install dist clean delete-unfresh-files TAGS
98 SUBDIRS = arch common drivers
99 TAGS:
100 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
101 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
102 -name '*.h' -print; \
103 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
104 MAP:
105 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map