ia64/xen-unstable

view xen/Makefile @ 3528:5580df9a800b

bitkeeper revision 1.1159.223.36 (41f644c9famqz8rwdr0g7NzC9KVv3g)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-2.0-testing.bk
author iap10@freefall.cl.cam.ac.uk
date Tue Jan 25 13:08:25 2005 +0000 (2005-01-25)
parents 5d73739fd212
children e90c7778ab94 f1210445f1f9 dee91b44a753
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)
12 DESTDIR := $(CURDIR)/../dist/install
14 include Rules.mk
16 default: $(TARGET).gz
17 $(TARGET).gz: $(TARGET)
18 gzip -f -9 < $< > $@.new
19 mv $@.new $@
21 debug:
22 objdump -D -S $(TARGET)-syms > $(TARGET).s
24 install: $(TARGET).gz
25 $(INSTALL_DIR) $(DESTDIR)/boot
26 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
27 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot
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 dist: install
35 clean:
36 $(MAKE) -C tools clean
37 $(MAKE) -C common clean
38 $(MAKE) -C drivers clean
39 $(MAKE) -C arch/$(TARGET_ARCH) clean
40 rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
41 rm -f include/asm-*/asm-offsets.h
42 rm -f tools/figlet/*.o tools/figlet/figlet
44 $(TARGET): delete-unfresh-files include/xen/compile.h
45 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
46 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
47 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
48 $(MAKE) -C common
49 $(MAKE) -C drivers
50 $(MAKE) -C arch/$(TARGET_ARCH)
52 # Blow away kernel.o because build info is stored statically within it.
53 delete-unfresh-files:
54 rm -f include/xen/banner.h include/xen/compile.h common/kernel.o
56 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
57 include/xen/compile.h: LANG=C
58 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
59 @sed -e 's/@@date@@/$(shell date)/g' \
60 -e 's/@@time@@/$(shell date +%T)/g' \
61 -e 's/@@whoami@@/$(shell whoami)/g' \
62 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
63 -e 's/@@hostname@@/$(shell hostname)/g' \
64 -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)/g' \
65 -e 's/@@version@@/$(XEN_VERSION)/g' \
66 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
67 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
68 -e 's!@@changeset@@!$(shell bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo information unavailable)!g' \
69 < include/xen/compile.h.in > $@.new
70 @cat include/xen/banner.h >> $@.new
71 @mv -f $@.new $@
73 tools/figlet/figlet: tools/figlet/figlet.o
74 $(CC) -o $@ $<
75 tools/figlet/figlet.o: tools/figlet/figlet.c
76 $(CC) -o $@ -c $<
78 include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
79 tools/figlet/figlet -d tools/figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new
80 @mv -f $@.new $@
82 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
83 @(set -e; \
84 echo "/*"; \
85 echo " * DO NOT MODIFY."; \
86 echo " *"; \
87 echo " * This file was auto-generated from $<"; \
88 echo " *"; \
89 echo " */"; \
90 echo ""; \
91 echo "#ifndef __ASM_OFFSETS_H__"; \
92 echo "#define __ASM_OFFSETS_H__"; \
93 echo ""; \
94 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
95 echo ""; \
96 echo "#endif") <$< >$@
98 .PHONY: default debug install dist clean delete-unfresh-files TAGS
100 SUBDIRS = arch common drivers
101 TAGS:
102 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
103 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
104 -name '*.h' -print; \
105 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
106 MAP:
107 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map