ia64/xen-unstable

view tools/vtpm/Makefile @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
parents 3233e7ecfa9f
children c0796e18b6a4 f8e7af29daa1
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-0.2
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 all: build
16 build: $(TPM_EMULATOR_TARFILE) extract patch build_sub
18 install: build
19 $(MAKE) -C $(TPM_EMULATOR_DIR) $@
20 $(MAKE) -C $(VTPM_DIR) $@
22 clean:
23 if [ -d $(TPM_EMULATOR_DIR) ]; \
24 then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
25 fi
26 if [ -d $(VTPM_DIR) ]; \
27 then $(MAKE) -C $(VTPM_DIR) clean; \
28 fi
29 rm -rf $(TPM_EMULATOR_DIR)
30 rm -rf $(VTPM_DIR)
32 mrproper: clean
33 rm -f $(TPM_EMULATOR_TARFILE)
35 # Download Swiss emulator
36 $(TPM_EMULATOR_TARFILE):
37 wget http://download.berlios.de/tpm-emulator/$(TPM_EMULATOR_TARFILE)
39 # Create vtpm and TPM emulator dirs
40 extract: $(TPM_EMULATOR_DIR)/README $(VTPM_DIR)/README
42 $(TPM_EMULATOR_DIR)/README:
43 -rm -rf $(TPM_EMULATOR_DIR)
44 tar -xzf $(TPM_EMULATOR_TARFILE)
46 $(VTPM_DIR)/README:
47 -rm -rf $(VTPM_DIR)
48 cp -r --preserve $(TPM_EMULATOR_DIR) $(VTPM_DIR)
50 # apply patches for 1) used as dom0 tpm driver 2) used as vtpm device instance
51 patch: $(TPM_EMULATOR_DIR)/Makefile $(VTPM_DIR)/Makefile
53 $(TPM_EMULATOR_DIR)/Makefile: tpm_emulator.patch
54 -cd $(TPM_EMULATOR_DIR); \
55 patch -p1 <../tpm_emulator.patch
57 $(VTPM_DIR)/Makefile: vtpm.patch
58 -cd $(VTPM_DIR); \
59 patch -p1 <../vtpm.patch
61 build_sub:
62 $(MAKE) -C $(TPM_EMULATOR_DIR)
63 $(MAKE) -C $(VTPM_DIR)