ia64/xen-unstable

view tools/vtpm/Makefile @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents b21261034a25
children 2d00d405ef9f
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)
44 tar -xzf $(TPM_EMULATOR_TARFILE);
45 mv tpm_emulator-0.2 $(TPM_EMULATOR_DIR);
47 -cd $(TPM_EMULATOR_DIR); \
48 patch -p1 < ../tpm_emulator-0.2b-x86_64.patch; \
49 patch -p1 <../tpm_emulator.patch
51 $(VTPM_DIR): $(TPM_EMULATOR_TARFILE)
52 tar -xzf $(TPM_EMULATOR_TARFILE);
53 mv tpm_emulator-0.2 $(VTPM_DIR);
55 -cd $(VTPM_DIR); \
56 patch -p1 < ../tpm_emulator-0.2b-x86_64.patch; \
57 patch -p1 <../vtpm.patch
59 build_sub:
60 if [ -e $(GMP_HEADER) ]; then \
61 $(MAKE) -C $(VTPM_DIR); \
62 if [ "$(BUILD_EMULATOR)" = "y" ]; then \
63 $(MAKE) -C $(TPM_EMULATOR_DIR); \
64 fi \
65 else \
66 echo "*** Unable to build VTPMs. libgmp could not be found."; \
67 fi