Subversion Repositories DevTools

Rev

Rev 227 | Rev 363 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 261
Line 49... Line 49...
49
        }
49
        }
50
    }
50
    }
51
 
51
 
52
#.. Parse Platform Arguments
52
#.. Parse Platform Arguments
53
#
53
#
54
    my( @args ) = @ScmPlatformArgs;             # Platform arguments
54
    @args = @ScmPlatformArgs;                   # Platform arguments
55
    foreach $_ ( @args ) {
55
    foreach $_ ( @args ) {
56
        if (/^--product=(.*)/) {                # GBE product
56
        if (/^--product=(.*)/) {                # GBE product
57
            $product = $1;
57
            $product = $1;
58
        } else {
58
        } else {
59
            Message( "DAFBR: unknown platform argument $_ -- ignored\n" );
59
            Message( "DAFBR: unknown platform argument $_ -- ignored\n" );
Line 61... Line 61...
61
    }
61
    }
62
 
62
 
63
#.. Standard.rul requirements
63
#.. Standard.rul requirements
64
#
64
#
65
    $s =   undef;           # Assembler source file - not supported
65
    $s =   undef;           # Assembler source file - not supported
66
    $o =   rul;             # Object files
66
    $o =   'rul';           # Object files
67
    $a =   undef;           # Library file          - not supported
67
    $a =   undef;           # Library file          - not supported
68
    $so =  undef;           # Shared library        - not supported
68
    $so =  undef;           # Shared library        - not supported
69
    $exe = '.bin';          # Linked binary images
69
    $exe = '.bin';          # Linked binary images
70
 
70
 
71
#.. Toolset configuration
71
#.. Toolset configuration
72
#
72
#
73
    $ScmToolsetVersion = "1.0.0";               # our version
73
    $ScmToolsetVersion = "1.0.0";               # our version
74
    $ScmToolsetGenerate = 0;                    # generate optional
74
    $ScmToolsetGenerate = 0;                    # generate optional
75
    $ScmToolsetIFLAG3 = 1;                      # supports IFLAG3
75
    $::ScmToolsetProgDependancies = 0;          # handle Prog dependancies myself
76
 
76
 
77
#.. Define the environment
77
#.. Define the environment
78
#
78
#
79
    #
79
    #
80
    #   Define initialisation targets
80
    #   Define initialisation targets
Line 285... Line 285...
285
###############################################################################
285
###############################################################################
286
 
286
 
287
sub ToolsetLD
287
sub ToolsetLD
288
{
288
{
289
    my ( $name, $pArgs, $pObjs, $pLibs ) = @_;
289
    my ( $name, $pArgs, $pObjs, $pLibs ) = @_;
290
    my ( $full ) = $name."$::exe";
290
    my ( $full ) = '$(BINDIR)/' . $name . $::exe;
291
    my ( @slist );
291
    my ( @slist );
292
    my $def_name = $ScmCompilerOpts{'BRLD_DEF'};    # Start with global value
292
    my $def_name = $ScmCompilerOpts{'BRLD_DEF'};    # Start with global value
293
    my $opt_header;
293
    my $opt_header;
294
 
294
 
295
#.. Parse arguments
295
#.. Parse arguments
Line 329... Line 329...
329
 
329
 
330
    Error ("dafbr LD: Libraries not supported")
330
    Error ("dafbr LD: Libraries not supported")
331
        if ( scalar @$pLibs > 0 );
331
        if ( scalar @$pLibs > 0 );
332
        
332
        
333
 
333
 
-
 
334
    #
-
 
335
    #   Rules and Recipes to create the Program
-
 
336
    #
-
 
337
    my $me = MakeEntry::New (*MAKEFILE, $full );
-
 
338
    $me->AddComment ("Build Program: $name" );
-
 
339
    $me->AddDependancy ( map ( "$_.$::o", @$pObjs) );
-
 
340
    $me->AddRecipe ( '$(LD)' );
-
 
341
    $me->AddDefn ( 'BRLD_DEF' => $def  );
-
 
342
    $me->AddDefn ( 'BRLD_FLAGS' => $opt_header  ) if defined($opt_header);
-
 
343
    $me->Print();
334
 
344
 
335
#.. Extend the dependancy rules
-
 
336
#   Then add the receipe for the process
-
 
337
#
345
    #
338
    my ($io) = ToolsetPrinter::New();
-
 
339
    $io->Prt( "\n\t\$(LD)\n" );
-
 
340
    $io->Newline();
346
    #   Package the file
341
 
-
 
342
    $io->Prt("\$(BINDIR)/${full}:\tBRLD_DEF = $def\n" );
-
 
343
    $io->Prt("\$(BINDIR)/${full}:\tBRLD_FLAGS = $opt_header\n" ) if defined($opt_header);
-
 
344
 
-
 
345
 
-
 
346
#.. Cleanup rules
-
 
347
#
347
    #
348
    ToolsetGenerate( "\$(BINDIR)/${name}$::exe" );
348
    PackageProgAddFiles ( $name, $full );
349
}
349
}
350
 
350
 
351
1;
351
1;
352
 
352