Subversion Repositories DevTools

Rev

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

Rev 291 Rev 335
Line 730... Line 730...
730
        my $full = $lib.".$::so";
730
        my $full = $lib.".$::so";
731
        my $link_with_def;
731
        my $link_with_def;
732
 
732
 
733
    #.. Cleanup rules
733
    #.. Cleanup rules
734
    #
734
    #
735
    #   dep     Dependency file
-
 
736
    #   ld      Linker command file
735
    #   ld      Linker command file
737
    #   map     Map file
736
    #   map     Map file
738
    #   pdb     Microsoft C/C++ program database
737
    #   pdb     Microsoft C/C++ program database
739
    #   ilk     Microsoft Linker Database
738
    #   ilk     Microsoft Linker Database
740
    #
739
    #
741
        ToolsetGenerate( "\$(LIBDIR)/${lib}.ld" );
740
        ToolsetGenerate( "\$(LIBDIR)/${lib}.ld" );
742
        ToolsetGenerate( "\$(LIBDIR)/${lib}.dep" );
-
 
743
        ToolsetGenerate( "\$(LIBDIR)/${lib}.map" );
741
        ToolsetGenerate( "\$(LIBDIR)/${lib}.map" );
744
        ToolsetGenerate( "\$(LIBDIR)/${lib}.exp" );
742
        ToolsetGenerate( "\$(LIBDIR)/${lib}.exp" );
745
        ToolsetGenerate( "\$(LIBDIR)/${lib}.ilk" );
743
        ToolsetGenerate( "\$(LIBDIR)/${lib}.ilk" );
746
        ToolsetGenerate( "\$(LIBDIR)/${full}" );
744
        ToolsetGenerate( "\$(LIBDIR)/${full}" );
747
        ToolsetGenerate( "\$(LIBDIR)/${full}.manifest" ) if $toolset_info->{'GenManifest'};
745
        ToolsetGenerate( "\$(LIBDIR)/${full}.manifest" ) if $toolset_info->{'GenManifest'};
Line 858... Line 856...
858
        PackageShlibAddFiles( $base, "\$(LIBDIR)/${full}" );
856
        PackageShlibAddFiles( $base, "\$(LIBDIR)/${full}" );
859
 
857
 
860
        #
858
        #
861
        #   Generate Shared Library dependency information
859
        #   Generate Shared Library dependency information
862
        #
860
        #
863
        $io->SHLDDEPEND( $lib, $name, $lib );   # std SHLDDEPEND rules
861
        my $dep = $io->SetShldTarget( $lib );
864
 
862
 
865
        #
863
        #
866
        #   Generate rules and recipes to create the body of the shared
864
        #   Generate rules and recipes to create the body of the shared
867
        #   library. Several build variables are overiden when creating
865
        #   library. Several build variables are overiden when creating
868
        #   a shared library.
866
        #   a shared library.
Line 872... Line 870...
872
        $io->Prt( "\$(LIBDIR)/${full}:\tCFLAGS+=\$(SHCFLAGS)\n" );
870
        $io->Prt( "\$(LIBDIR)/${full}:\tCFLAGS+=\$(SHCFLAGS)\n" );
873
        $io->Prt( "\$(LIBDIR)/${full}:\tCXXLAGS+=\$(SHCXXFLAGS)\n" );
871
        $io->Prt( "\$(LIBDIR)/${full}:\tCXXLAGS+=\$(SHCXXFLAGS)\n" );
874
        $io->Prt( "\$(LIBDIR)/${full}:\t$export_file\n" ) if ($export_file );
872
        $io->Prt( "\$(LIBDIR)/${full}:\t$export_file\n" ) if ($export_file );
875
        $io->Prt( "\$(LIBDIR)/${full}:\t$res\n" ) if ( $res );
873
        $io->Prt( "\$(LIBDIR)/${full}:\t$res\n" ) if ( $res );
876
 
874
 
877
        $io->Entry( "\$(LIBDIR)/${full}: \$(LIBDIR)/${lib}.dep \\\n\t\t\$(OBJDIR)/${base}",
875
        $io->Entry( "\$(LIBDIR)/${full}: $dep \\\n\t\t\$(OBJDIR)/${base}",
878
            "", " \\\n\t\t", ".$::o", @$pObjs );
876
            "", " \\\n\t\t", ".$::o", @$pObjs );
879
 
877
 
880
        $io->Prt( " \\\n\t\t$def" ) if ( $link_with_def );
878
        $io->Prt( " \\\n\t\t$def" ) if ( $link_with_def );
881
        $io->Prt( "\n\t\$(SHLD)\n" );
879
        $io->Prt( "\n\t\$(SHLD)\n" );
882
 
880
 
Line 914... Line 912...
914
        $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
912
        $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );
915
 
913
 
916
        $io->Newline();
914
        $io->Newline();
917
 
915
 
918
        #.. Dependency link,
916
        #.. Dependency link,
-
 
917
        #   Create a library dependency file
-
 
918
        #       Create command file to build applicaton dependency list
-
 
919
        #       from the list of dependent libraries
919
        #
920
        #
920
        #       Now piece together a variable $(name_dp) which ends up in
921
        #       Create makefile directives to include the dependency
921
        #       the command file building the application dependency list.
922
        #       list into the makefile.
922
        #
923
        #
923
        $io->SetTag( "${lib}_shdp" );          # command tag
-
 
924
 
-
 
925
        $io->DepRules( $name, $pLibs,           # library depends rules
-
 
926
            \&ToolsetLibRecipe, "\$(LIBDIR)/${full}" );
924
        $io->DepRules( $pLibs, \&ToolsetLibRecipe, "\$(LIBDIR)/${full}" );
927
 
-
 
928
        $io->Newline();
925
        $io->SHLDDEPEND( $name, $lib );
929
    }
926
    }
930
 
927
 
931
    ToolsetLibStd( $pLibs )                    # push standard libraries
928
    ToolsetLibStd( $pLibs )                    # push standard libraries
932
        unless ( $noaddlibs );
929
        unless ( $noaddlibs );
933
 
930
 
Line 1038... Line 1035...
1038
#
1035
#
1039
    my $base = "\$(BINDIR)/${name}";
1036
    my $base = "\$(BINDIR)/${name}";
1040
    my $full = $base . $::exe;
1037
    my $full = $base . $::exe;
1041
    my $map  = $base . '.map';
1038
    my $map  = $base . '.map';
1042
    my $pdb  = $base . '.pdb';
1039
    my $pdb  = $base . '.pdb';
1043
    my $dep  = $base . '.dep';
-
 
1044
 
1040
 
1045
 
1041
 
1046
#.. Cleanup rules
1042
#.. Cleanup rules
1047
#
1043
#
1048
#   dep             Dependency file
-
 
1049
#   ld              Linker command file
1044
#   ld              Linker command file
1050
#   map             Map file
1045
#   map             Map file
1051
#   pdb             Microsoft C/C++ program database
1046
#   pdb             Microsoft C/C++ program database
1052
#   ilk             Microsoft Linker Database
1047
#   ilk             Microsoft Linker Database
1053
#   res             Compiled resource script
1048
#   res             Compiled resource script
1054
#   exe.manifest    Manifest file (VS2005)
1049
#   exe.manifest    Manifest file (VS2005)
1055
#
1050
#
1056
    ToolsetGenerate( $dep );
-
 
1057
    ToolsetGenerate( $map );
1051
    ToolsetGenerate( $map );
1058
    ToolsetGenerate( $pdb );
1052
    ToolsetGenerate( $pdb );
1059
    ToolsetGenerate( $base . '.ld' );
1053
    ToolsetGenerate( $base . '.ld' );
1060
    ToolsetGenerate( $base . '.ilk' );
1054
    ToolsetGenerate( $base . '.ilk' );
1061
    ToolsetGenerate( $full . '.manifest' ) if $toolset_info->{'GenManifest'};
1055
    ToolsetGenerate( $full . '.manifest' ) if $toolset_info->{'GenManifest'};
1062
 
1056
 
1063
#.. Linker command
1057
#.. Toolset Printer
1064
#
1058
#
1065
    my ($io) = ToolsetPrinter::New();
1059
    my ($io) = ToolsetPrinter::New();
-
 
1060
    my $dep = $io->SetLdTarget( $name );
1066
 
1061
 
-
 
1062
#.. Linker command
-
 
1063
#
1067
    $io->Prt( "$full : $dep " );
1064
    $io->Prt( "$full : $dep " );
1068
    $io->Entry( "", "", "\\\n\t", ".$::o ", @$pObjs );
1065
    $io->Entry( "", "", "\\\n\t", ".$::o ", @$pObjs );
1069
    $io->Prt( "\\\n\t$res " ) if ( $res );
1066
    $io->Prt( "\\\n\t$res " ) if ( $res );
1070
    $io->Prt( "\n\t\$(LD)\n\n" );
1067
    $io->Prt( "\n\t\$(LD)\n\n" );
1071
 
1068
 
Line 1092... Line 1089...
1092
    ToolsetLibStd( $pLibs ) unless ( $noaddlibs );      # push standard libraries
1089
    ToolsetLibStd( $pLibs ) unless ( $noaddlibs );      # push standard libraries
1093
    $io->ObjList( $name, $pObjs, \&ToolsetObjRecipe );  # object list
1090
    $io->ObjList( $name, $pObjs, \&ToolsetObjRecipe );  # object list
1094
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );  # library list
1091
    $io->LibList( $name, $pLibs, \&ToolsetLibRecipe );  # library list
1095
    $io->Newline();
1092
    $io->Newline();
1096
 
1093
 
1097
#.. Library dependency information
1094
    #.. Dependency link,
1098
#   Rules to include a .dep file when required
1095
    #   Create a library dependency file
1099
#
-
 
1100
    $io->LDDEPEND( $name );
1096
    #       Create command file to build applicaton dependency list
1101
 
-
 
1102
#.. Dependencies
1097
    #       from the list of dependent libraries
1103
#
1098
    #
1104
#       Now piece together a variable $(name_dp) which ends up in
1099
    #       Create makefile directives to include the dependency
1105
#       the command file building the application dependency list.
1100
    #       list into the makefile.
1106
#
1101
    #
1107
    $io->SetTag( "${name}_dp" );                                # macro tag
-
 
1108
    $io->DepRules( $name, $pLibs, \&ToolsetLibRecipe, $full );  # library depends rules
1102
    $io->DepRules( $pLibs, \&ToolsetLibRecipe, $full );
1109
    $io->Newline();
1103
    $io->LDDEPEND();
1110
 
1104
 
1111
#.. Compile up the resource file
1105
#.. Compile up the resource file
1112
#
1106
#
1113
    ToolsetRCrecipe( $res, @reslist )
1107
    ToolsetRCrecipe( $res, @reslist )
1114
        if ( $res );
1108
        if ( $res );
1115
 
1109
 
1116
#.. Package up the program and the PDB
1110
#.. Package up the PDB file with the program
1117
#
1111
#
1118
    PackageProgAddFiles ( $name, $full );
1112
    PackageProgAddFiles ( $name, $full );
1119
    PackageProgAddFiles ( $name, $pdb, "Class=debug" ) unless ( $no_pdb );
1113
    PackageProgAddFiles ( $name, $pdb, "Class=debug" ) unless ( $no_pdb );
1120
 
1114
 
1121
#
1115
#