ia64/xen-unstable

view tools/vtpm/Makefile @ 9231:9c2c55ba22e5

Trivial fix to bind implementation.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Sat Mar 11 11:19:11 2006 +0100 (2006-03-11)
parents 201d48272a57
children b454a09cddb1
line source
1 XEN_ROOT = ../..
3 # Base definitions and rules
4 include $(XEN_ROOT)/tools/vtpm/Rules.mk
6 # Dir name for emulator (as dom0 tpm driver)
7 TPM_EMULATOR_DIR = tpm_emulator
8 # Dir name for vtpm instance
9 VTPM_DIR = vtpm
11 # Emulator tarball name
12 TPM_EMULATOR_TARFILE = tpm_emulator-0.2b.tar.gz
14 GMP_HEADER = /usr/include/gmp.h
16 all: build
18 build: $(TPM_EMULATOR_DIR) $(VTPM_DIR) build_sub
20 install: build
21 $(MAKE) -C $(TPM_EMULATOR_DIR) $@
22 $(MAKE) -C $(VTPM_DIR) $@
24 clean:
25 @if [ -d $(TPM_EMULATOR_DIR) ]; \
26 then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
27 fi
28 @if [ -d $(VTPM_DIR) ]; \
29 then $(MAKE) -C $(VTPM_DIR) clean; \
30 fi
32 mrproper:
33 rm -f $(TPM_EMULATOR_TARFILE)
34 rm -rf $(TPM_EMULATOR_DIR)
35 rm -rf $(VTPM_DIR)
37 # Download Swiss emulator
38 $(TPM_EMULATOR_TARFILE):
39 wget http://download.berlios.de/tpm-emulator/$(TPM_EMULATOR_TARFILE)
41 # Create vtpm and TPM emulator dirs
42 # apply patches for 1) used as dom0 tpm driver 2) used as vtpm device instance
43 $(TPM_EMULATOR_DIR): $(TPM_EMULATOR_TARFILE) tpm_emulator.patch tpm_emulator-0.2b-x86_64.patch
44 tar -xzf $(TPM_EMULATOR_TARFILE);
45 rm -rf $(TPM_EMULATOR_DIR)
46 mv tpm_emulator-0.2 $(TPM_EMULATOR_DIR);
48 -cd $(TPM_EMULATOR_DIR); \
49 patch -p1 < ../tpm_emulator-0.2b-x86_64.patch; \
50 patch -p1 <../tpm_emulator.patch
52 $(VTPM_DIR): $(TPM_EMULATOR_TARFILE) tpm_emulator-0.2b-x86_64.patch vtpm.patch
53 tar -xzf $(TPM_EMULATOR_TARFILE);
54 rm -rf $(VTPM_DIR)
55 mv tpm_emulator-0.2 $(VTPM_DIR);
57 -cd $(VTPM_DIR); \
58 patch -p1 < ../tpm_emulator-0.2b-x86_64.patch; \
59 patch -p1 <../vtpm.patch
61 build_sub:
62 @if [ -e $(GMP_HEADER) ]; then \
63 $(MAKE) -C $(VTPM_DIR); \
64 if [ "$(BUILD_EMULATOR)" = "y" ]; then \
65 $(MAKE) -C $(TPM_EMULATOR_DIR); \
66 fi \
67 else \
68 echo "*** Unable to build VTPMs. libgmp could not be found."; \
69 fi