Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4192 dpurdie 1
###############################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
#
4
# File:         PLATFORM/CSHARP2012.cfg
5
#
6
# Contents:     CSHARP 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 CSHARP2012_Build;
19
use JatsError;
20
 
21
#
22
#   Create a hash of GBE_MACHTYPEs for which the CSHARP platform is available
23
#   It won't just build on any old machine
24
#
25
my %valid_machines = (
26
    'win32'             => 1,
27
);
28
 
29
#-------------------------------------------------------------------------------
30
# Function        : new_platform
31
#
32
# Description     : Called when a new platform is being created
33
#                   The function can extend the build information
34
#
35
#                   At the moment it simply removes the build from unsuitable
36
#                   machine types.
37
#
38
# Inputs          : $pInfo          - Reference to the platform build info hash
39
#
40
# Returns         : Nothing yet
41
#
42
 
43
sub new_platform
44
{
45
    my $class = shift;              # Not really a class, but its called like a class
46
    my $pInfo = shift;
47
 
48
    #
49
    #   Ignore this platform if there is no way that it can be built on the
50
    #   current machine.
51
    #
52
    my $entry = $valid_machines{$::GBE_MACHTYPE};
53
    unless ( $entry )
54
    {
55
        Verbose ("CSHARP2012 will not build on this machine type: $::GBE_MACHTYPE");
56
        $pInfo->{NOT_AVAILABLE} = 1;
57
        return;
58
    }
59
}
60
 
61
#-------------------------------------------------------------------------------
62
# Function        : add_platform
63
#
64
# Description     : This function is invoked just before a 'platform' is about
65
#                   to be added to the build system.
66
#
67
#                   This call is allowed to alter or extend the platform build
68
#                   information.
69
#
70
# Inputs          : $pInfo          - Reference to the platform build info hash
71
#
72
# Returns         : Nothing yet
73
#
74
sub add_platform
75
{
76
    my $class = shift;              # Not really a class, but its called like a class
77
    my $pInfo = shift;
78
 
79
    #   ALSO_USES
80
    #   An array of other platforms that may be 'used' by this platform.
81
    #   The process is not recursive
82
    #   Similar to the --Uses option in BuildPlatforms()
83
    #   Will be subject to product expansion.
84
    #
85
    #   Intended use: CSHARP2012 can use stuff from CSHARP and WIN32, but only if the
86
    #                 CSHARP2012 stuff is not available.
87
    $pInfo->{ALSO_USES} = ['CSHARP2010', 'CSHARP2008', 'CSHARP2005', 'CSHARP', 'WIN32'];
88
 
89
    #
90
    #   EXT_SHARED
91
    #   Set to the value of the shared library extension
92
    #
93
    #   Intended Use
94
    #   Used to locate shared libraries in packgages for use in the
95
    #   generation set_<PLATFORM>.sh/.bat
96
    #
97
    #   If not set then the set_.sh files will no be created
98
    #
99
    $pInfo->{EXT_SHARED} = '.dll';
100
 
101
    #
102
    #   OS_COMMON
103
    #   Set the name of a directory to be used to package header files to be
104
    #   used on targets that share a common OS
105
    #
106
    #   Note: Should also be a part of EXTRA_USES
107
    #
108
    #   Intended Use
109
    #   Extend the operation of the PackageHdr directive to allow files
110
    #   common files to be packaged
111
    #
112
    $pInfo->{OS_COMMON} = 'WIN32';
113
}
114
 
115
1;
116