ia64/xen-unstable

view xen/Makefile @ 2828:62d5a53a46e2

bitkeeper revision 1.1159.1.338 (4187ca95yoh3y8SwBJw4uTmgIxLCTw)

A new install script to install from the intermediate 'install' subdir.
Also now a bit more careful in use of 'cp -a'. When installing to
system-wide directories we probably do not want to preserve ownership
of the random unprivileged user that originally built the binaries.
The user who does the install (probably root) is the correct person
to own the target files.
author kaf24@freefall.cl.cam.ac.uk
date Tue Nov 02 17:57:41 2004 +0000 (2004-11-02)
parents 3f929065a1d1
children 076976533990 3500fed096b1
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 = "-rc"
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
25 mkdir -p $(prefix)/usr/include/xen/io
26 install -m0644 include/public/*.h $(prefix)/usr/include/xen
27 install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io
28 install -m0644 include/public/COPYING $(prefix)/usr/include/xen
30 dist: $(TARGET)
31 $(MAKE) prefix=`pwd`/../install dist=yes install
33 clean: delete-links
34 $(MAKE) -C figlet clean
35 $(MAKE) -C common clean
36 $(MAKE) -C drivers clean
37 $(MAKE) -C arch/$(TARGET_ARCH) clean
38 rm -f *.o $(TARGET)* *~ core $(GENERATED_FILES)
40 $(TARGET): delete-unfresh-files make-links $(GENERATED_FILES)
41 $(MAKE) -C common
42 $(MAKE) -C drivers
43 $(MAKE) -C arch/$(TARGET_ARCH)
45 make-links: delete-links
46 ln -sf asm-$(TARGET_ARCH) include/asm
48 delete-links:
49 rm -f include/asm
51 # Blow away kernel.o because build info is stored statically within it.
52 delete-unfresh-files:
53 rm -f $(GENERATED_FILES) common/kernel.o
55 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
56 include/xen/compile.h:
57 @LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
58 @LANG=C echo >> $@
59 @LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
60 @LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
61 @LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
62 @LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
63 @LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
64 @LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> $@
65 @LANG=C echo >> $@
66 @LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
67 @LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
68 @LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
69 @LANG=C echo >> $@
70 @LANG=C echo \#define XEN_BANNER \\ >> $@
71 cd ./figlet && make && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../$@ && cd ..
72 @LANG=C echo >> $@
74 .PHONY: $(GENERATED_FILES) make-links delete-links default
75 .PHONY: debug install clean delete-unfresh-files TAGS
77 SUBDIRS = arch common drivers
78 TAGS:
79 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
80 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
81 -name '*.h' -print; \
82 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
83 MAP:
84 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map