Change the extension type of the file psa_crypto_driver_wrapper
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 865cacc..65b957a 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -174,14 +174,16 @@
add_custom_command(
OUTPUT
- ${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers.c
+ ${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers.h
+ ${CMAKE_CURRENT_BINARY_DIR}/psa_crypto_driver_wrappers_no_static.c
COMMAND
${MBEDTLS_PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_driver_wrappers.py
${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.c.jinja
+ ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.h.jinja
+ ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/driver_templates/psa_crypto_driver_wrappers_no_static.c.jinja
)
diff --git a/library/Makefile b/library/Makefile
index 3d5cdb8..1581638 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -208,7 +208,7 @@
all: shared static
endif
-psa_crypto.o:psa_crypto_driver_wrappers.c
+psa_crypto.o:psa_crypto_driver_wrappers.h
static: libmbedcrypto.a libmbedx509.a libmbedtls.a
cd ../tests && echo "This is a seedfile that contains 64 bytes (65 on Windows)......" > seedfile
@@ -318,7 +318,8 @@
GENERATED_FILES = \
error.c version_features.c \
ssl_debug_helpers_generated.c \
- psa_crypto_driver_wrappers.c
+ psa_crypto_driver_wrappers.h \
+ psa_crypto_driver_wrappers_no_static.c
generated_files: $(GENERATED_FILES)
# See root Makefile
@@ -355,10 +356,11 @@
$(PERL) ../scripts/generate_features.pl
GENERATED_WRAPPER_FILES = \
- psa_crypto_driver_wrappers.c \
+ psa_crypto_driver_wrappers.h \
psa_crypto_driver_wrappers_no_static.c
$(GENERATED_WRAPPER_FILES): ../scripts/generate_driver_wrappers.py
-$(GENERATED_WRAPPER_FILES): ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja
+$(GENERATED_WRAPPER_FILES): ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.h.jinja
+$(GENERATED_WRAPPER_FILES): ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers_no_static.c.jinja
$(GENERATED_WRAPPER_FILES):
echo " Gen $(GENERATED_WRAPPER_FILES)"
$(PYTHON) ../scripts/generate_driver_wrappers.py
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 4d3399d..9ad9c5c 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -33,8 +33,8 @@
#include "psa_crypto_cipher.h"
#include "psa_crypto_core.h"
#include "psa_crypto_invasive.h"
-#include "psa_crypto_driver_wrappers.c"
#include "psa_crypto_driver_wrappers.h"
+#include "psa_crypto_driver_wrappers_no_static.h"
#include "psa_crypto_ecp.h"
#include "psa_crypto_ffdh.h"
#include "psa_crypto_hash.h"
diff --git a/library/psa_crypto_driver_wrappers.h b/library/psa_crypto_driver_wrappers_no_static.h
similarity index 100%
rename from library/psa_crypto_driver_wrappers.h
rename to library/psa_crypto_driver_wrappers_no_static.h
diff --git a/library/psa_crypto_slot_management.c b/library/psa_crypto_slot_management.c
index ef285ac..92646c0 100644
--- a/library/psa_crypto_slot_management.c
+++ b/library/psa_crypto_slot_management.c
@@ -25,7 +25,7 @@
#include "psa/crypto.h"
#include "psa_crypto_core.h"
-#include "psa_crypto_driver_wrappers.h"
+#include "psa_crypto_driver_wrappers_no_static.h"
#include "psa_crypto_slot_management.h"
#include "psa_crypto_storage.h"
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)