Restructure Python script to use argparse and main
Signed-off-by: Archana <archana.madhavan@silabs.com>
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 7b7fca4..d7407c3 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -164,8 +164,8 @@
COMMAND
${MBEDTLS_PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py
- ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.conf
- ${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers.c
+ --mbedtls-root ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.conf
diff --git a/library/Makefile b/library/Makefile
index eb8b78e..de747ac 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -323,8 +323,7 @@
psa_crypto_driver_wrappers.c: ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.conf
psa_crypto_driver_wrappers.c:
echo " Gen $@"
- $(PYTHON) ../scripts/generate_driver_wrappers.py \
- "../"
+ $(PYTHON) ../scripts/generate_driver_wrappers.py --mbedtls-root .. .
clean:
ifndef WINDOWS