Configurations/10-main.conf: move hpux-shared flags to hpux-common.
[openssl.git] / Configurations / 15-ios.conf
1 #### iPhoneOS/iOS
2 #
3 # It takes recent enough XCode to use following two targets. It shouldn't
4 # be a problem by now, but if they don't work, original targets below
5 # that depend on manual definition of environment variables should still
6 # work...
7 #
8 my %targets = (
9     "ios-xcrun" => {
10         inherit_from     => [ "darwin-common", asm("armv4_asm") ],
11         # It should be possible to go below iOS 6 and even add -arch armv6,
12         # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
13         # at this point.
14         CC               => "xcrun -sdk iphoneos cc",
15         cflags           => add("-arch armv7 -mios-version-min=6.0.0 -fno-common"),
16         sys_id           => "iOS",
17         perlasm_scheme   => "ios32",
18         disable          => [ "engine" ],
19     },
20     "ios64-xcrun" => {
21         inherit_from     => [ "darwin-common", asm("aarch64_asm") ],
22         CC               => "xcrun -sdk iphoneos cc",
23         cflags           => add("-arch arm64 -mios-version-min=7.0.0 -fno-common"),
24         sys_id           => "iOS",
25         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
26         perlasm_scheme   => "ios64",
27         disable          => [ "engine" ],
28     },
29     "iossimulator-xcrun" => {
30         inherit_from     => [ "darwin-common" ],
31         CC               => "xcrun -sdk iphonesimulator cc",
32         sys_id           => "iOS",
33         disable          => [ "engine" ],
34     },
35 # It takes three prior-set environment variables to make it work:
36 #
37 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
38 # CROSS_TOP=/where/SDKs/are
39 # CROSS_SDK=iPhoneOSx.y.sdk
40 #
41 # Exact paths vary with Xcode releases, but for couple of last ones
42 # they would look like this:
43 #
44 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
45 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
46 # CROSS_SDK=iPhoneOS.sdk
47 #
48     "iphoneos-cross" => {
49         inherit_from     => [ "darwin-common" ],
50         cflags           => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
51         sys_id           => "iOS",
52         disable          => [ "engine" ],
53     },
54     "ios-cross" => {
55         inherit_from     => [ "ios-xcrun" ],
56         CC               => "cc",
57         cflags           => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
58     },
59     "ios64-cross" => {
60         inherit_from     => [ "ios64-xcrun" ],
61         CC               => "cc",
62         cflags           => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
63     },
64 );