aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGilles Peskine <Gilles.Peskine@arm.com>2021-05-17 23:57:42 +0200
committerGilles Peskine <Gilles.Peskine@arm.com>2021-05-20 10:37:22 +0200
commitd05a588f19e9298794e08aecedc7cbe7bc52896e (patch)
tree88da0c2fab2b7237ac60e6a19063359b5821d734 /README.md
parent3bd51b0bb11e4e3ff0c3b8b8c97e9c30093e1de5 (diff)
downloadmbedtls-d05a588f19e9298794e08aecedc7cbe7bc52896e.zip
mbedtls-d05a588f19e9298794e08aecedc7cbe7bc52896e.tar.gz
mbedtls-d05a588f19e9298794e08aecedc7cbe7bc52896e.tar.bz2
Document how to build the generated source files
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 23 insertions, 2 deletions
diff --git a/README.md b/README.md
index ee6ad52..3f41a0d 100644
--- a/README.md
+++ b/README.md
@@ -51,8 +51,27 @@ You need the following tools to build the library with the provided makefiles:
* GNU Make or a build tool that CMake supports.
* A C99 toolchain (compiler, linker, archiver). We actively test with GCC 5.4, Clang 3.8, IAR8 and Visual Studio 2013. More recent versions should work. Slightly older versions may work.
-* Python 3 to generate the test code.
-* Perl to run the tests.
+* Python 3 to generate the test code, and to generate sample programs in the development branch.
+* Perl to run the tests, and to generate some source files in the development branch.
+
+### Generated source files in the development branch
+
+The source code of Mbed TLS includes some files that are automatically generated by scripts and whose content depends only on the Mbed TLS source, not on the platform or on the library configuration. These files are not included in the development branch of Mbed TLS, but the generated files are included in official releases. This section explains how to generate the missing files in the development branch.
+
+The following tools are required:
+
+* Perl, for some library source files and for Visual Studio build files.
+* Python 3, for some sample programs and test data.
+* A C compiler for the host platform, for some test data.
+
+If you are cross-compiling, you must set the `CC` environment variable to a C compiler for the host platform when generating the configuration-independent files.
+
+Any of the following methods are available to generate the configuration-independent files:
+
+* If not cross-compiling, running `make` with any target, or just `make`, will automatically generate required files.
+* Run `make generated_files` to generate all the configuration-independent files.
+* On Unix/POSIX systems, run `tests/scripts/check-generated-files.sh -u` to generate all the configuration-independent files.
+* On Windows, run `scripts\make_generated_files.bat` to generate all the configuration-independent files.
### Make
@@ -174,6 +193,8 @@ The build files for Microsoft Visual Studio are generated for Visual Studio 2010
The solution file `mbedTLS.sln` contains all the basic projects needed to build the library and all the programs. The files in tests are not generated and compiled, as these need Python and perl environments as well. However, the selftest program in `programs/test/` is still available.
+In the development branch of Mbed TLS, the Visual Studio solution files need to be generated first as described in [“Generated source files in the development branch”](#generated-source-files-in-the-development-branch).
+
Example programs
----------------