Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 dpurdie 1
###############################################################################
2
# Copyright (c) ERG Transit Systems. 1996-2007
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
#   Create a hash of GBE_MACHTYPEs for which the WINCE platform is available
27
#   It won't just build on any only machine
28
#
29
#   Hash values are an array of all WinCE targets
30
#   Simplifies the process of building components for all WinCE target
31
#
32
my %valid_machines = (
33
 
34
    'win32'             => [ 'WCEIT3000',
35
                             'WCEPA961',
36
                             'WCEPA962',
37
                             'WCEPA962_500',
38
                             'WCEPCM7220',
39
#                             'WCEPSION_420',
40
                             'WCEPSION_500',
243 dpurdie 41
                             'WCEPSION_500_emu',
227 dpurdie 42
                             'WCEPSPC_arm',
43
                             'WCEPSPC_emu',
44
                             'WCEX86A420',
45
                             'WCEX86A500',
46
                             'WCEX86A500_SOM4455' ],
47
);
48
 
49
#-------------------------------------------------------------------------------
50
# Function        : new_platform
51
#
52
# Description     : Called when a new platform is being created
53
#                   The function can extend the build information
54
#
55
#                   The 'WINCE' platform will be converted into a 'suitable'
56
#                   platform for the current machine.
57
#
58
# Inputs          : $pInfo          - Reference to the platform build info hash
59
#
60
# Returns         : Nothing yet
61
#
62
 
63
sub new_platform
64
{
65
    my $class = shift;              # Not really a class, but its called like a class
66
    my $pInfo  = shift;
67
 
68
    #
69
    #   Ignore this platform if there is no way that it can be built on the
70
    #   current machine.
71
    #
72
    my $entry = $valid_machines{$::GBE_MACHTYPE};
73
    unless ( $entry )
74
    {
75
        Verbose ("WINCE will not build on this machine type: $::GBE_MACHTYPE");
76
        $pInfo->{NOT_AVAILABLE} = 1;
77
        return;
78
    }
79
 
80
    #
81
    #   Instantiate all targets
82
    #
83
    foreach my $target ( @$entry )
84
    {
85
        WINCE_generic(  dclone($pInfo), $target );
86
    }
87
 
88
    #
89
    #   All done
90
    #   Mark the original entry as a TEMPLATE so that it won't be added
91
    #   We have added cloned copies of it
92
    #
93
    $pInfo->{TEMPLATE} = 1;
94
}
95
 
96
#-------------------------------------------------------------------------------
97
# Function        : WINCE_generic
98
#
99
# Description     : Take a clone of the buildinfo structure and specialise it
100
#                   for the required target
101
#
102
# Inputs          : $pInfo       - A clone of the buildinfo data
103
#                   $target      - Name of the target platform
104
#
105
# Returns         : Nothing
106
#                   The buildinfo MUST be added to the build system
107
#
108
sub WINCE_generic
109
{
110
    my ($pInfo, $target) = @_;
111
    Debug("WINCE_generic: $target");
112
 
113
    #
114
    #   Request that a simple BuildAlias be created for this platform
115
    #   Use the original name of the TARGET
116
    #
117
    $pInfo->{ALIAS} = $pInfo->{TARGET};
118
 
119
#    #
120
#    #   Specify the hardware family
121
#    #   Will be used to create an ALIAS
122
#    #
123
#    $pInfo->{HARDWARE} = uc($arch);
124
 
125
    #
126
    #   Alter the 'TARGET' name
127
    #   This is allowed (expected)
128
    #
129
    $pInfo->{TARGET} = $target;
130
 
131
    #
132
    #   Register this 'new' buildinfo entry with the build system
133
    #
134
    ::AddBuildPlatformEntry( $pInfo );
135
}
136
 
137
1;
138