@@ -299,16 +299,26 @@ else
299
299
300
300
endif
301
301
302
- $$(OPENSSL_SSL_LIB -$(target ) ) $$( OPENSSL_CRYPTO_LIB- $( target ) ) : $$(OPENSSL_DIR-$(target ) ) /Makefile
303
- @echo ">>> Build and install OpenSSL for $(target ) "
302
+ $$(OPENSSL_DIR -$(target ) ) /libssl.a : $$(OPENSSL_DIR-$(target ) ) /Makefile
303
+ @echo ">>> Build OpenSSL for $(target ) "
304
304
# Make and install just the software (not the docs)
305
305
cd $$(OPENSSL_DIR-$(target ) ) && \
306
306
CC="$$(CC-$(target ) ) " \
307
307
CROSS_TOP="$$(dir $$(SDK_ROOT-$(target ) ) ) .." \
308
308
CROSS_SDK="$$(notdir $$(SDK_ROOT-$(target ) ) ) " \
309
- make install_sw \
309
+ make depend _all \
310
310
2>&1 | tee ../openssl-$(target ) .build.log
311
311
312
+ $$(OPENSSL_SSL_LIB-$(target ) ) $$(OPENSSL_CRYPTO_LIB-$(target ) ) : $$(OPENSSL_DIR-$(target ) ) /libssl.a
313
+ @echo ">>> Install OpenSSL for $(target ) "
314
+ # Install just the software (not the docs)
315
+ cd $$(OPENSSL_DIR-$(target ) ) && \
316
+ CC="$$(CC-$(target ) ) " \
317
+ CROSS_TOP="$$(dir $$(SDK_ROOT-$(target ) ) ) .." \
318
+ CROSS_SDK="$$(notdir $$(SDK_ROOT-$(target ) ) ) " \
319
+ make install_sw \
320
+ 2>&1 | tee ../openssl-$(target ) .install.log
321
+
312
322
# ##########################################################################
313
323
# Target: BZip2
314
324
# ##########################################################################
@@ -586,6 +596,11 @@ OPENSSL_XCFRAMEWORK-$(os)=build/$(os)/Support/OpenSSL.xcframework
586
596
587
597
$$(OPENSSL_XCFRAMEWORK-$(os ) ) : $$(foreach sdk,$$(SDKS-$(os ) ) ,$$(OPENSSL_FATLIB-$$(sdk ) ) )
588
598
@echo ">>> Create OpenSSL.XCFramework on $(os ) "
599
+ # The OpenSSL Makefile leaves the build in a "dirty" state; running the same build
600
+ # twice in a row results in parts of the build being repeated, which then causes
601
+ # other targets in *this* Makefile to trigger. To avoid problems, delete the
602
+ # XCFramework every time and rebuild it.
603
+ rm -rf $$(OPENSSL_XCFRAMEWORK-$(os ) )
589
604
mkdir -p $$(OPENSSL_XCFRAMEWORK-$(os ) )
590
605
xcodebuild -create-xcframework \
591
606
-output $$@ $$(foreach sdk,$$(SDKS-$(os ) ) ,-library $$(OPENSSL_FATLIB-$$(sdk ) ) -headers build/$(os ) /openssl/$$(sdk ) /include)
0 commit comments