bintools/elftools/deputil.pl
changeset 0 044383f39525
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 #
       
     2 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the License "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description: 
       
    15 #
       
    16 
       
    17 use FindBin;		# for FindBin::Bin
       
    18 use Getopt::Long;
       
    19 
       
    20 # establish the path to the Perl binaries
       
    21 BEGIN {
       
    22 	require 5.005_03;				# check user has a version of perl that will cope
       
    23 	$PerlBinPath = $FindBin::Bin;	# X:/epoc32/tools
       
    24 	$PerlBinPath =~ s/\//\\/g;		# X:\epoc32\tools
       
    25 }
       
    26 use lib $PerlBinPath;
       
    27 
       
    28 use DepUtil;
       
    29 use Armutl;
       
    30 
       
    31 
       
    32 my %opts = ();
       
    33 
       
    34 my $result = GetOptions(\%opts,
       
    35 						"inter",
       
    36 						"path:s",
       
    37 						"libpath:s",
       
    38 						"out:s",
       
    39 						"verbose"
       
    40 						);
       
    41 my $gPath = $opts{"path"};
       
    42 my $glibPath = $opts{"libpath"};
       
    43 my $gOutFile = $opts{"out"};
       
    44 my $gVerbose = $opts{"verbose"};
       
    45 my @libs;
       
    46 my $lib;
       
    47 my $aCnt = 0;
       
    48 while($ARGV[$aCnt]){
       
    49 	push @libs, $ARGV[$aCnt++];
       
    50 }
       
    51 my $oP = '--';
       
    52 $oP = '-' if (Armutl_RVCTMajorVersion() == 2 && Armutl_RVCTMinorVersion() < 2);
       
    53 my $interworkingp = $opts{"inter"};
       
    54 my $interworking = "${oP}apcs /nointer";
       
    55 $interworking = "${oP}apcs /inter" if ($interworkingp);
       
    56 
       
    57 &GenDependencies($interworking, $gOutFile, $gPath, $glibPath, \@libs, $gVerbose);