Subversion Repositories DevTools

Rev

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

Rev 287 Rev 335
Line 450... Line 450...
450
#.. Names of important files
450
#.. Names of important files
451
#
451
#
452
    my $base = "\$(BINDIR)/${name}";
452
    my $base = "\$(BINDIR)/${name}";
453
    my $full = $base . $::exe;
453
    my $full = $base . $::exe;
454
    my $map  = $base . '.map';
454
    my $map  = $base . '.map';
455
    my $dep  = $base . '.dep';
-
 
456
 
455
 
457
 
456
 
458
#.. Cleanup rules
457
#.. Cleanup rules
459
#
458
#
460
#   dep             Dependency file
-
 
461
#   ld              Linker command file
459
#   ld              Linker command file
462
#   map             Map file
460
#   map             Map file
463
#   ilk             Microsoft Linker Database
461
#   ilk             Microsoft Linker Database
464
#   res             Compiled resource script
462
#   res             Compiled resource script
465
#
463
#
466
    ToolsetGenerate( $dep );
-
 
467
    ToolsetGenerate( $map );
464
    ToolsetGenerate( $map );
468
    ToolsetGenerate( $base . '.ld' );
465
    ToolsetGenerate( $base . '.ld' );
469
    ToolsetGenerate( $base . '.ilk' );
466
    ToolsetGenerate( $base . '.ilk' );
470
 
467
 
471
#.. Linker command
468
#.. Linker command
472
#
469
#
473
    my ($io) = ToolsetPrinter::New();
470
    my ($io) = ToolsetPrinter::New();
-
 
471
    my $dep = $io->SetLdTarget( $name );
474
 
472
 
475
    $io->Prt( "$full : $dep " );
473
    $io->Prt( "$full : $dep " );
476
    $io->Entry( "", "", "\\\n\t", ".$::o ", @$pObjs );
474
    $io->Entry( "", "", "\\\n\t", ".$::o ", @$pObjs );
477
    $io->Prt( "\\\n\t$res " ) if ( $res );
475
    $io->Prt( "\\\n\t$res " ) if ( $res );
478
    $io->Prt( "\n\t\$(LD)\n\n" );
476
    $io->Prt( "\n\t\$(LD)\n\n" );
Line 482... Line 480...
482
#
480
#
483
#       Now piece together a variable $(name_ld) which ends up in
481
#       Now piece together a variable $(name_ld) which ends up in
484
#       the command file linking the application.
482
#       the command file linking the application.
485
#
483
#
486
    $io->SetTag( "${name}_ld" );                # macro tag
484
    $io->SetTag( "${name}_ld" );                # macro tag
487
 
-
 
488
    $io->Label( "Linker commands", $name );     # label
485
    $io->Label( "Linker commands", $name );     # label
489
 
486
 
490
    $io->Cmd( "\@\$(subst /,\\\\,$_)" ) foreach (@cmd_files);
487
    $io->Cmd( "\@\$(subst /,\\\\,$_)" ) foreach (@cmd_files);
491
    $io->Cmd( "-exe \$(subst /,\\\\,$full)" );
488
    $io->Cmd( "-exe \$(subst /,\\\\,$full)" );
492
    $io->Cmd( "-cvsymbols" );
489
    $io->Cmd( "-cvsymbols" );
Line 495... Line 492...
495
 
492
 
496
    $io->ObjList( $name, $pObjs, \&ToolsetObjRecipe );  # object list
493
    $io->ObjList( $name, $pObjs, \&ToolsetObjRecipe );  # object list
497
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );  # library list
494
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );  # library list
498
    $io->Newline();
495
    $io->Newline();
499
 
496
 
500
#.. Library dependency information
497
    #.. Dependency link,
501
#   Rules to include a .dep file when required
498
    #   Create a library dependency file
502
#
-
 
503
    $io->LDDEPEND( $name );
499
    #       Create command file to build applicaton dependency list
504
 
-
 
505
#.. Dependencies
500
    #       from the list of dependent libraries
506
#
501
    #
507
#       Now piece together a variable $(name_dp) which ends up in
502
    #       Create makefile directives to include the dependency
508
#       the command file building the application dependency list.
503
    #       list into the makefile.
509
#
504
    #
510
    $io->SetTag( "${name}_dp" );                                # macro tag
-
 
511
    $io->DepRules( $name, $pLibs, \&ToolsetLibRecipe, $full );  # library depends rules
505
    $io->DepRules( $pLibs, \&ToolsetLibRecipe, $full );
512
    $io->Newline();
506
    $io->LDDEPEND();
513
 
507
 
514
#.. Compile up the resource file
508
#.. Compile up the resource file
515
#
509
#
516
    ToolsetRCrecipe( $res, @reslist )
510
    ToolsetRCrecipe( $res, @reslist )
517
        if ( $res );
511
        if ( $res );