ia64/xen-unstable

view xen/Makefile @ 3660:f9b3b23cf5ff

bitkeeper revision 1.1159.223.66 (42048ef5frMFQFFm-sKDC6PrU8yraQ)

Name: pic-lib.patch
Description: support PIC code generation
Libraries have 2 methods of being compiled; a .so must contain non-pic
objects, while the .a can contain standard objects.
Signed-off-by: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Feb 05 09:16:37 2005 +0000 (2005-02-05)
parents 1207ae53e15f
children e922aa58971a f4aa31a8f1c3
line source
1 # Default is to install to local 'dist' directory.
2 DISTDIR ?= ../dist
3 DESTDIR ?= $(DISTDIR)/install
5 INSTALL = install
6 INSTALL_DATA = $(INSTALL) -m0644
7 INSTALL_DIR = $(INSTALL) -d -m0755
9 # This is the correct place to edit the build version.
10 # All other places this is stored (eg. compile.h) should be autogenerated.
11 export XEN_VERSION = 2
12 export XEN_SUBVERSION = 0
13 export XEN_EXTRAVERSION = ""
15 export BASEDIR := $(CURDIR)
17 include Rules.mk
19 default: $(TARGET).gz
20 $(TARGET).gz: $(TARGET)
21 gzip -f -9 < $< > $@.new
22 mv $@.new $@
24 debug:
25 objdump -D -S $(TARGET)-syms > $(TARGET).s
27 dist:
28 $(MAKE) install
30 install: $(TARGET).gz
31 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
32 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
33 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot
34 [ -d $(DESTDIR)/usr/include/xen/io ] || \
35 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
36 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
37 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
38 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
40 clean:
41 $(MAKE) -C tools clean
42 $(MAKE) -C common clean
43 $(MAKE) -C drivers clean
44 $(MAKE) -C arch/$(TARGET_ARCH) clean
45 rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
46 rm -f include/asm-*/asm-offsets.h
47 rm -f tools/figlet/*.o tools/figlet/figlet
49 $(TARGET): delete-unfresh-files include/xen/compile.h
50 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
51 $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
52 $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
53 $(MAKE) -C common
54 $(MAKE) -C drivers
55 $(MAKE) -C arch/$(TARGET_ARCH)
57 delete-unfresh-files:
58 rm -f include/xen/banner.h include/xen/compile.h
59 $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files
61 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
62 include/xen/compile.h: LANG=C
63 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
64 @sed -e 's/@@date@@/$(shell date)/g' \
65 -e 's/@@time@@/$(shell date +%T)/g' \
66 -e 's/@@whoami@@/$(shell whoami)/g' \
67 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
68 -e 's/@@hostname@@/$(shell hostname)/g' \
69 -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)/g' \
70 -e 's/@@version@@/$(XEN_VERSION)/g' \
71 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
72 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
73 -e 's!@@changeset@@!$(shell bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo information unavailable)!g' \
74 < include/xen/compile.h.in > $@.new
75 @cat include/xen/banner.h >> $@.new
76 @mv -f $@.new $@
78 tools/figlet/figlet: tools/figlet/figlet.o
79 $(CC) -o $@ $<
80 tools/figlet/figlet.o: tools/figlet/figlet.c
81 $(CC) -o $@ -c $<
83 include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
84 tools/figlet/figlet -d tools/figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new
85 @mv -f $@.new $@
87 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
88 @(set -e; \
89 echo "/*"; \
90 echo " * DO NOT MODIFY."; \
91 echo " *"; \
92 echo " * This file was auto-generated from $<"; \
93 echo " *"; \
94 echo " */"; \
95 echo ""; \
96 echo "#ifndef __ASM_OFFSETS_H__"; \
97 echo "#define __ASM_OFFSETS_H__"; \
98 echo ""; \
99 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
100 echo ""; \
101 echo "#endif") <$< >$@
103 .PHONY: default debug install dist clean delete-unfresh-files TAGS
105 SUBDIRS = arch common drivers
106 TAGS:
107 ( find include/asm-$(TARGET_ARCH) -name '*.h'; \
108 find include -type d \( -name "asm-*" -o -name config \) -prune -o \
109 -name '*.h' -print; \
110 find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
111 MAP:
112 nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map