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-2006
3
#
4
# File:         PLATFORM/LINUX.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      01-Aug-06  Created
16
###############################################################################
17
 
18
use strict;
19
use warnings;
20
 
21
package LINUX_Build;
22
use JatsError;
23
 
24
#
25
#   Create a hash of GBE_MACHTYPEs for which the LINUX platform is available
26
#   It won't just build on any only machine
27
#
28
#   Hash values are an array of:
29
#           Operating System
30
#           architecture
31
#
32
my %valid_machines = (
4164 dpurdie 33
    'linux_i386'             => [ 'LINUX' , 'i386' ],           # Current compiler on 32 bit linux
34
    'linux_x64'              => [ 'LINUX' , 'x64' ],            # Current compiler on 64 bit linux
227 dpurdie 35
);
36
 
37
#-------------------------------------------------------------------------------
38
# Function        : new_platform
39
#
40
# Description     : Called when a new platform is being created
41
#                   The function can extend the build information
42
#
43
#                   The 'LINUX' platform will be converted into a 'suitable'
44
#                   platform for the current machine.
45
#
46
# Inputs          : $pInfo          - Reference to the platform build info hash
47
#
48
# Returns         : Nothing yet
49
#
50
 
51
sub new_platform
52
{
53
    my $class = shift;              # Not really a class, but its called like a class
54
    my $pInfo  = shift;
55
 
56
    #
57
    #   Ignore this platform if there is no way that it can be built on the
58
    #   current machine.
59
    #
60
    my $entry = $valid_machines{$::GBE_MACHTYPE};
61
    unless ( $entry )
62
    {
63
        Verbose ("LINUX will not build on this machine type: $::GBE_MACHTYPE");
64
        $pInfo->{NOT_AVAILABLE} = 1;
65
        return;
66
    }
67
 
68
    #
69
    #   Request that a simple BuildAlias be created for this platform
70
    #   Use the original name of the TARGET
71
    #
72
    $pInfo->{ALIAS} = $pInfo->{TARGET};
73
 
74
    #
75
    #   Alter the 'TARGET' name
76
    #   This is allowed (expected)
77
    #
78
    $pInfo->{TARGET} = uc( $entry->[0] . '_' . $entry->[1] );
79
}
80
 
81
#-------------------------------------------------------------------------------
82
# Function        : add_platform
83
#
84
# Description     : This function is invoked just before a 'platform' is about
85
#                   to be added to the build system.
86
#
87
#                   This call is allowed to alter or extend the platform build
88
#                   information.
89
#
90
# Inputs          : $pInfo          - Reference to the platform build info hash
91
#
92
# Returns         : Nothing yet
93
#
94
sub add_platform
95
{
96
    my $class = shift;              # Not really a class, but its called like a class
97
    my $pInfo  = shift;
98
 
99
    #
100
    #   Insert data into the class
101
    #
102
    #   ALSO_USES
103
    #   An array of other platforms that may be 'used' by this platform.
104
    #   The process is not recursive
105
    #   Similar to the --Uses option in BuildPlatforms()
106
    #   Will be subject to product expansion.
107
    #
108
    #   Intended use: VS2003 can use stuff from WIN32, but only if the
109
    #                 VS2003 stuff is not available.
110
#    $pInfo->{ALSO_USES} = [];
111
 
112
    #
113
    #   EXTRA_USES
114
    #   An array of other platforms to be 'used' by this platform.
115
    #   This list is not expanded in a PRODUCT as the USERS list is.
116
    #
117
    #   Intended use: Extend the SOLARIS on a sparc platform to allow for bad usage.
118
    #                 ie: Stuff is in SOLARIS, SOLARIS_sparc and sparc
119
    #
120
    $pInfo->{EXTRA_USES} = ['LINUX'];
121
 
122
    #
123
    #   EXT_SHARED
124
    #   Set to the value of the shared library extension
125
    #
126
    #   Intended Use
127
    #   Used to locate shared libraries in packgages for use in the
128
    #   generation set_<PLATFORM>.sh/.bat
129
    #
130
    #   If not set then the set_.sh files will no be created
131
    #
132
    $pInfo->{EXT_SHARED} = '.so';
133
 
134
    #
135
    #   OS_COMMON
136
    #   Set the name of a directory to be used to package header files to be
137
    #   used on targets that share a common OS
138
    #
139
    #   Note: Should also be a part of EXTRA_USES
140
    #
141
    #   Intended Use
142
    #   Extend the operation of the PackageHdr directive to allow files
143
    #   common files to be packaged
144
    #
145
    $pInfo->{OS_COMMON} = 'LINUX';
146
}
147
 
148
1;
149