############################################################################### # Copyright (c) ERG Transit Systems. 1996-2007 # # File: PLATFORM/WINCE.cfg # # Contents: SOLARIS 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 # # # Version Who Date Description # DDP 16-Apr-07 Created ############################################################################### use strict; use warnings; package WINCE_Build; use JatsError; use Storable qw(dclone); # # Create a hash of GBE_MACHTYPEs for which the WINCE platform is available # It won't just build on any only machine # # Hash values are an array of all WinCE targets # Simplifies the process of building components for all WinCE target # my %valid_machines = ( 'win32' => [ 'WCEIPA280', 'WCEIT3000', 'WCEPA961', 'WCEPA962', 'WCEPA962_500', 'WCEPCM7220', # 'WCEPSION_420', 'WCEPSION_500', 'WCEPSION_500_emu', 'WCEPSION_500_VS2005', 'WCEPSPC_arm', 'WCEPSPC_emu', 'WCEX86A420', 'WCEX86A500', 'WCEX86A500_SOM4455', ], ); #------------------------------------------------------------------------------- # Function : new_platform # # Description : Called when a new platform is being created # The function can extend the build information # # The 'WINCE' platform will be converted into a 'suitable' # platform for the current machine. # # 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 ("WINCE will not build on this machine type: $::GBE_MACHTYPE"); $pInfo->{NOT_AVAILABLE} = 1; return; } # # Instantiate all targets # foreach my $target ( @$entry ) { WINCE_generic( dclone($pInfo), $target ); } # # All done # Mark the original entry as a TEMPLATE so that it won't be added # We have added cloned copies of it # $pInfo->{TEMPLATE} = 1; } #------------------------------------------------------------------------------- # Function : WINCE_generic # # Description : Take a clone of the buildinfo structure and specialise it # for the required target # # Inputs : $pInfo - A clone of the buildinfo data # $target - Name of the target platform # # Returns : Nothing # The buildinfo MUST be added to the build system # sub WINCE_generic { my ($pInfo, $target) = @_; Debug("WINCE_generic: $target"); # # Request that a simple BuildAlias be created for this platform # Use the original name of the TARGET # $pInfo->{ALIAS} = $pInfo->{TARGET}; # # # # Specify the hardware family # # Will be used to create an ALIAS # # # $pInfo->{HARDWARE} = uc($arch); # # Alter the 'TARGET' name # This is allowed (expected) # $pInfo->{TARGET} = $target; # # Register this 'new' buildinfo entry with the build system # ::AddBuildPlatformEntry( $pInfo ); } 1;