Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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