Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4034 dpurdie 1
###############################################################################
6177 dpurdie 2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
4034 dpurdie 3
#
4
# File:         PLATFORM/ANDROIDNDK
5
#
6
# Contents:     ANDROIDNDK support
7
#
8
###############################################################################
9
#
10
 
11
use strict;
12
use warnings;
13
 
14
package ANDROIDNDK_Build;
15
use JatsError;
16
use Storable qw(dclone);
17
 
18
#-------------------------------------------------------------------------------
19
# Function        : new_platform
20
#
21
# Description     : Called when a new platform is being created
22
#                   The function can extend the build information
23
#
24
#                   The 'ANDROIDNDK' platform will be converted into a 'suitable'
25
#                   platform for the current machine.
26
#
27
# Inputs          : $pInfo          - Reference to the platform build info hash
28
#
29
# Returns         : Nothing yet
30
#
31
 
32
sub new_platform
33
{
34
    my $class = shift;              # Not really a class, but its called like a class
35
    my $pInfo  = shift;
36
 
37
    #
6133 dpurdie 38
    #   Get the list of targets that have been tagged as ANDROIDNDK
39
    #   
40
    my @targets = PlatformConfig::getTargetsByTag('ANDROIDNDK');
41
 
42
 
43
    #
4034 dpurdie 44
    #   Ignore this platform if there is no way that it can be built on the
45
    #   current machine.
46
    #
6133 dpurdie 47
    unless ( @targets )
4034 dpurdie 48
    {
49
        Verbose ("ANDROIDNDK will not build on this machine type: $::GBE_MACHTYPE");
50
        $pInfo->{NOT_AVAILABLE} = 1;
51
        return;
52
    }
53
 
54
    #
55
    #   Instantiate all targets
56
    #
6133 dpurdie 57
    foreach my $target ( @targets )
4034 dpurdie 58
    {
59
        ANDROIDNDK_generic(  dclone($pInfo), $target );
60
    }
61
 
62
    #
63
    #   All done
64
    #   Mark the original entry as a TEMPLATE so that it won't be added
65
    #   We have added cloned copies of it
66
    #
67
    $pInfo->{TEMPLATE} = 1;
68
}
69
 
70
#-------------------------------------------------------------------------------
71
# Function        : ANDROIDNDK_generic
72
#
73
# Description     : Take a clone of the buildinfo structure and specialise it
74
#                   for the required target
75
#
76
# Inputs          : $pInfo       - A clone of the buildinfo data
77
#                   $target      - Name of the target platform
78
#
79
# Returns         : Nothing
80
#                   The buildinfo MUST be added to the build system
81
#
82
sub ANDROIDNDK_generic
83
{
84
    my ($pInfo, $target) = @_;
85
    Debug("ANDROIDNDK_generic: $target");
86
 
87
    #
88
    #   Request that a simple BuildAlias be created for this platform
89
    #   Use the original name of the TARGET
90
    #
91
    $pInfo->{ALIAS} = $pInfo->{TARGET};
92
 
93
    #
94
    #   Alter the 'TARGET' name
95
    #   This is allowed (expected)
96
    #
97
    $pInfo->{TARGET} = uc($target);
98
 
99
    #
100
    #   Register this 'new' buildinfo entry with the build system
101
    #
102
    ::AddBuildPlatformEntry( $pInfo );
103
}
104
 
105
1;
106
 
107