ia64/xen-unstable

view xen/Makefile @ 3039:576b4b91f80a

bitkeeper revision 1.1159.179.1 (419cbc1dn1mfBYorxJfIs3hxfOq3Sg)

Cset exclude: kaf24@freefall.cl.cam.ac.uk|ChangeSet|20041117134807|36506
author kaf24@scramble.cl.cam.ac.uk
date Thu Nov 18 15:13:33 2004 +0000 (2004-11-18)
parents d0006e7baa9a
children 3780630ce6bb 20087d779fb6
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
38 $(TARGET): delete-unfresh-files
39 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
40 $(MAKE) include/xen/compile.h
41 $(MAKE) -C common
42 $(MAKE) -C drivers
43 $(MAKE) -C arch/$(TARGET_ARCH)
45 # Blow away kernel.o because build info is stored statically within it.
46 delete-unfresh-files:
47 rm -f include/xen/compile.h common/kernel.o
49 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
50 include/xen/compile.h:
51 @LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
52 @LANG=C echo >> $@
53 @LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
54 @LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
55 @LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
56 @LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
57 @LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
58 @LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> $@
59 @LANG=C echo >> $@
60 @LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
61 @LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
62 @LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
63 @LANG=C echo >> $@
64 @LANG=C echo \#define XEN_CHANGESET \"`bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo "information unavailable"`\" >> $@
65 @LANG=C echo >> $@
66 @LANG=C echo \#define XEN_BANNER \\ >> $@
67 cd ./figlet && make && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../$@ && cd ..
68 @LANG=C echo >> $@
70 .PHONY: default debug install dist clean delete-unfresh-files TAGS
72 SUBDIRS = arch common drivers
73 TAGS:
74 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
75 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
76 -name '*.h' -print; \
77 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
78 MAP:
79 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map