debuggers.hg

annotate tools/vtpm/Makefile @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 4e67ba3c321a
children
rev   line source
shand@6595 1 XEN_ROOT = ../..
shand@6595 2
shand@6595 3 # Base definitions and rules
shand@6595 4 include $(XEN_ROOT)/tools/vtpm/Rules.mk
shand@6595 5
shand@6595 6 # Dir name for emulator (as dom0 tpm driver)
kaf24@6992 7 TPM_EMULATOR_DIR = tpm_emulator
shand@6595 8 # Dir name for vtpm instance
shand@6595 9 VTPM_DIR = vtpm
kfraser@10753 10 ORIG_DIR = orig
shand@6595 11
shand@6595 12 # Emulator tarball name
keir@20153 13 TPM_EMULATOR_NAME = tpm_emulator-0.5.1
kfraser@10753 14 TPM_EMULATOR_TARFILE = $(TPM_EMULATOR_NAME).tar.gz
shand@6595 15
kaf24@8608 16 GMP_HEADER = /usr/include/gmp.h
kaf24@8608 17
kaf24@9645 18 .PHONY: all
shand@6595 19 all: build
shand@6595 20
kaf24@9645 21 .PHONY: build
keir@20153 22 build: build_sub
shand@6595 23
kaf24@9645 24 .PHONY: install
shand@6595 25 install: build
shand@6595 26 $(MAKE) -C $(VTPM_DIR) $@
shand@6595 27
kaf24@9645 28 .PHONY: clean
shand@6595 29 clean:
kaf24@8898 30 @if [ -d $(TPM_EMULATOR_DIR) ]; \
shand@6595 31 then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
shand@6595 32 fi
kaf24@8898 33 @if [ -d $(VTPM_DIR) ]; \
shand@6595 34 then $(MAKE) -C $(VTPM_DIR) clean; \
shand@6595 35 fi
kaf24@6992 36
kaf24@9645 37 .PHONY: mrproper
kaf24@6992 38 mrproper:
kfraser@10753 39 rm -f $(TPM_EMULATOR_TARFILE) tpm_emulator.patch.old vtpm.patch.old
kfraser@10753 40 rm -rf $(TPM_EMULATOR_DIR) $(VTPM_DIR) $(ORIG_DIR)
shand@6595 41
shand@6595 42 # Download Swiss emulator
shand@6595 43 $(TPM_EMULATOR_TARFILE):
shand@6595 44 wget http://download.berlios.de/tpm-emulator/$(TPM_EMULATOR_TARFILE)
shand@6595 45
keir@20153 46 # Create vtpm dirs
keir@20153 47 $(VTPM_DIR)/tpmd/tpmd: $(TPM_EMULATOR_TARFILE) vtpm-0.5.1.patch
kfraser@10753 48 rm -rf $(VTPM_DIR)
keir@16688 49 tar -xzf $(TPM_EMULATOR_TARFILE)
keir@16688 50 mv $(TPM_EMULATOR_NAME) $(VTPM_DIR)
kaf24@6992 51
keir@16688 52 set -e; cd $(VTPM_DIR); \
keir@20153 53 patch -p1 < ../vtpm-0.5.1.patch
kfraser@10753 54
kfraser@10753 55 orig: $(TPM_EMULATOR_TARFILE)
kfraser@10753 56 mkdir $(ORIG_DIR);
keir@16688 57 set -e; cd $(ORIG_DIR); \
kfraser@10753 58 tar -xzf ../$(TPM_EMULATOR_TARFILE);
kfraser@10753 59
kfraser@10753 60 updatepatches: clean orig
kfraser@10753 61 find $(VTPM_DIR) -name "*.orig" -print | xargs rm -f;
kfraser@10753 62 mv vtpm.patch vtpm.patch.old;
kfraser@10753 63 diff -uprN $(TPM_EMULATOR_DIR) $(VTPM_DIR) > vtpm.patch || true;
shand@6595 64
kaf24@9645 65 .PHONY: build_sub
keir@20153 66 build_sub: $(VTPM_DIR)/tpmd/tpmd
keir@16973 67 set -e; if [ -e $(GMP_HEADER) ]; then \
kaf24@8608 68 $(MAKE) -C $(VTPM_DIR); \
kaf24@8608 69 else \
keir@19064 70 echo "=== Unable to build VTPMs. libgmp could not be found."; \
kaf24@8608 71 fi
kaf24@8608 72