mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 16:35:41 +01:00
Add a recipe for libmbedcrypto with a path prefix
This caused problems when running multiple jobs at once, since there was no target matching libmbedcrypto.so with the path prefix. It only worked if it was built first, since such file was found. Additionally, building of libmbedcrypto.so now waits for the static .a version. Previously, recipes for both libmbedcrypto.a and libmbedcrypto.so could run independently when running parallel jobs, which resulted in the .o files being built twice. It could sometimes be a problem, since linking would start when building one of the object files was still in progress (the previous one existed). This in turn resulted in reading (and trying to link) a malformed file. The "|" character is followed by "order-only-prerequisites", and in this case, makes linking of the shared version of the library wait for the .a file. Since it's guaranteed to be always built in the "all" target, it's fine to do that. All of the .o files are only built once thanks to this change.
This commit is contained in:
parent
bdcca14076
commit
8af3923815
@ -157,6 +157,11 @@ libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
|
||||
libmbedcrypto.%:
|
||||
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C ../crypto/library $@
|
||||
|
||||
libmbedcrypto.$(DLEXT): $(CRYPTO)libmbedcrypto.$(DLEXT)
|
||||
|
||||
$(CRYPTO)libmbedcrypto.$(DLEXT): | libmbedcrypto.a
|
||||
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C ../crypto/library libmbedcrypto.$(DLEXT)
|
||||
|
||||
.c.o:
|
||||
echo " CC $<"
|
||||
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $<
|
||||
|
Loading…
Reference in New Issue
Block a user