Subversion Repositories DevTools

Rev

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

Rev 333 Rev 335
Line 487... Line 487...
487
#
487
#
488
#   dep     Dependency file
488
#   dep     Dependency file
489
#   map     Map file
489
#   map     Map file
490
#   ln      Link from LIBDIR to BINDIR
490
#   ln      Link from LIBDIR to BINDIR
491
#
491
#
492
    ToolsetGenerate( "\$(LIBDIR)/${name}.dep" );
-
 
493
    ToolsetGenerate( "\$(LIBDIR)/${shared}.map" );
492
    ToolsetGenerate( "\$(LIBDIR)/${shared}.map" );
494
    ToolsetGenerate( "\$(LIBDIR)/${shared}" );
493
    ToolsetGenerate( "\$(LIBDIR)/${shared}" );
495
    ToolsetGenerate( "\$(BINDIR)/${shared}" );
494
    ToolsetGenerate( "\$(BINDIR)/${shared}" );
496
    ToolsetDirTree( "\$(LIBDIR)/${name}/SunWS_cache" );
495
    ToolsetDirTree( "\$(LIBDIR)/${name}/SunWS_cache" );
497
    ToolsetDirTree( "\$(OBJDIR)/${name}/SunWS_cache" );
496
    ToolsetDirTree( "\$(OBJDIR)/${name}/SunWS_cache" );
Line 509... Line 508...
509
              "\t\t\$(GBE_BINDIR)\\\n" .
508
              "\t\t\$(GBE_BINDIR)\\\n" .
510
              "\t\t\$(LIBDIR)/${shared}\n" .
509
              "\t\t\$(LIBDIR)/${shared}\n" .
511
              "\t\@(rm -f \$@; ln -s ./$shared \$@)\n" .
510
              "\t\@(rm -f \$@; ln -s ./$shared \$@)\n" .
512
              "\t\@(rm -f \$(BINDIR)/$shared; ln -s ../\$(LIBDIR)/$shared \$(BINDIR)/$shared)\n\n" );
511
              "\t\@(rm -f \$(BINDIR)/$shared; ln -s ../\$(LIBDIR)/$shared \$(BINDIR)/$shared)\n\n" );
513
 
512
 
514
    $io->SHLDDEPEND($name, $name, $shared);     # std SHLDDEPEND rules
513
    my $dep = $io->SetShldTarget($shared);
515
 
514
 
516
    $io->Prt( "\$(LIBDIR)/${shared}:\tSHBASE=${name}\n" );
515
    $io->Prt( "\$(LIBDIR)/${shared}:\tSHBASE=${name}\n" );
517
    $io->Prt( "\$(LIBDIR)/${shared}:\tSHNAME=${shared}\n" );
516
    $io->Prt( "\$(LIBDIR)/${shared}:\tSHNAME=${shared}\n" );
518
    $io->Prt( "\$(LIBDIR)/${shared}: \\\n\t\t\$(LIBDIR)/${name}.dep" );
517
    $io->Prt( "\$(LIBDIR)/${shared}: \\\n\t\t${dep}" );
519
    $io->Entry( "", "", " \\\n\t\t", ".$::o", @$pObjs );
518
    $io->Entry( "", "", " \\\n\t\t", ".$::o", @$pObjs );
520
    $io->Prt( "\n\t\$(SHLD)\n\n" );
519
    $io->Prt( "\n\t\$(SHLD)\n\n" );
521
 
520
 
522
 
521
 
523
#.. Linker command file
522
#.. Linker command file
Line 544... Line 543...
544
                                                # library list
543
                                                # library list
545
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
544
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
546
 
545
 
547
    $io->Newline();
546
    $io->Newline();
548
 
547
 
549
#.. Dependency link,
548
    #.. Dependency link,
550
#
-
 
551
#       Now piece together a variable $(name_dp) which ends up in
549
    #   Create a library dependency file
552
#       the command file building the application dependency list.
550
    #       Create command file to build applicaton dependency list
-
 
551
    #       from the list of dependent libraries
553
#
552
    #
554
    $io->SetTag( "${name}_dp" );              # command tag
553
    #       Create makefile directives to include the dependency
555
    $io->SetTerm();
554
    #       list into the makefile.
556
 
555
    #
557
    $io->DepRules( $name, $pLibs,               # library depends rules
-
 
558
        \&ToolsetLibRecipe, "\$(LIBDIR)/$shared" );
556
    $io->DepRules( $pLibs, \&ToolsetLibRecipe, "\$(LIBDIR)/$shared" );
559
 
-
 
560
    $io->Newline();
557
    $io->SHLDDEPEND($name, $shared);
561
}
558
}
562
 
559
 
563
 
560
 
564
######################################################
561
######################################################
565
#   ToolsetLD( $name, \@args, \@objs, \@libraries )
562
#   ToolsetLD( $name, \@args, \@objs, \@libraries )
Line 598... Line 595...
598
 
595
 
599
#.. Names of programs and components
596
#.. Names of programs and components
600
#
597
#
601
    my $base = "\$(BINDIR)/${name}";
598
    my $base = "\$(BINDIR)/${name}";
602
    my $full = $base . $::exe;
599
    my $full = $base . $::exe;
603
    my $dep  = $base . '.dep';
-
 
604
    my $map  = $base . '.map';
600
    my $map  = $base . '.map';
605
    my $ld  =  $base . '.ld';
601
    my $ld  =  $base . '.ld';
606
    
602
    
607
#.. Cleanup rules
603
#.. Cleanup rules
608
#
604
#
609
#       dep     Dependency file
605
#       dep     Dependency file
610
#       map     Mape file
606
#       map     Mape file
611
#
607
#
612
    ToolsetGenerate( $dep );
-
 
613
    ToolsetGenerate( $map );
608
    ToolsetGenerate( $map );
614
 
609
 
615
 
610
 
-
 
611
    my ($io) = ToolsetPrinter::New();
-
 
612
    my $dep =$io->SetLdTarget( $name );
-
 
613
 
616
#.. Build rules
614
#.. Build rules
617
#
615
#
618
    my ($io) = ToolsetPrinter::New();
-
 
619
 
616
 
620
    $io->Prt( "$full : $dep " );
617
    $io->Prt( "$full : $dep " );
621
    $io->Entry( "", "", "\\\n\t", ".$::o ", @$pObjs );
618
    $io->Entry( "", "", "\\\n\t", ".$::o ", @$pObjs );
622
    $io->Prt( "\n\t\$(LD)\n\n" );
619
    $io->Prt( "\n\t\$(LD)\n\n" );
623
 
620
 
624
 
621
 
625
#.. Library dependency information
-
 
626
#   Rules to include a .dep file when required
-
 
627
#
-
 
628
 
-
 
629
    $io->LDDEPEND( $name );                     # standard LDDEPEND rules
-
 
630
    $io->Newline();
-
 
631
 
-
 
632
#.. Linker command file
622
#.. Linker command file
633
#
623
#
634
#       Now the fun part... piecing together a variable $(name_ld)
624
#       Now the fun part... piecing together a variable $(name_ld)
635
#       which ends up in the command file.
625
#       which ends up in the command file.
636
#
626
#
Line 642... Line 632...
642
    ToolsetLibStd( $pLibs );                            # push standard libraries
632
    ToolsetLibStd( $pLibs );                            # push standard libraries
643
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );  # library list
633
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );  # library list
644
    $io->Newline();
634
    $io->Newline();
645
 
635
 
646
#.. Dependency link,
636
#.. Dependency link,
-
 
637
#   Create a library dependency file
-
 
638
#       Create command file to build applicaton dependency list
-
 
639
#       from the list of dependent libraries
647
#
640
#
648
#       Now piece together a variable $(name_dp) which ends up in
641
#       Create makefile directives to include the dependency
649
#       the command file building the application dependency list.
642
#       list into the makefile.
650
#
643
#
651
    $io->SetTag( "${name}_dp" );                        # macro tag
644
    $io->DepRules( $pLibs, \&ToolsetLibRecipe, $base );
652
    $io->SetTerm();
-
 
653
 
-
 
654
    $io->DepRules( $name, $pLibs,                       # library depends rules
645
    $io->LDDEPEND();                                    # standard LDDEPEND rules
655
        \&ToolsetLibRecipe, $base );
-
 
656
 
646
 
657
    $io->Newline();
-
 
658
 
647
 
659
#.. Package up the program and other artifacts
648
#.. Package up the program and other artifacts
660
#
649
#
661
    PackageProgAddFiles ( $name, $full );
650
    PackageProgAddFiles ( $name, $full );
662
 
651