Subversion Repositories DevTools

Rev

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

Rev 307 Rev 335
Line 572... Line 572...
572
    if ( $snk )
572
    if ( $snk )
573
    {
573
    {
574
        UniquePush ( \@csource, Toolset_gensnk ($name, $snk ) );
574
        UniquePush ( \@csource, Toolset_gensnk ($name, $snk ) );
575
    }
575
    }
576
 
576
 
-
 
577
    my ($io) = ToolsetPrinter::New();
-
 
578
    my $dep = $io->SetLdTarget( $name );
-
 
579
 
577
    #
580
    #
578
    #   Create Rules and Recipes to create the Program
581
    #   Create Rules and Recipes to create the Program
579
    #   This will be a combination of source, libraries and resources
582
    #   This will be a combination of source, libraries and resources
580
    #
583
    #
581
    my $me = MakeEntry::New (*MAKEFILE, $full );
584
    my $me = MakeEntry::New (*MAKEFILE, $full );
582
    $me->AddComment ("Build Program: $name" );
585
    $me->AddComment ("Build Program: $name" );
583
    $me->AddName    ( $docFile ) if ( $docFile );
586
    $me->AddName    ( $docFile ) if ( $docFile );
-
 
587
    $me->AddDependancy ( $dep );
584
    $me->AddDependancy ( '$(SCM_MAKEFILE)' );
588
    $me->AddDependancy ( '$(SCM_MAKEFILE)' );
585
    $me->AddDependancy ( @resources );
589
    $me->AddDependancy ( @resources );
586
    $me->AddDependancy ( @csource );
590
    $me->AddDependancy ( @csource );
587
    $me->AddDependancy ( @dtd );
591
    $me->AddDependancy ( @dtd );
588
    $me->AddDependancy ( $icon );
592
    $me->AddDependancy ( $icon );
Line 593... Line 597...
593
    #
597
    #
594
    #.. Compiler command file
598
    #.. Compiler command file
595
    #       Now piece together a variable $(name_ld) which ends up in
599
    #       Now piece together a variable $(name_ld) which ends up in
596
    #       the command file linking the application.
600
    #       the command file linking the application.
597
    #
601
    #
598
    my ($io) = ToolsetPrinter::New();
-
 
599
 
-
 
600
    $io->Label( "Linker commands", $name );     # label
602
    $io->Label( "Linker commands", $name );     # label
601
    $io->SetTag( "${name}_ld" );                # macro tag
603
    $io->SetTag( "${name}_ld" );                # macro tag
602
 
604
 
603
    $io->Label( "Linker Command File", $name ); # label
605
    $io->Label( "Linker Command File", $name ); # label
604
 
606
 
Line 617... Line 619...
617
    #
619
    #
618
    $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @resources;
620
    $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @resources;
619
    $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @dtd;
621
    $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @dtd;
620
    $io->Cmd( "\$(subst /,\\\\,$_)" ) foreach @csource;
622
    $io->Cmd( "\$(subst /,\\\\,$_)" ) foreach @csource;
621
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
623
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
-
 
624
    $io->Newline();
622
 
625
 
623
 
626
 
624
    #.. Dependencies
627
    #.. Dependency link,
-
 
628
    #   Create a library dependency file
-
 
629
    #       Create command file to build applicaton dependency list
-
 
630
    #       from the list of dependent libraries
625
    #
631
    #
626
    #       Now piece together a variable $(name_dp) which ends up in
632
    #       Create makefile directives to include the dependency
627
    #       the command file building the application dependency list.
633
    #       list into the makefile.
628
    #
634
    #
629
    $io->SetTag( "${name}_dp" );                # macro tag
-
 
630
    $io->DepRules( $name, $pLibs,               # library depends rules
-
 
631
        \&ToolsetLibRecipe, $full );
635
    $io->DepRules( $pLibs, \&ToolsetLibRecipe, $full );
632
    $io->Newline();
636
    $io->LDDEPEND();
633
 
637
 
634
 
-
 
635
    $io->Label( "Linker Dependancy File", $name );     # label
-
 
636
    $io->LDDEPEND( $name );                            # standard LDDEPEND rules
-
 
637
    
-
 
638
    
-
 
639
    #
638
    #
640
    #   Files to clean up
639
    #   Files to clean up
641
    #
640
    #
642
    ToolsetGenerate( "$root.dep" );
-
 
643
    ToolsetGenerate( "$root.ld" );
641
    ToolsetGenerate( "$root.ld" );
644
    ToolsetGenerate( "$root.pdb" );
642
    ToolsetGenerate( "$root.pdb" );
645
    ToolsetGenerate( $docFile ) if $docFile;
643
    ToolsetGenerate( $docFile ) if $docFile;
646
 
644
 
647
 
645
 
Line 768... Line 766...
768
        $root = "\$(LIBDIR)/$lib";
766
        $root = "\$(LIBDIR)/$lib";
769
        $full = "$root.$::so";
767
        $full = "$root.$::so";
770
        $link_target = "library";
768
        $link_target = "library";
771
        $_docFile = "$full.xml" if ($_docFile);
769
        $_docFile = "$full.xml" if ($_docFile);
772
 
770
 
-
 
771
        my ($io) = ToolsetPrinter::New();
-
 
772
        my $dep = $io->SetShldTarget( $lib );
-
 
773
        
773
        #
774
        #
774
        #   Create Rules and Recipes to create the Program
775
        #   Create Rules and Recipes to create the Program
775
        #   This will be a combination of source, libraries and resources
776
        #   This will be a combination of source, libraries and resources
776
        #
777
        #
777
        my $me = MakeEntry::New (*MAKEFILE, $full );
778
        my $me = MakeEntry::New (*MAKEFILE, $full );
778
        $me->AddComment ("Build Shared Library: $name" );
779
        $me->AddComment ("Build Shared Library: $name" );
779
        $me->AddName    ( $_docFile ) if ( $_docFile );
780
        $me->AddName    ( $_docFile ) if ( $_docFile );
780
        $me->AddDependancy ( '$(SCM_MAKEFILE)' );
781
        $me->AddDependancy ( '$(SCM_MAKEFILE)' );
-
 
782
        $me->AddDependancy ( $dep );
781
        $me->AddDependancy ( @_resources );
783
        $me->AddDependancy ( @_resources );
782
        $me->AddDependancy ( @_csource );
784
        $me->AddDependancy ( @_csource );
783
        $me->AddDependancy ( @_dtd );
785
        $me->AddDependancy ( @_dtd );
784
        $me->AddDependancy ( $_icon );
786
        $me->AddDependancy ( $_icon );
785
        $me->AddRecipe ( '$(CSC)' );
787
        $me->AddRecipe ( '$(CSC)' );
Line 789... Line 791...
789
        #
791
        #
790
        #.. Compiler command file
792
        #.. Compiler command file
791
        #       Now piece together a variable $(name_ld) which ends up in
793
        #       Now piece together a variable $(name_ld) which ends up in
792
        #       the command file linking the application.
794
        #       the command file linking the application.
793
        #
795
        #
794
        my ($io) = ToolsetPrinter::New();
-
 
795
 
796
 
796
        $io->Label( "Linker commands", $name );     # label
797
        $io->Label( "Linker commands", $name );     # label
797
        $io->SetTag( "${lib}_ld" );                 # macro tag
798
        $io->SetTag( "${lib}_ld" );                 # macro tag
798
 
799
 
799
        $io->Label( "Linker Command File", $lib ); # label
800
        $io->Label( "Linker Command File", $lib ); # label
Line 812... Line 813...
812
        #
813
        #
813
        $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @_resources;
814
        $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @_resources;
814
        $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @_dtd;
815
        $io->Cmd( "/res:\$(subst /,\\\\,$_)" ) foreach @_dtd;
815
        $io->Cmd( "\$(subst /,\\\\,$_)" ) foreach @_csource;
816
        $io->Cmd( "\$(subst /,\\\\,$_)" ) foreach @_csource;
816
        $io->LibList( $name, $_pLibs, \&ToolsetLibRecipe );
817
        $io->LibList( $name, $_pLibs, \&ToolsetLibRecipe );
-
 
818
        $io->Newline();
817
 
819
 
818
        #.. Dependencies
820
        #.. Dependency link,
-
 
821
        #   Create a library dependency file
-
 
822
        #       Create command file to build applicaton dependency list
-
 
823
        #       from the list of dependent libraries
819
        #
824
        #
820
        #       Now piece together a variable $(name_dp) which ends up in
825
        #       Create makefile directives to include the dependency
821
        #       the command file building the application dependency list.
826
        #       list into the makefile.
822
        #
827
        #
823
        $io->SetTag( "${lib}_shdp" );                   # macro tag
-
 
824
        $io->DepRules( $lib, $_pLibs,                   # library depends rules
-
 
825
            \&ToolsetLibRecipe, $full );
828
        $io->DepRules( $_pLibs, \&ToolsetLibRecipe, $full );
826
        $io->Newline();
829
        $io->SHLDDEPEND( $name, $lib  );
827
 
830
 
828
        $io->Label( "Linker Dependancy File", $name );  # label
-
 
829
        $io->SHLDDEPEND( $lib,$name,$lib  );            # standard SHLDDEPEND rules
-
 
830
    
-
 
831
        #
831
        #
832
        #   Files to clean up
832
        #   Files to clean up
833
        #
833
        #
834
        ToolsetGenerate( "$root.dep" );
-
 
835
        ToolsetGenerate( "$root.ld" );
834
        ToolsetGenerate( "$root.ld" );
836
        ToolsetGenerate( "$root.pdb" );
835
        ToolsetGenerate( "$root.pdb" );
837
        ToolsetGenerate( $_docFile ) if $_docFile;
836
        ToolsetGenerate( $_docFile ) if $_docFile;
838
 
837
 
839
 
838