Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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