diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-10-21 20:15:23 +0300 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-10-21 14:12:10 +0000 |
commit | ed76c0e43f6496020fbf49e22ea9651b31346e91 (patch) | |
tree | dfb2d6e7605023979056f995918fc79f131e4ccf /symbian/config.pl | |
parent | 4ef2275c8517a5b084d75f6179d5b49f77f76d2c (diff) | |
download | perl-ed76c0e43f6496020fbf49e22ea9651b31346e91.tar.gz |
Symbian/beginnings of Series 80 support
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F24E7A67E@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@25814
Diffstat (limited to 'symbian/config.pl')
-rw-r--r-- | symbian/config.pl | 194 |
1 files changed, 125 insertions, 69 deletions
diff --git a/symbian/config.pl b/symbian/config.pl index 21e9b2826c..b45e84dd1f 100644 --- a/symbian/config.pl +++ b/symbian/config.pl @@ -19,36 +19,38 @@ printf "Configuring for: Perl version $VERSION{REVISION}.%03d%03d\n", my $VERSION = "$VERSION{REVISION}$VERSION{VERSION}$VERSION{SUBVERSION}"; my $R_V_SV = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}"; -my $SDK = do "sdk.pl"; +my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) = + @{ do "sdk.pl" }; my %PORT = %{ do "port.pl" }; -my ( $SYMBIAN_VERSION, $SDK_VERSION ) = ( $SDK =~ m!\\Symbian\\(.+?)\\(.+)$! ); - -if ($SDK eq 'C:\Symbian\Series60_1_2_CW') { +if ($SYMBIAN_ROOT eq 'C:\Symbian\Series60_1_2_CW') { ( $SYMBIAN_VERSION, $SDK_VERSION ) = qw(6.1 1.2); } my $WIN = $ENV{WIN} ; # 'wins', 'winscw' (from sdk.pl) -my $ARM = 'thumb'; # 'thumb', 'armi' +my $ARM = 'thumb'; # 'thumb', 'armv5' my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (from sdk.pl) +my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl) my $UREL = $ENV{UREL}; # from sdk.pl $UREL =~ s/-ARM-/$ARM/; my $UARM = $ENV{UARM}; # from sdk.pl die "$0: SDK not recognized\n" - if !defined($SYMBIAN_VERSION) || !defined($SDK_VERSION) || !defined($S60SDK); + if !defined($SYMBIAN_VERSION) || + !defined($SDK_VERSION) || + (!defined($S60SDK) && !defined($S80SDK)); die "$0: does not know which Windows compiler to use\n" unless defined $WIN; -print "Symbian $SYMBIAN_VERSION SDK $S60SDK ($WIN) installed at $SDK\n"; +print "Symbian $SYMBIAN_VERSION SDK $SDK_VARIANT $SDK_VERSION ($WIN) installed at $SYMBIAN_ROOT\n"; my $CWD = do "cwd.pl"; print "Build directory $CWD\n"; -die "$0: '+' in cwd does not work with SDK 1.2\n" - if $S60SDK eq '1.2' && $CWD =~ /\+/; +die "$0: '+' in cwd does not work with Series 60 SDK 1.2\n" + if defined $S60SDK && $S60SDK eq '1.2' && $CWD =~ /\+/; my @unclean; my @mmp; @@ -73,8 +75,16 @@ EPOCSTACKSIZE 65536 EXPORTUNFROZEN SRCDBG __EOF__ - print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./; - print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./; + if ($SDK_VARIANT eq 'S60') { + print $fh "MACRO\t__SERIES60__\n"; + print $fh "MACRO\t__SERIES60_1X__\n" if $S60SDK =~ /^1\./; + print $fh "MACRO\t__SERIES60_2X__\n" if $S60SDK =~ /^2\./; + } + if ($SDK_VARIANT eq 'S80') { + print $fh "MACRO\t__SERIES80__\n"; + print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./; + print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./; + } my ( @c, %c ); @c = map { glob } qw(*.c); # Find the .c files. @c = map { lc } @c; # Lowercase the names. @@ -229,8 +239,15 @@ q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\Dy sub create_symbian_port_h { print "\tsymbian\\symbian_port.h\n"; if ( open( SYMBIAN_PORT_H, ">symbian/symbian_port.h" ) ) { - $S60SDK =~ /^(\d+)\.(\d+)$/; - my ($sdkmajor, $sdkminor) = ($1, $2); + my ($sdkmajor, $sdkminor); + if ($SDK_VARIANT eq 'S60') { + $S60SDK =~ /^(\d+)\.(\d+)$/; + ($sdkmajor, $sdkminor) = ($1, $2); + } + if ($SDK_VARIANT eq 'S80') { + $S80SDK =~ /^(\d+)\.(\d+)$/; + ($sdkmajor, $sdkminor) = ($1, $2); + } print SYMBIAN_PORT_H <<__EOF__; /* Copyright (c) 2004-2005, Nokia. All rights reserved. */ @@ -241,7 +258,7 @@ sub create_symbian_port_h { #define PERL_SYMBIANPORT_MINOR $PORT{dll}->{MINOR} #define PERL_SYMBIANPORT_PATCH $PORT{dll}->{PATCH} -#define PERL_SYMBIANSDK_FLAVOR L"Series 60" +#define PERL_SYMBIANSDK_FLAVOR L"$SDK_VARIANT" #define PERL_SYMBIANSDK_MAJOR $sdkmajor #define PERL_SYMBIANSDK_MINOR $sdkminor @@ -267,10 +284,18 @@ q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print;print qq sub create_PerlApp_pkg { print "\tsymbian\\PerlApp.pkg\n"; if ( open( PERLAPP_PKG, ">symbian\\PerlApp.pkg" ) ) { + my $ProductId = + defined $S60SDK ? +qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] : + defined $S80SDK ? +qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] : + ";Supports Series NN"; my $APPS = $UREL; - if ($S60SDK ne '1.2' || $SDK =~ m/_CW$/) { # Do only if not in 1.2 VC. + if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK) { # Do only if not in S60 1.2 VC. $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i; } + # In S60 3.0 there will be no more recognizers. + my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";]; print PERLAPP_PKG <<__EOF__; ; !!!!!! DO NOT EDIT THIS FILE !!!!!! ; This file is built by symbian\\config.pl. @@ -286,12 +311,11 @@ sub create_PerlApp_pkg { ; Standard SIS file header #{"PerlApp"},(0x102015F6),0,2,0 -; Supports Series 60 v0.9 -(0x101F6F88), 0, 0, 0, {"Series60ProductID"} +$ProductId ; Files "$UREL\\PerlApp.APP"-"!:\\system\\apps\\PerlApp\\PerlApp.app" -"$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl" +$mdl "$APPS\\PerlApp.rsc"-"!:\\system\\apps\\PerlApp\\PerlApp.rsc" "$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif" __EOF__ @@ -343,8 +367,26 @@ create_PerlApp_pkg(); if ( open( PERLAPP_MMP, ">symbian/PerlApp.mmp" ) ) { my @MACRO; - push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./; - push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./; + my @LIB; + if (defined $S60SDK) { + push @MACRO, '__SERIES60__'; + push @MACRO, '__SERIES60_1X__' if $S60SDK =~ /^1\./; + push @MACRO, '__SERIES60_2X__' if $S60SDK =~ /^2\./; + push @LIB, <<__EOF__; +LIBRARY avkon.lib +LIBRARY commondialogs.lib +__EOF__ + } + if (defined $S80SDK) { + push @MACRO, '__SERIES80__'; + push @MACRO, '__SERIES80_1X__' if $S80SDK =~ /^1\./; + push @MACRO, '__SERIES80_2X__' if $S80SDK =~ /^2\./; + push @LIB, <<__EOF__; +LIBRARY eikctl.lib +LIBRARY eikcoctl.lib +LIBRARY ckndlg.lib +__EOF__ + } print PERLAPP_MMP <<__EOF__; // !!!!!! DO NOT EDIT THIS FILE !!!!!! // This file is built by symbian\\config.pl. @@ -368,16 +410,15 @@ SYSTEMINCLUDE \\epoc32\\include SYSTEMINCLUDE \\epoc32\\include\\libc LIBRARY apparc.lib -LIBRARY avkon.lib LIBRARY bafl.lib LIBRARY charconv.lib -LIBRARY commondialogs.lib LIBRARY cone.lib LIBRARY efsrv.lib LIBRARY eikcore.lib LIBRARY estlib.lib LIBRARY euser.lib LIBRARY perl$VERSION.lib +@LIB AIF PerlApp.aif . PerlAppAif.rss __EOF__ @@ -397,9 +438,9 @@ else { if ( open( MAKEFILE, ">Makefile" ) ) { my $perl = "perl$VERSION"; - my $windef1 = "$SDK\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def"; + my $windef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$WIN\\$perl.def"; my $windef2 = "..\\BWINS\\${perl}u.def"; - my $armdef1 = "$SDK\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def"; + my $armdef1 = "$SYMBIAN_ROOT\\Epoc32\\Build$CWD\\$perl\\$ARM\\$perl.def"; my $armdef2 = "..\\BMARM\\${perl}u.def"; print "\tMakefile\n"; print MAKEFILE <<__EOF__; @@ -414,48 +455,50 @@ ARM = ${ARM} all: build -build: rename_makedef build_win build_arm +build: rename_makedef build_${WIN} build_arm @unclean: symbian\\config.pl perl symbian\\config.pl -build_win: abld.bat win_perl.mf win_miniperl.mf win_${VERSION}.mf perldll_win +build_${WIN}: abld.bat ${WIN}_perl.mf ${WIN}_miniperl.mf ${WIN}_${VERSION}.mf perldll_${WIN} + +build_vc6: abld.bat ${WIN}_perl.mf ${WIN}_miniperl.mf ${WIN}_${VERSION}.mf vc6.mf perldll_wins -build_vc6: abld.bat win_perl.mf win_miniperl.mf win_${VERSION}.mf vc6.mf perldll_win +build_cw: abld.bat ${WIN}_perl.mf ${WIN}_miniperl.mf ${WIN}_${VERSION}.mf cw.mf perldll_winscw build_arm: abld.bat perl_arm miniperl_arm arm_${VERSION}.mf perldll_arm -miniperl_win: miniperl.mmp abld.bat win_miniperl.mf rename_makedef - abld build \$(WIN) udeb miniperl +miniperl_win miniperl_${WIN}: miniperl.mmp abld.bat ${WIN}_miniperl.mf rename_makedef + abld build ${WIN} udeb miniperl miniperl_arm: miniperl.mmp abld.bat arm_miniperl.mf rename_makedef abld build \$(ARM) $UARM miniperl -miniperl: miniperl_win miniperl_arm +miniperl: miniperl_${WIN} miniperl_arm -perl: perl_win perl_arm +perl: perl_${WIN} perl_arm -perl_win: perl.mmp abld.bat win_perl.mf rename_makedef - abld build \$(WIN) perl +perl_win perl_${WIN}: perl.mmp abld.bat ${WIN}_perl.mf rename_makedef + abld build ${WIN} perl perl_arm: perl.mmp abld.bat arm_perl.mf rename_makedef abld build \$(ARM) $UARM perl -perldll_win: perl${VERSION}_win freeze_win perl${VERSION}_win +perldll_win perldll_${WIN}: perl${VERSION}_${WIN} freeze_${WIN} perl${VERSION}_${WIN} -perl${VERSION}_win: perl$VERSION.mmp abld.bat rename_makedef - abld build \$(WIN) perl$VERSION +perl${VERSION}_win perl${VERSION}_${WIN}: perl$VERSION.mmp abld.bat rename_makedef + abld build ${WIN} perl$VERSION perldll_arm: perl${VERSION}_arm freeze_arm perl${VERSION}_arm perl${VERSION}_arm: perl$VERSION.mmp arm_${VERSION}.mf abld.bat rename_makedef abld build \$(ARM) $UARM perl$VERSION -perldll perl$VERSION: perldll_win perldll_arm +perldll perl$VERSION: perldll_${WIN} perldll_arm -win: miniperl_win perl_win perldll_win +win ${WIN}: miniperl_${WIN} perl_${WIN} perldll_${WIN} -arm: miniperl_arm perl_arm perldll_arm +thumb arm: miniperl_arm perl_arm perldll_arm rename_makedef: -ren makedef.pl nomakedef.pl @@ -468,26 +511,28 @@ rerename_makedef: abld.bat abld: bld.inf bldmake bldfiles -makefiles: win.mf arm.mf vc6.mf +makefiles: win.mf arm.mf vc6.mf cw.mf vc6: win.mf vc6.mf build_vc6 -win_miniperl.mf: abld.bat symbian\\config.pl - abld makefile \$(WIN) miniperl - echo > win_miniperl.mf +cw: win.mf cw.mf build_cw -win_perl.mf: abld.bat symbian\\config.pl - abld makefile \$(WIN) perl - echo > win_perl.mf +${WIN}_miniperl.mf: abld.bat symbian\\config.pl + abld makefile ${WIN} miniperl + echo > ${WIN}_miniperl.mf -win_${VERSION}.mf: abld.bat symbian\\config.pl - abld makefile \$(WIN) perl${VERSION} - echo > win_${VERSION}.mf +${WIN}_perl.mf: abld.bat symbian\\config.pl + abld makefile ${WIN} perl + echo > ${WIN}_perl.mf -symbian\\win.mf: - cd symbian; make win.mf +${WIN}_${VERSION}.mf: abld.bat symbian\\config.pl + abld makefile ${WIN} perl${VERSION} + echo > ${WIN}_${VERSION}.mf -win.mf: win_miniperl.mf win_perl.mf win_${VERSION}.mf symbian\\win.mf +symbian\\${WIN}.mf: + cd symbian; make ${WIN}.mf + +${WIN}.mf: ${WIN}_miniperl.mf ${WIN}_perl.mf ${WIN}_${VERSION}.mf symbian\\${WIN}.mf arm_miniperl.mf: abld.bat symbian\\config.pl abld makefile \$(ARM) miniperl @@ -503,10 +548,17 @@ arm_${VERSION}.mf: abld.bat symbian\\config.pl arm.mf: arm_miniperl.mf arm_perl.mf arm_${VERSION}.mf +win.mf: vc6.mf cw.mf + echo > win.mf + vc6.mf: abld.bat symbian\\config.pl abld makefile vc6 echo > vc6.mf +cw.mf: abld.bat symbian\\config.pl + abld makefile cw_ide + echo > cw.mf + PM = lib\\Config.pm lib\\Cross.pm lib\\lib.pm ext\\DynaLoader\\DynaLoader.pm ext\\DynaLoader\\XSLoader.pm ext\\Errno\\Errno.pm POD = lib\\Config.pod @@ -601,7 +653,7 @@ sdkinstall: copy /y symbian\\PerlBase.pod \$(APIDIR)\\pod copy /y symbian\\PerlUtil.pod \$(APIDIR)\\pod -RELDIR = $SDK\\epoc32\\release +RELDIR = $SYMBIAN_ROOT\\epoc32\\release RELWIN = \$(RELDIR)\\\$(WIN)\\udeb RELARM = \$(RELDIR)\\\$(ARM)\\$UARM SDKZIP = perl${VERSION}sdk.zip @@ -620,10 +672,10 @@ perl${VERSION}dist.zip perldist.zip: \$(ALLSIS) \$(SDKZIP) \$(ETC) -del /f perl${VERSION}dist.zip zip -r perl${VERSION}dist.zip \$(ALLSIS) \$(SDKZIP) \$(ETC) -perlapp: sdkinstall perlapp_win perlapp_arm +perlapp: sdkinstall perlapp_${WIN} perlapp_arm -perlapp_win: config.h - cd symbian; make perlapp_win +perlapp_win perlapp_${WIN}: config.h + cd symbian; make perlapp_${WIN} perlapp_arm: config.h cd symbian; make perlapp_arm @@ -639,17 +691,17 @@ perlapp.zip: zip: perlsdk.zip perlapp.zip -freeze: freeze_win freeze_arm +freeze: freeze_${WIN} freeze_arm -freeze_win: - abld freeze \$(WIN) perl$VERSION +freeze_${WIN}: + abld freeze ${WIN} perl$VERSION freeze_arm: abld freeze \$(ARM) perl$VERSION -defrost: defrost_win defrost_arm +defrost: defrost_${WIN} defrost_arm -defrost_win: +defrost_${WIN}: -del /f $windef1 -del /f $windef2 @@ -657,13 +709,13 @@ defrost_arm: -del /f $armdef1 -del /f $armdef2 -clean_win: abld.bat - abld clean \$(WIN) +clean_${WIN}: abld.bat + abld clean ${WIN} clean_arm: abld.bat abld clean \$(ARM) -clean: clean_win clean_arm rerename_makedef +clean: clean_${WIN} clean_arm rerename_makedef -del /f \$(PM) -del /f \$(POD) -del /f lib\\Config.pm.bak @@ -677,7 +729,8 @@ clean: clean_win clean_arm rerename_makedef -del /f abld.bat @unclean *.pkg *.sis *.zip -del /f symbian\\abld.bat symbian\\*.sis symbian\\*.zip -del /f symbian\\perl5*.pkg symbian\\miniperl.pkg - -del arm_*.mf win_*.mf vc6*.mf + -del /f symbian\\PerlApp.rss + -del arm_*.mf ${WIN}_*.mf vc6*.mf cw*.mf -perl symbian\\xsbuild.pl \$(XSBOPT) --clean \$(EXT) -rmdir /s /q perl${VERSION}_Data -cd symbian; make clean @@ -703,7 +756,7 @@ else { } if ( open( MAKEFILE, ">symbian/Makefile")) { - my $wrap = $S60SDK eq '1.2' && $SDK !~ /_CW$/; + my $wrap = defined $S60SDK && $S60SDK eq '1.2' && $WIN ne '${WIN}cw'; my $ABLD = $wrap ? 'perl b.pl': 'abld'; print "\tsymbian/Makefile\n"; print MAKEFILE <<__EOF__; @@ -714,17 +767,20 @@ ABLD = $ABLD abld.bat: bldmake bldfiles -perlapp_win: abld.bat ..\\config.h PerlApp.h PerlApp.cpp +perlapp_${WIN}: abld.bat ..\\config.h PerlApp.h PerlApp.cpp bldmake bldfiles - \$(ABLD) build \$(WIN) udeb + copy PerlApp$SDK_VARIANT.rss PerlApp.rss + \$(ABLD) build ${WIN} udeb perlapp_arm: ..\\config.h PerlApp.h PerlApp.cpp bldmake bldfiles - \$(ABLD) build \$(ARM) $UARM + copy PerlApp$SDK_VARIANT.rss PerlApp.rss + \$(ABLD) build ${ARM} $UARM win.mf: bldmake bldfiles abld makefile vc6 + abld makefile cw_ide perlapp_demo_extract: perl demo_pl extract |