Subversion Repositories DevTools

Rev

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

Rev 323 Rev 335
Line 956... Line 956...
956
{
956
{
957
    my ( $io, $dir, $suf, $otype, $kind, $data_base, $code_base, $eObjs ) = @_;
957
    my ( $io, $dir, $suf, $otype, $kind, $data_base, $code_base, $eObjs ) = @_;
958
    my $name  = $io->{'name'};
958
    my $name  = $io->{'name'};
959
    my $pLibs = $io->{'pLibs'};
959
    my $pLibs = $io->{'pLibs'};
960
    my $pSlibs = $io->{'sLibs'};
960
    my $pSlibs = $io->{'sLibs'};
-
 
961
    my $lib = $name . $suf;
961
 
962
 
962
    #
963
    #
963
    #   Generate a full list of object files
964
    #   Generate a full list of object files
964
    #
965
    #
965
    my @allObjs = @{$io->{'pObjs'}};
966
    my @allObjs = @{$io->{'pObjs'}};
Line 970... Line 971...
970
#.. Linker command file
971
#.. Linker command file
971
#
972
#
972
#   Piecing together a variable $(name_ld) which ends up in the command file.
973
#   Piecing together a variable $(name_ld) which ends up in the command file.
973
#   This bit of magic will be performed by the LDABS recipe
974
#   This bit of magic will be performed by the LDABS recipe
974
#
975
#
975
#
-
 
-
 
976
    $io->Reset();                                   # Reset internal state
976
    $io->SetTag( "${name}${suf}_shld" );                  # macro tag
977
    $io->SetTag( "${lib}_shld" );                   # macro tag
977
    $io->Label( "Linker commands", $name . $suf );      # label
978
    $io->Label( "Linker commands", $lib );          # label
978
 
979
 
979
    $io->Cmd("FORMAT      $otype" );
980
    $io->Cmd("FORMAT      $otype" );
980
    $io->Cmd("CHIP	    \$(mri_cpu_type)" );
981
    $io->Cmd("CHIP	    \$(mri_cpu_type)" );
981
    $io->Cmd("LISTMAP     CROSSREF,INTERNALS,PUBLICS" );
982
    $io->Cmd("LISTMAP     CROSSREF,INTERNALS,PUBLICS" );
982
 
983
 
Line 1056... Line 1057...
1056
    $io->Cmd("LISTMAP	LENGTH 64");
1057
    $io->Cmd("LISTMAP	LENGTH 64");
1057
    $io->Cmd("LISTMAP	CROSSREF,INTERNALS,PUBLICS/by_addr");
1058
    $io->Cmd("LISTMAP	CROSSREF,INTERNALS,PUBLICS/by_addr");
1058
    $io->Cmd("END");
1059
    $io->Cmd("END");
1059
    $io->Newline();
1060
    $io->Newline();
1060
 
1061
 
-
 
1062
    #
-
 
1063
    #   Create the shared library dependency information
-
 
1064
    #
-
 
1065
    my $dep = $io->SetShldTarget( $lib, $dir );
1061
 
1066
 
1062
    #
1067
    #
1063
    #   Create the rules and recipes to create the required file
1068
    #   Create the rules and recipes to create the required file
1064
    #
1069
    #
1065
    $io->Prt( "\$($dir)/${name}${suf}.abs:\tSHBASE=${name}${suf}\n" );
1070
    $io->Prt( "\$($dir)/$lib.abs:\tSHBASE=${name}${suf}\n" );
1066
    $io->Prt( "\$($dir)/${name}${suf}.abs:\tSHNAME=${name}${suf}\n" );
1071
    $io->Prt( "\$($dir)/$lib.abs:\tSHNAME=${name}${suf}\n" );
1067
    $io->Prt( "\$($dir)/${name}${suf}.abs : \$(SCM_MAKEFILE)" );
1072
    $io->Prt( "\$($dir)/$lib.abs:\t\$(SCM_MAKEFILE)" );
1068
    $io->Prt( "\\\n\t\t\$($dir)/${name}${suf}.dep " );
1073
    $io->Prt( "\\\n\t\t$dep " );
1069
    $io->Entry( "", "", "\\\n\t\t", ".$::o ", @allObjs );
1074
    $io->Entry( "", "", "\\\n\t\t", ".$::o ", @allObjs );
1070
    $io->Prt( "\\\n\t\t\$(OBJDIR)/${name}/head.$::o " );
1075
    $io->Prt( "\\\n\t\t\$(OBJDIR)/${name}/head.$::o " );
1071
    $io->Prt( "\n\t\$(SHLDABS)\n" );
1076
    $io->Prt( "\n\t\$(SHLDABS)\n" );
1072
    $io->Newline();
1077
    $io->Newline();
1073
 
1078
 
1074
 
1079
 
1075
    #.. Dependency link,
1080
    #.. Dependency link,
1076
    #
-
 
1077
    #       Now piece together a variable $(name_dp) which ends up in
1081
    #   Create a library dependency file
1078
    #       the command file building the application dependency list.
1082
    #       Create command file to build applicaton dependency list
-
 
1083
    #       from the list of dependent libraries
1079
    #
1084
    #
1080
    $io->SetTag( "${name}${suf}_shdp" );                # macro tag
-
 
1081
    $io->DepRules( $name.$suf, $pLibs,                  # library depends rules
1085
    #       Create makefile directives to include the dependency
1082
            \&ToolsetLibRecipe, "\$($dir)/${name}${suf}.abs" );
1086
    #       list into the makefile.
-
 
1087
    #
1083
    $io->DepRules( $name.$suf, $pSlibs,                  # library depends rules
1088
    $io->DepRules( $pLibs, \&ToolsetLibRecipe, "\$($dir)/$lib.abs" );
1084
            \&ToolsetLibRecipe, "\$($dir)/${name}${suf}.abs" );
1089
    $io->DepRules( $pSlibs,\&ToolsetLibRecipe, "\$($dir)/$lib.abs" );
1085
    $io->SHLDDEPEND( ${name}.${suf}, ${name}.${suf} ,${name}.${suf}, $dir );   # std LDDEPEND rules
1090
    $io->SHLDDEPEND( $lib, $lib );
1086
 
1091
 
1087
#.. Cleanup rules
1092
#.. Cleanup rules
1088
#
1093
#
1089
    ::ToolsetGenerate( "\$($dir)/${name}${suf}.ld" );
1094
    ::ToolsetGenerate( "\$($dir)/$lib.ld" );
1090
    ::ToolsetGenerate( "\$($dir)/${name}${suf}.abs" );
1095
    ::ToolsetGenerate( "\$($dir)/$lib.abs" );
1091
    ::ToolsetGenerate( "\$($dir)/${name}${suf}.map" );
1096
    ::ToolsetGenerate( "\$($dir)/$lib.map" );
1092
    ::ToolsetGenerate( "\$($dir)/${name}${suf}.dep" );
-
 
1093
 
1097
 
1094
}
1098
}
1095
 
1099
 
1096
########################################################################
1100
########################################################################
1097
#
1101
#