BuildingSdk.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <!-- HTML header for doxygen 1.8.10-->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  6. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  7. <meta name="generator" content="Doxygen 1.8.11"/>
  8. <title>Intel&reg; Enhanced Privacy ID SDK: Building from Source</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  21. <link href="epidstyle.css" rel="stylesheet" type="text/css"/>
  22. </head>
  23. <body>
  24. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  25. <div id="titlearea">
  26. <table cellspacing="0" cellpadding="0">
  27. <tbody>
  28. <tr style="height: 56px;">
  29. <td id="projectalign" style="padding-left: 0.5em;">
  30. <div id="projectname"><a
  31. onclick="storeLink('index.html')"
  32. id="projectlink"
  33. class="index.html"
  34. href="index.html">Intel&reg; Enhanced Privacy ID SDK</a>
  35. &#160;<span id="projectnumber">3.0.0</span>
  36. </div>
  37. </td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. <!-- end header part -->
  43. <!-- Generated by Doxygen 1.8.11 -->
  44. </div><!-- top -->
  45. <div id="side-nav" class="ui-resizable side-nav-resizable">
  46. <div id="nav-tree">
  47. <div id="nav-tree-contents">
  48. <div id="nav-sync" class="sync"></div>
  49. </div>
  50. </div>
  51. <div id="splitbar" style="-moz-user-select:none;"
  52. class="ui-resizable-handle">
  53. </div>
  54. </div>
  55. <script type="text/javascript">
  56. $(document).ready(function(){initNavTree('BuildingSdk.html','');});
  57. </script>
  58. <div id="doc-content">
  59. <div class="header">
  60. <div class="headertitle">
  61. <div class="title">Building from Source </div> </div>
  62. </div><!--header-->
  63. <div class="contents">
  64. <div class="toc"><h3>Table of Contents</h3>
  65. <ul><li class="level1"><a href="#BuildingSdk_Prerequisites">Prerequisites</a></li>
  66. <li class="level1"><a href="#BuildingSdk_Building_SCons">Building SDK with SCons</a></li>
  67. <li class="level1"><a href="#BuildingSdk_Building_Makefile">Alternate Makefile/Autoconf Based Build Approach</a></li>
  68. <li class="level1"><a href="#BuildingSdk_CommercialIpp">Improving Performance with Commercial IPP</a></li>
  69. <li class="level1"><a href="#BuildingSdk_Examples">Example Programs</a></li>
  70. <li class="level1"><a href="#BuildingSdk_PortingBuildSystem">Building with Other Build Systems</a></li>
  71. </ul>
  72. </div>
  73. <div class="textblock"><p>To use the SDK in a project, the code from the SDK must be included in that project. The easiest way to do this is to link to static libraries. The SDK comes with build scripts to build static libraries for common environments.</p>
  74. <h1><a class="anchor" id="BuildingSdk_Prerequisites"></a>
  75. Prerequisites</h1>
  76. <p>Building SDK code out of the box requires a number of tools. This section lists the tools used to build the SDK.</p>
  77. <p>For more information on how to install these tools, refer to <a class="el" href="BuildToolsInstallation.html">Guide to Installing Build Tools</a>.</p>
  78. <table class="doxtable">
  79. <tr>
  80. <th>Prerequisite </th><th>Notes </th></tr>
  81. <tr>
  82. <td>A C/C++ compiler </td><td>Core code in C. Unit tests need C++11 support. </td></tr>
  83. <tr>
  84. <td><a href="http://www.python.org">Python</a> </td><td>Validated with v2.7.10 </td></tr>
  85. <tr>
  86. <td><a href="http://www.scons.org">SCons</a> </td><td>Validated with v2.4.1 </td></tr>
  87. <tr>
  88. <td><a href="https://bitbucket.org/sconsparts/parts">Parts</a> </td><td>0.10.9.2 or later </td></tr>
  89. </table>
  90. <h1><a class="anchor" id="BuildingSdk_Building_SCons"></a>
  91. Building SDK with SCons</h1>
  92. <p>To use the SDK, you need to build it to generate libraries compatible with your build environment.</p>
  93. <p>To build based on the default SConstruct file in the root directory of the SDK, invoke scons with no arguments. </p><pre class="fragment">cd &lt;path/to/sdk-root&gt;
  94. scons
  95. </pre><p>By default, this performs a 64 bit release build.</p>
  96. <p>Potentially useful command line options:</p>
  97. <table class="doxtable">
  98. <tr>
  99. <th>Option </th><th>Action </th></tr>
  100. <tr>
  101. <td><code>--cfg=debug</code> </td><td>Build in debug mode </td></tr>
  102. <tr>
  103. <td><code>--cfg=release</code> </td><td>Build in release mode </td></tr>
  104. <tr>
  105. <td><code>--target=x86</code> </td><td>Target x86 </td></tr>
  106. <tr>
  107. <td><code>--target=x86_64</code> </td><td>Target x86_64 </td></tr>
  108. <tr>
  109. <td><code>--tc=cl</code> </td><td>Use MSVC to compile (Microsoft&reg;* C/C++ Optimizing Compiler) </td></tr>
  110. <tr>
  111. <td><code>--tc=gcc</code> </td><td>Use GCC to compile (GNU* Compiler Collection) </td></tr>
  112. <tr>
  113. <td><code>--tc=icl,mstools</code> </td><td>Use Intel&reg; C++ compiler </td></tr>
  114. <tr>
  115. <td><code>build::</code> </td><td>Build the SDK (does not build unit tests) </td></tr>
  116. <tr>
  117. <td><code>utest::</code> </td><td>Build unit tests </td></tr>
  118. <tr>
  119. <td><code>run_utest::</code> </td><td>Run unit tests (builds tests if needed) </td></tr>
  120. <tr>
  121. <td><code>-c</code> </td><td>Clean the build </td></tr>
  122. </table>
  123. <p>Built components appear in the <code>_install</code> directory of the SDK root.</p>
  124. <h1><a class="anchor" id="BuildingSdk_Building_Makefile"></a>
  125. Alternate Makefile/Autoconf Based Build Approach</h1>
  126. <p>You can build with the <code>make</code> command on platforms that support Make/Autoconf.</p>
  127. <p>In the root directory of the SDK, run: </p><pre class="fragment">./configure
  128. make all
  129. make check
  130. make install
  131. </pre><p><code>./configure</code> sets up the default settings:</p>
  132. <ul>
  133. <li>The default compilers are GCC/G++. You can specify compilers via the CC and CXX variables. For example, <code>./configure CC=/opt/intel/bin/icc CXX=/opt/intel/bin/icpc</code></li>
  134. <li>The default installation directory is <code>./_install</code>. You can specify the installation directory by using <code>./configure --prefix=/usr/local/epid_install</code></li>
  135. <li>To change OS bit version, use CFLAGS parameter <code>-m32</code> and <code>-m64</code>. For example, <code>./configure CFLAGS=-m32</code></li>
  136. </ul>
  137. <p><code>make check</code> is optional. It builds and runs the unit tests.</p>
  138. <p>Alternatively, you can use <code>make build</code> as a shortcut to replace <code>make all</code>, <code>make check</code>, and <code>make install</code>.</p>
  139. <p>To clean the build, run <code>make clean</code>.</p>
  140. <p>To remove the install directory, run <code>make uninstall</code>.</p>
  141. <h1><a class="anchor" id="BuildingSdk_CommercialIpp"></a>
  142. Improving Performance with Commercial IPP</h1>
  143. <p>For higher performance, you can use the commercial version of Cryptography for Intel&reg; Integrated Performance Primitives, available at <a href="https://software.intel.com/articles/download-ipp-cryptography-libraries">https://software.intel.com/articles/download-ipp-cryptography-libraries</a>.</p>
  144. <dl class="section note"><dt>Note</dt><dd>The SDK has been validated with v9.0.3 of the cryptography library.</dd></dl>
  145. <p>To build the SDK using a commercial Intel&reg; IPP installation, the <code>IPPROOT</code> environment variable must be properly configured to point to the IPP installation directory, as described in Setting Environment Variables* in the <a href="https://software.intel.com/sites/default/files/managed/a7/15/ipp_userguide_0.pdf">Intel&reg; IPP User's Guide</a> (PDF link).</p>
  146. <p>Once the environment is configured, you can build using commercial IPP by specifying <code>--use-commercial-ipp</code> as a command line option.</p>
  147. <h1><a class="anchor" id="BuildingSdk_Examples"></a>
  148. Example Programs</h1>
  149. <p>The SDK includes several examples that show you different aspects of how the Intel&reg; EPID scheme works. In the SDK build, these examples are located in <code>_install/epid-sdk/example</code>.</p>
  150. <table class="doxtable">
  151. <tr>
  152. <th>Name </th><th>Description </th></tr>
  153. <tr>
  154. <td><code>signmsg</code> </td><td>Create Intel&reg; EPID signature of message </td></tr>
  155. <tr>
  156. <td><code>verifysig</code> </td><td>Verify signature is from a group member in good standing </td></tr>
  157. </table>
  158. <h1><a class="anchor" id="BuildingSdk_PortingBuildSystem"></a>
  159. Building with Other Build Systems</h1>
  160. <p>It is relatively straightforward to port the SDK to your build system of choice. The following dependency diagram shows the relationship between components and the sources used to build them.</p>
  161. <div class="image">
  162. <img src="basicdoc.png" alt="basicdoc.png"/>
  163. </div>
  164. <p><br />
  165. </p>
  166. <p>Other names and brands may be claimed as the property of others. </p>
  167. </div></div><!-- contents -->
  168. </div><!-- doc-content -->
  169. <!-- HTML footer for doxygen 1.8.10-->
  170. <!-- start footer part -->
  171. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  172. <ul>
  173. <li class="footer">
  174. &copy; 2016 Intel Corporation
  175. </li>
  176. </ul>
  177. </div>
  178. </body>
  179. </html>