Rev 4034 | Blame | Last modification | View Log | RSS feed
################################################################################ Copyright (c) VIX TECHNOLOGY (AUST) LTD## File: PLATFORM/ANDROIDNDK## Contents: ANDROIDNDK support#################################################################################use strict;use warnings;package ANDROIDNDK_Build;use JatsError;use Storable qw(dclone);## Create a hash of GBE_MACHTYPEs for which the ANDROIDNDK platform is available# It won't just build on any old machine## Hash values are an array of:# Operating System# architecture#my %valid_machines = ('linux_i386' => [ 'ANDROIDARM','ANDROIDMIPS','ANDROIDX86',],);#-------------------------------------------------------------------------------# Function : new_platform## Description : Called when a new platform is being created# The function can extend the build information## The 'ANDROIDNDK' platform will be converted into a 'suitable'# platform for the current machine.## Inputs : $pInfo - Reference to the platform build info hash## Returns : Nothing yet#sub new_platform{my $class = shift; # Not really a class, but its called like a classmy $pInfo = shift;## Ignore this platform if there is no way that it can be built on the# current machine.#my $entry = $valid_machines{$::GBE_MACHTYPE};unless ( $entry ){Verbose ("ANDROIDNDK will not build on this machine type: $::GBE_MACHTYPE");$pInfo->{NOT_AVAILABLE} = 1;return;}## Instantiate all targets#foreach my $target ( @$entry ){ANDROIDNDK_generic( dclone($pInfo), $target );}## All done# Mark the original entry as a TEMPLATE so that it won't be added# We have added cloned copies of it#$pInfo->{TEMPLATE} = 1;}#-------------------------------------------------------------------------------# Function : ANDROIDNDK_generic## Description : Take a clone of the buildinfo structure and specialise it# for the required target## Inputs : $pInfo - A clone of the buildinfo data# $target - Name of the target platform## Returns : Nothing# The buildinfo MUST be added to the build system#sub ANDROIDNDK_generic{my ($pInfo, $target) = @_;Debug("ANDROIDNDK_generic: $target");## Request that a simple BuildAlias be created for this platform# Use the original name of the TARGET#$pInfo->{ALIAS} = $pInfo->{TARGET};# ## # Specify the hardware family# # Will be used to create an ALIAS# ## $pInfo->{HARDWARE} = uc($arch);## Alter the 'TARGET' name# This is allowed (expected)#$pInfo->{TARGET} = uc($target);## Register this 'new' buildinfo entry with the build system#::AddBuildPlatformEntry( $pInfo );}1;