ia64/xen-unstable

view xen/Makefile @ 1593:5b1f0d05d6ca

bitkeeper revision 1.1022 (40df4b9bAB5PoSN_OL446dEED_t5_A)

Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@scramble.cl.cam.ac.uk
date Sun Jun 27 22:35:07 2004 +0000 (2004-06-27)
parents e87e1ca75a41
children cafda17c0350 cda0735bdc4c
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 = 1
5 export XEN_SUBVERSION = 3
6 export XEN_EXTRAVERSION = "-devel"
8 export BASEDIR := $(shell pwd)
10 include Rules.mk
12 GENERATED_FILES := include/xen/compile.h
14 default: $(TARGET)
15 gzip -f -9 < $(TARGET) > $(TARGET).gz
17 debug:
18 objdump -D -S $(TARGET)-syms > $(TARGET).s
20 install: $(TARGET)
21 gzip -f -9 < $(TARGET) > $(TARGET).gz
22 mkdir -p $(prefix)/boot
23 install -m0644 $(TARGET).gz $(prefix)/boot
24 install -m0644 $(TARGET)-syms $(prefix)/boot
26 dist: $(TARGET)
27 $(MAKE) prefix=`pwd`/../install dist=yes install
29 clean: delete-links
30 $(MAKE) -C tools clean
31 $(MAKE) -C common clean
32 $(MAKE) -C drivers clean
33 $(MAKE) -C arch/$(TARGET_ARCH) clean
34 rm -f *.o $(TARGET)* *~ core $(GENERATED_FILES)
36 $(TARGET): delete-unfresh-files make-links $(GENERATED_FILES)
37 $(MAKE) -C tools
38 $(MAKE) -C common
39 $(MAKE) -C drivers
40 $(MAKE) -C arch/$(TARGET_ARCH)
42 make-links: delete-links
43 ln -sf asm-$(TARGET_ARCH) include/asm
45 delete-links:
46 rm -f include/asm
48 # Blow away kernel.o because build info is stored statically within it.
49 delete-unfresh-files:
50 rm -f $(GENERATED_FILES) 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_BANNER \\ >> $@
68 cd tools/figlet && make && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../../$@ && cd ../..
69 @LANG=C echo >> $@
71 .PHONY: $(GENERATED_FILES) make-links delete-links default
72 .PHONY: debug install clean delete-unfresh-files
74 SUBDIRS = arch common drivers
75 TAGS:
76 etags `find include/asm-$(TARGET_ARCH) -name '*.h'`
77 find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs etags -a
78 find $(SUBDIRS) -name '*.[ch]' | xargs etags -a
79 MAP:
80 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map