diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-04-18 16:18:30 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-04-21 15:38:30 +0000 |
commit | 27da23d53ccce622bc51822f59df8def79b4df95 (patch) | |
tree | 1202440e0fbf7a2fc1bb54993d11cda7b245f1b4 /symbian/sdk.pl | |
parent | ec0624293b57ae07d6b2c32bae099d4f163e7e07 (diff) | |
download | perl-27da23d53ccce622bc51822f59df8def79b4df95.tar.gz |
Symbian port of Perl
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F2453D653@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@24271
Diffstat (limited to 'symbian/sdk.pl')
-rw-r--r-- | symbian/sdk.pl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/symbian/sdk.pl b/symbian/sdk.pl new file mode 100644 index 0000000000..1dc4d2f552 --- /dev/null +++ b/symbian/sdk.pl @@ -0,0 +1,48 @@ +use strict; + +my $SDK; +my $WIN; + +if ($ENV{PATH} =~ m!\\Symbian\\(.+?)\\gcc\\bin!) { + my $cc = $1; + $WIN = $cc =~ m!_CW!i ? 'winscw' : 'wins'; + $ENV{WIN} = $WIN; + if ($cc =~ m!Series60_v20!) { + $ENV{S60SDK} = '2.0'; + } elsif ($cc =~ m!Series60_v21!) { + $ENV{S60SDK} = '2.1'; + } elsif ($cc =~ m!S60_2nd_FP2!) { + $ENV{S60SDK} = '2.6'; + } +} + +if (open(GCC, "gcc -v 2>&1|")) { + while (<GCC>) { + if (/Reading specs from ((?:C:)?\\Symbian.+?)\\Epoc32\\/i) { + $SDK = $1; + # The S60SDK tells the Series 60 SDK version. + if ($SDK eq 'C:\Symbian\6.1\Shared') { # Visual C. + $SDK = 'C:\Symbian\6.1\Series60'; + $ENV{S60SDK} = '1.2'; + } elsif ($SDK eq 'C:\Symbian\Series60_1_2_CW') { # CodeWarrior. + $ENV{S60SDK} = '1.2'; + } + last; + } + } + close GCC; +} else { + die "$0: failed to run gcc: $!\n"; +} + +my $UARM = $ENV{UARM} ? $ENV{UARM} : "urel"; +my $UREL = "$SDK\\epoc32\\release\\-ARM-\\$UARM"; +if ($SDK eq 'C:\Symbian\6.1\Series60' && $ENV{WIN} eq 'winscw') { + $UREL = "C:\\Symbian\\Series60_1_2_CW\\epoc32\\release\\-ARM-\\urel"; +} +$ENV{UREL} = $UREL; +$ENV{UARM} = $UARM; + +die "$0: failed to locate the Symbian SDK\n" unless defined $SDK; + +$SDK; |