############################################################################### # Copyright (c) ERG Transit Systems. 1996-2007 # # File: PLATFORM/CSHARP.cfg # # Contents: CSHARP Build support # # This package is used during the processing of the build.pl file # Values provided by this package are used to extend the Platform # information as platforms are being created. This provides a # powerful set of mechanism to extend the entire JATS toolset # ############################################################################### use strict; use warnings; package CSHARP_Build; use JatsError; # # Create a hash of GBE_MACHTYPEs for which the CSHARP platform is available # It won't just build on any old machine # my %valid_machines = ( 'win32' => 1, ); #------------------------------------------------------------------------------- # Function : new_platform # # Description : Called when a new platform is being created # The function can extend the build information # # At the moment it simply removes the build from unsuitable # machine types. # # Inputs : $pInfo - Reference to the platform build info hash # # Returns : Nothing yet # sub new_platform { my $class = shift; # Not really a class, but its called like a class my $pInfo = shift; # # Ignore this platform if there is no way that it can be built on the # current machine. # my $entry = $valid_machines{$::GBE_MACHTYPE}; unless ( $entry ) { Verbose ("CSHARP will not build on this machine type: $::GBE_MACHTYPE"); $pInfo->{NOT_AVAILABLE} = 1; return; } } #------------------------------------------------------------------------------- # Function : add_platform # # Description : This function is invoked just before a 'platform' is about # to be added to the build system. # # This call is allowed to alter or extend the platform build # information. # # Inputs : $pInfo - Reference to the platform build info hash # # Returns : Nothing yet # sub add_platform { my $class = shift; # Not really a class, but its called like a class my $pInfo = shift; # ALSO_USES # An array of other platforms that may be 'used' by this platform. # The process is not recursive # Similar to the --Uses option in BuildPlatforms() # Will be subject to product expansion. # # Intended use: CSHARP can use stuff from WIN32, but only if the # CSHARP stuff is not available. $pInfo->{ALSO_USES} = ['WIN32']; # # EXT_SHARED # Set to the value of the shared library extension # # Intended Use # Used to locate shared libraries in packgages for use in the # generation set_.sh/.bat # # If not set then the set_.sh files will no be created # $pInfo->{EXT_SHARED} = '.dll'; # # OS_COMMON # Set the name of a directory to be used to package header files to be # used on targets that share a common OS # # Note: Should also be a part of EXTRA_USES # # Intended Use # Extend the operation of the PackageHdr directive to allow files # common files to be packaged # $pInfo->{OS_COMMON} = 'WIN32'; } 1;