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