Subversion Repositories DevTools

Rev

Rev 7322 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7322 Rev 7323
Line 107... Line 107...
107
    my( @libflags, @ldflags, @ldflags_debug, @ldflags_prod ) = ();
107
    my( @libflags, @ldflags, @ldflags_debug, @ldflags_prod ) = ();
108
    my $is_vs2005;
108
    my $is_vs2005;
109
    my $default_ehandling = undef;
109
    my $default_ehandling = undef;
110
    my @pDefines;
110
    my @pDefines;
111
    my $stack = '0x10000,0x1000';
111
    my $stack = '0x10000,0x1000';
-
 
112
    my $findRc;
112
 
113
 
113
#.. Standard.rul requirements
114
#.. Standard.rul requirements
114
#
115
#
115
    $::s = "asm";
116
    $::s = "asm";
116
    $::o = "obj";
117
    $::o = "obj";
Line 121... Line 122...
121
#.. Toolset configuration
122
#.. Toolset configuration
122
#
123
#
123
    $::ScmToolsetVersion = "1.0.0";             # our version
124
    $::ScmToolsetVersion = "1.0.0";             # our version
124
    $::ScmToolsetGenerate = 0;                  # generate optional
125
    $::ScmToolsetGenerate = 0;                  # generate optional
125
    $::ScmToolsetProgDependancies = 0;          # handle Prog dependancies myself
126
    $::ScmToolsetProgDependancies = 0;          # handle Prog dependancies myself
-
 
127
    $::ScmToolsetProperties{'LdFlagSpace'} = 1; # LdFlags support embedded spaces
126
 
128
 
127
#.. Parse arguments
129
#.. Parse arguments
128
#
130
#
129
    Debug( "$toolset_name(ToolsetArgs=@::ScmToolsetArgs)" );
131
    Debug( "$toolset_name(ToolsetArgs=@::ScmToolsetArgs)" );
130
 
132
 
Line 158... Line 160...
158
        } elsif (/^--NoDinkumware/) {           # Deprecated switch
160
        } elsif (/^--NoDinkumware/) {           # Deprecated switch
159
 
161
 
160
        } elsif (/^--Define=(.*)/ ) {
162
        } elsif (/^--Define=(.*)/ ) {
161
            push @pDefines, '-D' . $1;
163
            push @pDefines, '-D' . $1;
162
 
164
 
-
 
165
        } elsif (/^--FindRc/i ) {
-
 
166
            $findRc = 1;
-
 
167
 
163
        } else {
168
        } else {
164
            Message( "$toolset_name toolset: unknown platform argument $_ -- ignored\n" );
169
            Message( "$toolset_name toolset: unknown platform argument $_ -- ignored\n" );
165
        }
170
        }
166
    }
171
    }
167
 
172
 
Line 221... Line 226...
221
        'PA962'             => 'WCE_PLATFORM_PA962',
226
        'PA962'             => 'WCE_PLATFORM_PA962',
222
        'PA962 WINCE 500'   => 'WCE_PLATFORM_PA962',
227
        'PA962 WINCE 500'   => 'WCE_PLATFORM_PA962',
223
        'M81B_SDK'          => 'WCE_PLATFORM_M81B',                 # Just made this one up
228
        'M81B_SDK'          => 'WCE_PLATFORM_M81B',                 # Just made this one up
224
        'VixArmv4iGeneric'  => 'WCE_PLATFORM_VIXARMV4I_GENERIC',    # Just made this one up
229
        'VixArmv4iGeneric'  => 'WCE_PLATFORM_VIXARMV4I_GENERIC',    # Just made this one up
225
        'PocketPC'          => 'WIN32_PLATFORM_PSPC',
230
        'PocketPC'          => 'WIN32_PLATFORM_PSPC',
-
 
231
        'dc5000_som_4466_sdk' => 'WCE_PLATFORM_som_4466_sdk',       # Just made this one up
226
    );
232
    );
227
 
233
 
228
    unless ( $WCEPlatform eq 'NONE' )
234
    unless ( $WCEPlatform eq 'NONE' )
229
    {
235
    {
230
        $WCEPlatformDefine = $PlatformSDKDefinitions{$WCEPlatform};
236
        $WCEPlatformDefine = $PlatformSDKDefinitions{$WCEPlatform};
Line 244... Line 250...
244
    $WCESubsystem = "windowsce," . int($WCEVersion/100) . "." . $WCEVersion%100
250
    $WCESubsystem = "windowsce," . int($WCEVersion/100) . "." . $WCEVersion%100
245
        if ( !defined($WCESubsystem) || $WCESubsystem eq "" );
251
        if ( !defined($WCESubsystem) || $WCESubsystem eq "" );
246
 
252
 
247
        push( @ldflags,     '-debug:full' ) unless ($is_vs2005);
253
        push( @ldflags,     '-debug:full' ) unless ($is_vs2005);
248
        push( @ldflags,     '-debug' )      if ($is_vs2005);
254
        push( @ldflags,     '-debug' )      if ($is_vs2005);
-
 
255
 
-
 
256
#
-
 
257
#   VS2008 may nothave installed rc.exe correctly
-
 
258
#       May have to set up PATH to locate a copy
-
 
259
#       
-
 
260
if ($findRc) {
-
 
261
    my $rcPath;
-
 
262
    my $programFiles = $ENV{PROGRAMFILES};
-
 
263
    Error ('EnvVar PROGRAMFILES not defined') unless $programFiles;
-
 
264
    Error ('EnvVar PROGRAMFILES does not reference a directory') unless -d $programFiles;
-
 
265
 
-
 
266
    my @GuessList = (
-
 
267
        'Windows Kits/8.0/bin/x86',
-
 
268
        'Windows Kits/8.1/bin/x86/rc.exe',
-
 
269
        'Microsoft SDKs/Windows/v7.1A/Bin'
-
 
270
        );
-
 
271
 
-
 
272
    foreach my $testDir ( @GuessList) {
-
 
273
        my $testPath = CatPaths($programFiles, $testDir, 'rc.exe' );
-
 
274
        if (-f $testPath) {
-
 
275
            $rcPath = $testDir;
-
 
276
            last;
-
 
277
        }
-
 
278
    }
-
 
279
    Warning ('RC.EXE cannot be located') unless $rcPath;
-
 
280
    PlatformDefine ('RCPATH := $(PROGRAMFILES)/' . ($rcPath || 'Unknown') )
-
 
281
    
-
 
282
}
249
        
283
        
250
#.. Select toolchain info , based on targetCPU
284
#.. Select toolchain info , based on targetCPU
251
 
285
 
252
    if ( $WCETargetCPU eq "armv4" ) {
286
    if ( $WCETargetCPU eq "armv4" ) {
253
        $compiler           = "clarm";
287
        $compiler           = "clarm";