Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4814 dpurdie 1
###############################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
#
4
# File:         PLATFORM/MSWIN64.cfg
5
#
6
# Contents:     MSWIN64 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
 
15
use strict;
16
use warnings;
17
 
18
package MSWIN64_Build;
19
use JatsError;
20
use Storable qw(dclone);
21
 
22
#
23
#   Create a hash of GBE_MACHTYPEs for which the MSWIN64 platform is available
24
#   It won't just build on any old machine
25
#
26
#   Hash values are an array of:
27
#           Operating System
28
#           architecture
29
#
30
my %valid_machines = (
31
    'win32'     => [ 
32
                        'VS2012_X64',
33
                   ],
34
);
35
 
36
#-------------------------------------------------------------------------------
37
# Function        : new_platform
38
#
39
# Description     : Called when a new platform is being created
40
#                   The function can extend the build information
41
#
42
#                   The 'MSWIN64' platform will be converted into a 'suitable'
43
#                   platform for the current machine.
44
#
45
# Inputs          : $pInfo          - Reference to the platform build info hash
46
#
47
# Returns         : Nothing yet
48
#
49
 
50
sub new_platform
51
{
52
    my $class = shift;              # Not really a class, but its called like a class
53
    my $pInfo  = shift;
54
 
55
    #
56
    #   Ignore this platform if there is no way that it can be built on the
57
    #   current machine.
58
    #
59
    my $entry = $valid_machines{$::GBE_MACHTYPE};
60
    unless ( $entry )
61
    {
62
        Verbose ("MSWIN64 will not build on this machine type: $::GBE_MACHTYPE");
63
        $pInfo->{NOT_AVAILABLE} = 1;
64
        return;
65
    }
66
 
67
    #
68
    #   Instantiate all targets
69
    #
70
    foreach my $target ( @$entry )
71
    {
72
        MSWIN64_generic(  dclone($pInfo), $target );
73
    }
74
 
75
    #
76
    #   All done
77
    #   Mark the original entry as a TEMPLATE so that it won't be added
78
    #   We have added cloned copies of it
79
    #
80
    $pInfo->{TEMPLATE} = 1;
81
}
82
 
83
#-------------------------------------------------------------------------------
84
# Function        : MSWIN64_generic
85
#
86
# Description     : Take a clone of the buildinfo structure and specialise it
87
#                   for the required target
88
#
89
# Inputs          : $pInfo       - A clone of the buildinfo data
90
#                   $target      - Name of the target platform
91
#
92
# Returns         : Nothing
93
#                   The buildinfo MUST be added to the build system
94
#
95
sub MSWIN64_generic
96
{
97
    my ($pInfo, $target) = @_;
98
    Debug("MSWIN64_generic: $target");
99
 
100
    #
101
    #   Request that a simple BuildAlias be created for this platform
102
    #   Use the original name of the TARGET
103
    #
104
    $pInfo->{ALIAS} = $pInfo->{TARGET};
105
 
106
#    #
107
#    #   Specify the hardware family
108
#    #   Will be used to create an ALIAS
109
#    #
110
#    $pInfo->{HARDWARE} = uc($arch);
111
 
112
    #
113
    #   Alter the 'TARGET' name
114
    #   This is allowed (expected)
115
    #
116
    $pInfo->{TARGET} = uc($target);
117
 
118
    #
119
    #   Register this 'new' buildinfo entry with the build system
120
    #
121
 
122
    ::AddBuildPlatformEntry( $pInfo );
123
}
124
 
125
1;
126