ia64/xen-unstable

annotate xen/Makefile @ 10929:7cde0d938ef4

[IA64] convert more privop_stat to perfc

Convert most privop stats to perfc.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Fri Aug 04 09:02:43 2006 -0600 (2006-08-04)
parents 08415dfc5918
children 6160da08a238
rev   line source
kaf24@421 1 # This is the correct place to edit the build version.
kaf24@421 2 # All other places this is stored (eg. compile.h) should be autogenerated.
cl349@9965 3 export XEN_VERSION = 3
cl349@9965 4 export XEN_SUBVERSION = 0
cl349@9965 5 export XEN_EXTRAVERSION ?= -unstable
cl349@9965 6 export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
cl349@9965 7 -include xen-version
kaf24@421 8
kaf24@9595 9 export BASEDIR := $(CURDIR)
iap10@236 10
kaf24@9660 11 .PHONY: default
doogie@4109 12 default: build
iap10@370 13
kaf24@9700 14 .PHONY: dist
kaf24@9700 15 dist: install
kaf24@9595 16
kaf24@10540 17 .PHONY: build install clean distclean cscope TAGS tags
kaf24@10540 18 build install debug clean distclean cscope TAGS tags::
kfraser@10708 19 $(MAKE) -f Rules.mk _$@
iap10@4543 20
kaf24@9700 21 .PHONY: _build
kaf24@9700 22 _build: $(TARGET).gz
kaf24@9700 23
kaf24@9700 24 .PHONY: _install
kaf24@9700 25 _install: $(TARGET).gz
cl349@3561 26 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
vh249@6743 27 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
vh249@6743 28 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
vh249@6743 29 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
vh249@6743 30 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
vh249@6743 31 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
cl349@3561 32 [ -d $(DESTDIR)/usr/include/xen/io ] || \
cl349@3561 33 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
iap10@3499 34 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
iap10@3499 35 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
iap10@3499 36 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
iap10@236 37
kaf24@9841 38 .PHONY: _debug
kaf24@9841 39 _debug:
kaf24@9841 40 objdump -D -S $(TARGET)-syms > $(TARGET).s
kaf24@9841 41
kaf24@9700 42 .PHONY: _clean
kaf24@9700 43 _clean: delete-unfresh-files
iap10@3514 44 $(MAKE) -C tools clean
kaf24@9595 45 $(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
kaf24@9595 46 $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
kaf24@9595 47 $(MAKE) -f $(BASEDIR)/Rules.mk -C acm clean
kaf24@9595 48 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
kaf24@3903 49 rm -f include/asm *.o $(TARGET)* *~ core
kaf24@3041 50 rm -f include/asm-*/asm-offsets.h
kaf24@5581 51 rm -f include/xen/acm_policy.h
iap10@236 52
kaf24@10540 53 .PHONY: _distclean
kaf24@10540 54 _distclean: clean
kaf24@10540 55 rm -f tags TAGS cscope.files cscope.in.out cscope.out cscope.po.out
kaf24@10540 56
kaf24@9595 57 $(TARGET).gz: $(TARGET)
kaf24@9595 58 gzip -f -9 < $< > $@.new
kaf24@9595 59 mv $@.new $@
kaf24@9595 60
kaf24@4014 61 $(TARGET): delete-unfresh-files
kaf24@5840 62 $(MAKE) -C tools
kaf24@9595 63 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
kaf24@9595 64 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/acm_policy.h
kaf24@2840 65 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
kaf24@9595 66 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s
kaf24@9595 67 $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h
kaf24@9595 68 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)
iap10@236 69
kaf24@5581 70 # drivers/char/console.o contains static banner/compile info. Blow it away.
kaf24@5634 71 # Don't refresh these files during e.g., 'sudo make install'
kaf24@9660 72 .PHONY: delete-unfresh-files
kaf24@417 73 delete-unfresh-files:
kaf24@5634 74 @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
kfraser@10890 75 rm -f include/xen/compile.h; \
kaf24@5634 76 fi
kaf24@417 77
kaf24@5581 78 # acm_policy.h contains security policy for Xen
kaf24@5581 79 include/xen/acm_policy.h:
kaf24@5581 80 @(set -e; \
kaf24@5581 81 echo "/*"; \
kaf24@5581 82 echo " * DO NOT MODIFY."; \
kaf24@5581 83 echo " *"; \
kaf24@5581 84 echo " * This file was auto-generated by xen/Makefile $<"; \
kaf24@5581 85 echo " *"; \
kaf24@5581 86 echo " */"; \
kaf24@5581 87 echo ""; \
kaf24@7935 88 echo "#ifndef ACM_DEFAULT_SECURITY_POLICY"; \
kaf24@7935 89 echo "#define ACM_DEFAULT_SECURITY_POLICY $(ACM_DEFAULT_SECURITY_POLICY)"; \
kaf24@5581 90 echo "#endif") >$@
kaf24@5581 91
kaf24@421 92 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
iap10@3501 93 include/xen/compile.h: LANG=C
kfraser@10890 94 include/xen/compile.h: include/xen/compile.h.in
kaf24@3524 95 @sed -e 's/@@date@@/$(shell date)/g' \
iap10@3501 96 -e 's/@@time@@/$(shell date +%T)/g' \
iap10@3501 97 -e 's/@@whoami@@/$(shell whoami)/g' \
iap10@3501 98 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
iap10@3501 99 -e 's/@@hostname@@/$(shell hostname)/g' \
vhanquez@8864 100 -e 's|@@compiler@@|$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1 | sed -e "s;|;/;")|g' \
iap10@3501 101 -e 's/@@version@@/$(XEN_VERSION)/g' \
iap10@3501 102 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
iap10@3501 103 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
kaf24@7311 104 -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' \
iap10@3501 105 < include/xen/compile.h.in > $@.new
kfraser@10890 106 tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) >> $@.new
kaf24@3524 107 @mv -f $@.new $@
kaf24@417 108
kaf24@3041 109 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
kaf24@3041 110 @(set -e; \
kaf24@3041 111 echo "/*"; \
kaf24@3041 112 echo " * DO NOT MODIFY."; \
kaf24@3041 113 echo " *"; \
kaf24@3041 114 echo " * This file was auto-generated from $<"; \
kaf24@3041 115 echo " *"; \
kaf24@3041 116 echo " */"; \
kaf24@3041 117 echo ""; \
kaf24@3041 118 echo "#ifndef __ASM_OFFSETS_H__"; \
kaf24@3041 119 echo "#define __ASM_OFFSETS_H__"; \
kaf24@3041 120 echo ""; \
kaf24@3041 121 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
kaf24@3041 122 echo ""; \
kaf24@3041 123 echo "#endif") <$< >$@
kaf24@3041 124
smh22@5514 125 SUBDIRS = acm arch/$(TARGET_ARCH) common drivers
iap10@4543 126 define all_sources
iap10@4543 127 ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
iap10@4543 128 find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
iap10@4543 129 -name config \) -prune -o -name '*.h' -print; \
iap10@4543 130 find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
iap10@4543 131 endef
kaf24@9660 132
kaf24@9699 133 .PHONY: _TAGS
kaf24@9699 134 _TAGS:
kaf24@10536 135 rm -f TAGS && $(all_sources) | xargs etags -a
kaf24@9660 136
kaf24@9699 137 .PHONY: _tags
kaf24@9699 138 _tags:
kaf24@10536 139 rm -f TAGS && $(all_sources) | xargs ctags -a
kaf24@9660 140
kaf24@9699 141 .PHONY: _cscope
kaf24@9699 142 _cscope:
iap10@4543 143 $(all_sources) > cscope.files
iap10@4543 144 cscope -k -b -q
kaf24@9660 145
kaf24@9660 146 .PHONY: MAP
ach61@248 147 MAP:
kaf24@5847 148 $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
kfraser@10915 149
kfraser@10915 150 .PHONY: FORCE
kfraser@10915 151 FORCE:
kfraser@10915 152
kfraser@10915 153 %.o %.i: %.c FORCE
kfraser@10915 154 $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
kfraser@10915 155
kfraser@10915 156 %.o %.s: %.S FORCE
kfraser@10915 157 $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
kfraser@10915 158
kfraser@10915 159 %/: FORCE
kfraser@10915 160 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o