-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a makefile generator #86
base: main
Are you sure you want to change the base?
Introduce a makefile generator #86
Conversation
In out-of-tree builds, populate the build tree with a source backlink and with empty include directories allowing overriding headers (e.g. configuration file that's specific to a particular build tree). Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Compile .c files and create the static library with `make lib`. Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Parse `#include` lines. Look for headers in the source tree. Note that dependencies in the build tree are not supported yet. Signed-off-by: Gilles Peskine <[email protected]>
Add support for generated include files. Generate include/tf_psa_crypto/version.h from include/tf_psa_crypto/version.h.in and CMakeLists.txt. This is pretty ugly, because the current method for injecting that information relies heavily on CMake. Signed-off-by: Gilles Peskine <[email protected]>
07608bd
to
20ed7d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is not the right direction to go in; we already have a makefile generator system, in CMake.
If we want to support Make (which isn't a given, but maybe we can't avoid it), I would prefer to ship a very simple hand-written Makefile. We can be conservative about dependencies if that's a concern, i.e. rebuild everything if a .h
file changes, etc.
Yes, but it's not good at its job.
That might be ok for users, but it's no good for maintainers. Part of the reason I wrote |
I am not sure about what you mean by "First step towards #65."? |
Another thing that doesn't work with cmake (both in mbedtls and in tf-psa-crypto):
Running |
In CMake files we define the |
First step towards #85.
Introduce a Python script that generates a makefile.
The design is heavily based on
mbedtls-prepare-build
. Most of the code is copied from there, but I took the opportunity to clean it up.This is incomplete and not yet usable for daily work. I don't want to put further time into it until the design and current code is approved.
Current features:
lib
,clean
,help
, .include/tf_psa_crypto/version.h
. This part is very ugly because the template file's format relies heavily on CMake, and I think the best way format would be to change the way this template works. But that's a job for a follow-up.Features to be added in follow-ups:
*config.h
) in the build tree.CFLAGS
and such.libtestdriver1