Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bb7726

Browse files
committed
Add explicit list of supported platforms and architectures to project build settings for compatibility with XCode 4
1 parent 05bd0e5 commit 4bb7726

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

openssl.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
);
8181
runOnlyForDeploymentPostprocessing = 0;
8282
shellPath = /bin/sh;
83-
shellScript = "## Determine the appropriate openssl source path to use\n## Introduced by michaeltyson, adapted to account for OPENSSL_SRC build path\n\n# locate src archive file if present\nSRC_ARCHIVE=`ls openssl*tar.gz 2>/dev/null`\n\n# if there is an openssl directory immediately under the openssl.xcode source \n# folder then build there\nif [ -d \"$SRCROOT/openssl\" ]; then\n\tOPENSSL_SRC=\"$SRCROOT/openssl\"\n# else, if there is a openssl.tar.gz in the directory, expand it to openssl\n# and use it\nelif [ -f \"$SRC_ARCHIVE\" ]; then\n\tOPENSSL_SRC=\"$PROJECT_TEMP_DIR/openssl\"\n\tif [ ! -d \"$OPENSSL_SRC\" ]; then\n\t\techo \"extracting $SRC_ARCHIVE...\"\n\t\tmkdir \"$OPENSSL_SRC\"\n\t\ttar -C \"$OPENSSL_SRC\" --strip-components=1 -zxf \"$SRC_ARCHIVE\" || exit 1\n\t\tcp -RL \"$OPENSSL_SRC/include\" \"$CONFIGURATION_BUILD_DIR\"\n\tfi\n# else, if $OPENSSL_SRC is not already defined (i.e. by prerequisites for SQLCipher XCode config)\n# then assume openssl is in the current directory\nelif [ ! -d \"$OPENSSL_SRC\" ]; then\n\tOPENSSL_SRC=\"$SRCROOT\"\nfi\n\necho \"***** using $OPENSSL_SRC for openssl source code *****\"\n\n# check whether libcrypto.a already exists - we'll only build if it does not\nif [ -f \"$CONFIGURATION_BUILD_DIR/libcrypto.a\" ]; then\n\techo \"***** Using previously-built libary $CONFIGURATION_BUILD_DIR/libcrypto.a - skipping build *****\"\n\techo \"***** To force a rebuild clean project and clean dependencies *****\"\n\texit 0;\nelse\n\techo \"***** No previously-built libary present at $CONFIGURATION_BUILD_DIR/libcrypto.a - performing build *****\"\nfi\n\n# figure out the right set of build architectures for this run\nif [ \"$ARCHS_STANDARD_32_64_BIT\" != \"\" ]; then\n\tBUILDARCHS=\"$ARCHS_STANDARD_32_64_BIT\"\nelif [ \"$ARCHS_STANDARD_32_BIT\" != \"\" ]; then\n\tBUILDARCHS=\"$ARCHS_STANDARD_32_BIT\"\nelse\n\tBUILDARCHS=\"$ARCHS\"\nfi\n\necho \"***** creating universal binary for architectures: $BUILDARCHS *****\"\n\nif [ \"$SDKROOT\" != \"\" ]; then\n\tISYSROOT=\"-isysroot $SDKROOT\"\nfi\n\necho \"***** using ISYSROOT $ISYSROOT *****\"\n\nOPENSSL_OPTIONS=\"no-krb5 no-gost\"\n\necho \"***** using OPENSSL_OPTIONS $OPENSSL_OPTIONS *****\"\n\ncd \"$OPENSSL_SRC\"\n\nfor BUILDARCH in $BUILDARCHS\ndo\n\techo \"***** BUILDING UNIVERSAL ARCH $BUILDARCH ******\"\n\tmake clean\n\t\n\t# if build architecture is i386 AND we are not building in Debug mode, use the assembler enhancements\n\t# otherwise, disable assembler\n\tif [ \"$BUILDARCH\" = \"i386\" -a \"$BUILD_STYLE\" != \"Debug\" ]; then\n\t\techo \"***** configuring WITH assembler optimizations based on architecture $BUILDARCH and build style $BUILD_STYLE *****\"\n\t\t./config $OPENSSL_OPTIONS -openssldir=\"$BUILD_DIR\"\n\t\tASM_DEF=\"-DOPENSSL_BN_ASM_PART_WORDS\"\n else\n\t\techo \"***** configuring WITHOUT assembler optimizations based on architecture $BUILDARCH and build style $BUILD_STYLE *****\"\n\t\t./config no-asm $OPENSSL_OPTIONS -openssldir=\"$BUILD_DIR\"\n\t\tASM_DEF=\"-UOPENSSL_BN_ASM_PART_WORDS\"\n\tfi\n\n\tmake CC=$PLATFORM_DEVELOPER_BIN_DIR/gcc-4.2 CFLAG=\"-D_DARWIN_C_SOURCE $ASM_DEF -arch $BUILDARCH $ISYSROOT\" SHARED_LDFLAGS=\"-arch $BUILDARCH -dynamiclib\"\n\n\techo \"***** copying intermediate libraries to $CONFIGURATION_TEMP_DIR/$BUILDARCH-*.a *****\"\n\tcp libcrypto.a \"$CONFIGURATION_TEMP_DIR\"/$BUILDARCH-libcrypto.a\n\tcp libssl.a \"$CONFIGURATION_TEMP_DIR\"/$BUILDARCH-libssl.a\ndone\n\necho \"***** creating universallibraries in $CONFIGURATION_BUILD_DIR *****\"\nlipo -create \"$CONFIGURATION_TEMP_DIR\"/*-libcrypto.a -output \"$CONFIGURATION_BUILD_DIR/libcrypto.a\"\nlipo -create \"$CONFIGURATION_TEMP_DIR\"/*-libssl.a -output \"$CONFIGURATION_BUILD_DIR/libssl.a\"\n\necho \"***** removing temporary files from $CONFIGURATION_TEMP_DIR *****\"\nrm -f \"$CONFIGURATION_TEMP_DIR\"/*-libcrypto.a\nrm -f \"$CONFIGURATION_TEMP_DIR\"/*-libssl.a\n\necho \"***** executing ranlib on libraries in $CONFIGURATION_BUILD_DIR *****\"\nranlib \"$CONFIGURATION_BUILD_DIR/libcrypto.a\"\nranlib \"$CONFIGURATION_BUILD_DIR/libssl.a\"\n\n";
83+
shellScript = "set\n## Determine the appropriate openssl source path to use\n## Introduced by michaeltyson, adapted to account for OPENSSL_SRC build path\n\n# locate src archive file if present\nSRC_ARCHIVE=`ls openssl*tar.gz 2>/dev/null`\n\n# if there is an openssl directory immediately under the openssl.xcode source \n# folder then build there\nif [ -d \"$SRCROOT/openssl\" ]; then\n\tOPENSSL_SRC=\"$SRCROOT/openssl\"\n# else, if there is a openssl.tar.gz in the directory, expand it to openssl\n# and use it\nelif [ -f \"$SRC_ARCHIVE\" ]; then\n\tOPENSSL_SRC=\"$PROJECT_TEMP_DIR/openssl\"\n\tif [ ! -d \"$OPENSSL_SRC\" ]; then\n\t\techo \"extracting $SRC_ARCHIVE...\"\n\t\tmkdir \"$OPENSSL_SRC\"\n\t\ttar -C \"$OPENSSL_SRC\" --strip-components=1 -zxf \"$SRC_ARCHIVE\" || exit 1\n\t\tcp -RL \"$OPENSSL_SRC/include\" \"$CONFIGURATION_BUILD_DIR\"\n\tfi\n# else, if $OPENSSL_SRC is not already defined (i.e. by prerequisites for SQLCipher XCode config)\n# then assume openssl is in the current directory\nelif [ ! -d \"$OPENSSL_SRC\" ]; then\n\tOPENSSL_SRC=\"$SRCROOT\"\nfi\n\necho \"***** using $OPENSSL_SRC for openssl source code *****\"\n\n# check whether libcrypto.a already exists - we'll only build if it does not\nif [ -f \"$CONFIGURATION_BUILD_DIR/libcrypto.a\" ]; then\n\techo \"***** Using previously-built libary $CONFIGURATION_BUILD_DIR/libcrypto.a - skipping build *****\"\n\techo \"***** To force a rebuild clean project and clean dependencies *****\"\n\texit 0;\nelse\n\techo \"***** No previously-built libary present at $CONFIGURATION_BUILD_DIR/libcrypto.a - performing build *****\"\nfi\n\n# figure out the right set of build architectures for this run\nif [ \"$ARCHS_STANDARD_32_64_BIT\" != \"\" ]; then\n\tBUILDARCHS=\"$ARCHS_STANDARD_32_64_BIT\"\nelif [ \"$ARCHS_STANDARD_32_BIT\" != \"\" ]; then\n\tBUILDARCHS=\"$ARCHS_STANDARD_32_BIT\"\nelse\n\tBUILDARCHS=\"$ARCHS\"\nfi\n\necho \"***** creating universal binary for architectures: $BUILDARCHS *****\"\n\nif [ \"$SDKROOT\" != \"\" ]; then\n\tISYSROOT=\"-isysroot $SDKROOT\"\nfi\n\necho \"***** using ISYSROOT $ISYSROOT *****\"\n\nOPENSSL_OPTIONS=\"no-krb5 no-gost\"\n\necho \"***** using OPENSSL_OPTIONS $OPENSSL_OPTIONS *****\"\n\ncd \"$OPENSSL_SRC\"\n\nfor BUILDARCH in $BUILDARCHS\ndo\n\techo \"***** BUILDING UNIVERSAL ARCH $BUILDARCH ******\"\n\tmake clean\n\t\n\t# if build architecture is i386 AND we are not building in Debug mode, use the assembler enhancements\n\t# otherwise, disable assembler\n\tif [ \"$BUILDARCH\" = \"i386\" -a \"$BUILD_STYLE\" != \"Debug\" ]; then\n\t\techo \"***** configuring WITH assembler optimizations based on architecture $BUILDARCH and build style $BUILD_STYLE *****\"\n\t\t./config $OPENSSL_OPTIONS -openssldir=\"$BUILD_DIR\"\n\t\tASM_DEF=\"-DOPENSSL_BN_ASM_PART_WORDS\"\n else\n\t\techo \"***** configuring WITHOUT assembler optimizations based on architecture $BUILDARCH and build style $BUILD_STYLE *****\"\n\t\t./config no-asm $OPENSSL_OPTIONS -openssldir=\"$BUILD_DIR\"\n\t\tASM_DEF=\"-UOPENSSL_BN_ASM_PART_WORDS\"\n\tfi\n\n\tmake CC=$PLATFORM_DEVELOPER_BIN_DIR/gcc-4.2 CFLAG=\"-D_DARWIN_C_SOURCE $ASM_DEF -arch $BUILDARCH $ISYSROOT\" SHARED_LDFLAGS=\"-arch $BUILDARCH -dynamiclib\"\n\n\techo \"***** copying intermediate libraries to $CONFIGURATION_TEMP_DIR/$BUILDARCH-*.a *****\"\n\tcp libcrypto.a \"$CONFIGURATION_TEMP_DIR\"/$BUILDARCH-libcrypto.a\n\tcp libssl.a \"$CONFIGURATION_TEMP_DIR\"/$BUILDARCH-libssl.a\ndone\n\necho \"***** creating universallibraries in $CONFIGURATION_BUILD_DIR *****\"\nlipo -create \"$CONFIGURATION_TEMP_DIR\"/*-libcrypto.a -output \"$CONFIGURATION_BUILD_DIR/libcrypto.a\"\nlipo -create \"$CONFIGURATION_TEMP_DIR\"/*-libssl.a -output \"$CONFIGURATION_BUILD_DIR/libssl.a\"\n\necho \"***** removing temporary files from $CONFIGURATION_TEMP_DIR *****\"\nrm -f \"$CONFIGURATION_TEMP_DIR\"/*-libcrypto.a\nrm -f \"$CONFIGURATION_TEMP_DIR\"/*-libssl.a\n\necho \"***** executing ranlib on libraries in $CONFIGURATION_BUILD_DIR *****\"\nranlib \"$CONFIGURATION_BUILD_DIR/libcrypto.a\"\nranlib \"$CONFIGURATION_BUILD_DIR/libssl.a\"\n\n";
8484
};
8585
/* End PBXShellScriptBuildPhase section */
8686

@@ -111,6 +111,8 @@
111111
INSTALL_PATH = /usr/local/lib;
112112
PREBINDING = NO;
113113
PRODUCT_NAME = crypto;
114+
SUPPORTED_PLATFORMS = "iphonesimulator macosx iphoneos";
115+
VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64 armv6 armv7";
114116
};
115117
name = Debug;
116118
};
@@ -125,6 +127,8 @@
125127
INSTALL_PATH = /usr/local/lib;
126128
PREBINDING = NO;
127129
PRODUCT_NAME = crypto;
130+
SUPPORTED_PLATFORMS = "iphonesimulator macosx iphoneos";
131+
VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64 armv6 armv7";
128132
ZERO_LINK = NO;
129133
};
130134
name = Release;

0 commit comments

Comments
 (0)