File tree Expand file tree Collapse file tree 2 files changed +35
-6
lines changed Expand file tree Collapse file tree 2 files changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ set(src_crypto
29
29
ecp_curves.c
30
30
entropy.c
31
31
entropy_poll.c
32
- error.c
33
32
gcm.c
34
33
havege.c
35
34
hkdf.c
@@ -65,10 +64,26 @@ set(src_crypto
65
64
sha512.c
66
65
threading.c
67
66
timing.c
67
+ xtea.c
68
+ )
69
+
70
+ # For files generated by the parent project (Mbed TLS) when building Mbed
71
+ # Crypto as a submodule, ensure that the parent project instance is used.
72
+ if (USE_CRYPTO_SUBMODULE )
73
+ set (src_crypto
74
+ ${src_crypto}
75
+ ${CMAKE_SOURCE_DIR} /library/version.c
76
+ ${CMAKE_SOURCE_DIR} /library/version_features.c
77
+ ${CMAKE_SOURCE_DIR} /library/error.c
78
+ )
79
+ else ()
80
+ set (src_crypto
81
+ ${src_crypto}
68
82
version .c
69
83
version_features.c
70
- xtea .c
84
+ error .c
71
85
)
86
+ endif ()
72
87
73
88
set (src_x509
74
89
certs.c
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ OBJS_CRYPTO= aes.o aesni.o arc4.o \
73
73
dhm.o ecdh.o ecdsa.o \
74
74
ecjpake.o ecp.o \
75
75
ecp_curves.o entropy.o entropy_poll.o \
76
- error.o gcm.o havege.o \
76
+ gcm.o havege.o \
77
77
hkdf.o \
78
78
hmac_drbg.o md.o md2.o \
79
79
md4.o md5.o md_wrap.o \
@@ -88,8 +88,22 @@ OBJS_CRYPTO= aes.o aesni.o arc4.o \
88
88
psa_its_file.o \
89
89
ripemd160.o rsa_internal.o rsa.o \
90
90
sha1.o sha256.o sha512.o \
91
- threading.o timing.o version.o \
92
- version_features.o xtea.o
91
+ threading.o timing.o \
92
+ xtea.o
93
+
94
+ # For files generated by the parent project (Mbed TLS) when building Mbed
95
+ # Crypto as a submodule, ensure that the parent project instance is used.
96
+ ifeq ($(USE_CRYPTO_SUBMODULE ) , 1)
97
+ OBJS_CRYPTO += ../../library/error.o
98
+ OBJS_CRYPTO += ../../library/version.o
99
+ OBJS_CRYPTO += ../../library/version_features.o
100
+ else
101
+ OBJS_CRYPTO += error.o
102
+ OBJS_CRYPTO += version.o
103
+ OBJS_CRYPTO += version_features.o
104
+ endif
105
+
106
+ $(info $(OBJS_CRYPTO))
93
107
94
108
OBJS_X509 = certs.o pkcs11.o x509.o \
95
109
x509_create.o x509_crl.o x509_crt.o \
@@ -198,7 +212,7 @@ libmbedcrypto.dll: $(OBJS_CRYPTO)
198
212
199
213
.c.o :
200
214
echo " CC $<"
201
- $(CC ) $(LOCAL_CFLAGS ) $(CFLAGS ) -c $<
215
+ $(CC ) $(LOCAL_CFLAGS ) $(CFLAGS ) -c $< -o $@
202
216
203
217
clean :
204
218
ifndef WINDOWS
You can’t perform that action at this time.
0 commit comments