diff options
Diffstat (limited to 'recipes-extended/xen/tpm-emulator.inc')
-rw-r--r-- | recipes-extended/xen/tpm-emulator.inc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-extended/xen/tpm-emulator.inc b/recipes-extended/xen/tpm-emulator.inc new file mode 100644 index 00000000..f58a2763 --- /dev/null +++ b/recipes-extended/xen/tpm-emulator.inc | |||
@@ -0,0 +1,37 @@ | |||
1 | # Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | require stubdom.inc | ||
5 | |||
6 | DEPENDS += "\ | ||
7 | cmake-native \ | ||
8 | newlib \ | ||
9 | stubdom-gmp \ | ||
10 | " | ||
11 | |||
12 | # nothing to configure | ||
13 | do_configure[noexec] = "1" | ||
14 | |||
15 | export CMAKE_C_FLAGS = "\ | ||
16 | -std=c99 \ | ||
17 | -DTPM_NO_EXTERN \ | ||
18 | ${STUBDOM_CPPFLAGS} \ | ||
19 | ${STUBDOM_CFLAGS} \ | ||
20 | -Wno-declaration-after-statement \ | ||
21 | -Wno-implicit-fallthrough \ | ||
22 | " | ||
23 | |||
24 | do_compile() { | ||
25 | CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" cmake .. -DCMAKE_C_FLAGS:STRING="${CMAKE_C_FLAGS}" | ||
26 | ${MAKE} VERBOSE=1 tpm_crypto tpm | ||
27 | } | ||
28 | |||
29 | do_install() { | ||
30 | install -d ${D}/${libdir} | ||
31 | install -m 644 -t ${D}/${libdir} ${B}/crypto/libtpm_crypto.a | ||
32 | install -m 644 -t ${D}/${libdir} ${B}/tpm/libtpm.a | ||
33 | |||
34 | install -D -m 644 -t ${D}/${includedir}/tpm-emulator/build ${S}/build/config.h | ||
35 | install -D -m 644 -t ${D}/${includedir}/tpm-emulator/crypto ${S}/crypto/*.h | ||
36 | install -D -m 644 -t ${D}/${includedir}/tpm-emulator/tpm ${S}/tpm/*.h | ||
37 | } | ||