#### Android...
#
# Heavily hacked 15-android.conf based on OpenSSL's config file of the same name.
# This 15-android.conf avoids compiler errors using NDK-r20. This 15-android.conf
# requires an environment set (sourced) using setenv-android.sh.

my %targets = (
    "android" => {
        inherit_from     => [ "linux-generic32" ],
        template         => 1,
        bin_cflags       => add("-fPIE"),
        bin_lflags       => add("-pie"),
        enable           => [ ],
    },

    "android-arm" => {
        inherit_from     => [ "android", asm("armv4_asm") ],
        bn_ops           => [ "BN_LLONG", "RC4_CHAR" ],
    },
    "android-arm64" => {
        inherit_from     => [ "android", asm("aarch64_asm") ],
        bn_ops           => [ "SIXTY_FOUR_BIT_LONG", "RC4_CHAR" ],
        perlasm_scheme   => "linux64",
    },

    "android-x86" => {
        inherit_from     => [ "android", asm("x86_asm") ],
        cflags           => add(picker(release => "-fomit-frame-pointer")),
        bn_ops           => [ "BN_LLONG", "RC4_INT" ],
        perlasm_scheme   => "android",
    },
    "android-x86_64" => {
        inherit_from     => [ "android", asm("x86_64_asm") ],
        bn_ops           => [ "SIXTY_FOUR_BIT_LONG", "RC4_INT" ],
        perlasm_scheme   => "elf",
    },
);
