Using the fast simple build system with mbedtls

Mbedtls is a very impressive implementation of SSL/TLS that comes from ARM. You can read about it here:

https://github.com/ARMmbed/mbedtls

I am super impressed with the quality and simplicity of their SSL/TLS implementation.

Openssl by comparison is nightmarishly complicated.

What I really loved about this library was it only took an hour or so to port it over to use my simple makefile system.

On my Mac I can do make clean and make -j (parallel build) and under 1.6 seconds to recompile the entire library and example.

This is the 4 line makefile I wrote for it:

DIRS=\ mbedtls\ include ../make/makefile.core

This is the server code:

https://github.com/eliotmuirgrid/core/tree/main/mbedtls_server

If you are curious to try out mbedtls then make sure you have the right sandbox tools installed then you can just do:

git clone https://github.com/eliotmuirgrid/core.git cd core/mbedtls_server/ make

That builds the server. You can run the server as ./test.

Then for the client:

cd ../mbedtls_client/ make

I think this technique of building mbedtls compares quite favourably with the makefiles that came with the library which are more conventional in their approach: