ia64/xen-unstable

view xen/Makefile @ 10288:808430428622

Use DEFINE_SPINLOCK consistently throughout Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 01 21:49:25 2006 +0100 (2006-06-01)
parents c51c1e7ce0a3
children 60d7d64eaff2
line source
1 # This is the correct place to edit the build version.
2 # All other places this is stored (eg. compile.h) should be autogenerated.
3 export XEN_VERSION = 3
4 export XEN_SUBVERSION = 0
5 export XEN_EXTRAVERSION ?= -unstable
6 export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
7 -include xen-version
9 export BASEDIR := $(CURDIR)
11 .PHONY: default
12 default: build
14 .PHONY: dist
15 dist: install
17 .PHONY: build install clean cscope TAGS tags
18 build install debug clean cscope TAGS tags::
19 make -f Rules.mk _$@
21 .PHONY: _build
22 _build: $(TARGET).gz
24 .PHONY: _install
25 _install: $(TARGET).gz
26 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
27 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
28 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
29 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
30 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
31 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
32 [ -d $(DESTDIR)/usr/include/xen/io ] || \
33 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
34 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
35 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
36 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
38 .PHONY: _debug
39 _debug:
40 objdump -D -S $(TARGET)-syms > $(TARGET).s
42 .PHONY: _clean
43 _clean: delete-unfresh-files
44 $(MAKE) -C tools clean
45 $(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
46 $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
47 $(MAKE) -f $(BASEDIR)/Rules.mk -C acm clean
48 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
49 rm -f include/asm *.o $(TARGET)* *~ core
50 rm -f include/asm-*/asm-offsets.h
51 rm -f include/xen/acm_policy.h
53 $(TARGET).gz: $(TARGET)
54 gzip -f -9 < $< > $@.new
55 mv $@.new $@
57 $(TARGET): delete-unfresh-files
58 $(MAKE) -C tools
59 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
60 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/acm_policy.h
61 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
62 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s
63 $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h
64 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)
66 # drivers/char/console.o contains static banner/compile info. Blow it away.
67 # Don't refresh these files during e.g., 'sudo make install'
68 .PHONY: delete-unfresh-files
69 delete-unfresh-files:
70 @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
71 rm -f include/xen/{banner,compile}.h; \
72 fi
74 # acm_policy.h contains security policy for Xen
75 include/xen/acm_policy.h:
76 @(set -e; \
77 echo "/*"; \
78 echo " * DO NOT MODIFY."; \
79 echo " *"; \
80 echo " * This file was auto-generated by xen/Makefile $<"; \
81 echo " *"; \
82 echo " */"; \
83 echo ""; \
84 echo "#ifndef ACM_DEFAULT_SECURITY_POLICY"; \
85 echo "#define ACM_DEFAULT_SECURITY_POLICY $(ACM_DEFAULT_SECURITY_POLICY)"; \
86 echo "#endif") >$@
88 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
89 include/xen/compile.h: LANG=C
90 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
91 @sed -e 's/@@date@@/$(shell date)/g' \
92 -e 's/@@time@@/$(shell date +%T)/g' \
93 -e 's/@@whoami@@/$(shell whoami)/g' \
94 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
95 -e 's/@@hostname@@/$(shell hostname)/g' \
96 -e 's|@@compiler@@|$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1 | sed -e "s;|;/;")|g' \
97 -e 's/@@version@@/$(XEN_VERSION)/g' \
98 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
99 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
100 -e 's!@@changeset@@!$(shell ((hg parents || head -n 7 ../ChangeLog || echo date: unavailable) | awk '{FS="changeset:[ ]+"}/^changeset/{CS=$$2};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 2>/dev/null)!g' \
101 < include/xen/compile.h.in > $@.new
102 @cat include/xen/banner.h >> $@.new
103 @mv -f $@.new $@
105 include/xen/banner.h:
106 tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) > $@.new
107 @mv -f $@.new $@
109 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
110 @(set -e; \
111 echo "/*"; \
112 echo " * DO NOT MODIFY."; \
113 echo " *"; \
114 echo " * This file was auto-generated from $<"; \
115 echo " *"; \
116 echo " */"; \
117 echo ""; \
118 echo "#ifndef __ASM_OFFSETS_H__"; \
119 echo "#define __ASM_OFFSETS_H__"; \
120 echo ""; \
121 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
122 echo ""; \
123 echo "#endif") <$< >$@
125 SUBDIRS = acm arch/$(TARGET_ARCH) common drivers
126 define all_sources
127 ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
128 find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
129 -name config \) -prune -o -name '*.h' -print; \
130 find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
131 endef
133 .PHONY: _TAGS
134 _TAGS:
135 $(all_sources) | etags -
137 .PHONY: _tags
138 _tags:
139 $(all_sources) | xargs ctags
141 .PHONY: _cscope
142 _cscope:
143 $(all_sources) > cscope.files
144 cscope -k -b -q
146 .PHONY: MAP
147 MAP:
148 $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map