diff --git a/abld b/abld
new file mode 100644
index 0000000..e273bf3
--- /dev/null
+++ b/abld
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# abld - shell frontend for abld.pl, part of GnuPoc project
+#
+# (c) 2001-2002 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+#
+# note: small tweak to get symlinks working. 'pwd' returns the path as seen
+#       by `pwd` - but 'cwd' returns the real path, as used by the tool chain.
+#       this also works if no symlinks are used:
+#
+#       perl -S abld.pl `pwd`/ "$@"
+    
+perl -S abld.pl `perl -e 'use Cwd; my $cwd = cwd(); print "$cwd/"'` "$@"
diff --git a/abld.pl b/abld.pl
index b4c7c29..a858614 100644
--- a/abld.pl
+++ b/abld.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -24,14 +25,13 @@ BEGIN {
 	require 5.005_03;
 # establish the path to the Perl libraries: currently the same directory as this script
 	$PerlLibPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlLibPath =~ s/\//\\/g;	# X:\epoc32\tools
-	$PerlLibPath .= "\\";
+	$PerlLibPath .= "\/";
 }
 
 use lib $PerlLibPath;
-use E32env;
-use CheckSource;
-use FCLoggerUTL;
+use e32env;
+use checksource;
+use fcloggerutl;
 use featurevariantparser;
 
 if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
@@ -90,7 +90,7 @@ my %Commands=(
 	FREEZE=>{
 		program=>1,
 		remove=>1,
-		function=>'Freezes exported functions in a .DEF file',
+		function=>'Freezes exported functions in a .def file',
 	},
 	HELP=>{
 		noplatform=>1,
@@ -99,7 +99,7 @@ my %Commands=(
 	},
 	LIBRARY=>{
 		program=>1,
-		function=>'Creates import libraries from the frozen .DEF files',
+		function=>'Creates import libraries from the frozen .def files',
 	},
 	LISTING=>{
 		build=>1,
@@ -171,10 +171,10 @@ my $BldInfDir;
 my $PrjBldDir;
 BEGIN {
 	$BldInfDir=shift @ARGV;
-	$PrjBldDir=$E32env::Data{BldPath};
-	$PrjBldDir=~s-^(.*)\\-$1-o;
+	$PrjBldDir=$e32env::Data{BldPath};
+	$PrjBldDir=~s-^(.*)\/-$1-o;
 	$PrjBldDir.=$BldInfDir;
-	$PrjBldDir=~m-(.*)\\-o; # remove backslash because some old versions of perl can't cope
+	$PrjBldDir=~m-(.*)\/-o; # remove backslash because some old versions of perl can't cope
 	unless (-d $1) {
 		die "ABLD ERROR: Project Bldmake directory \"$PrjBldDir\" does not exist\n";
 	}
@@ -182,12 +182,12 @@ BEGIN {
 
 # check the platform module exists and then load it
 BEGIN {
-	unless (-e "${PrjBldDir}Platform.pm") {
-		die "ABLD ERROR: \"${PrjBldDir}Platform.pm\" not yet created\n";
+	unless (-e "${PrjBldDir}platform.pm") {
+		die "ABLD ERROR: \"${PrjBldDir}platform.pm\" not yet created\n";
 	}
 }
 use lib $PrjBldDir;
-use Platform;
+use platform;
 
 # change directory to the BLD.INF directory - we might begin to do
 # things with relative paths in the future.
@@ -360,12 +360,12 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 				}
 
 			COMPARAM1 : {
-				if (grep(/^$Plat$/, ('ALL', @Platform::Plats))) {
+				if (grep(/^$Plat$/i, ('ALL', @platform::Plats))) {
 					last COMPARAM1;
 				}
 				if ($Plat =~ /(.*)EDG$/) {
 				    my $SubPlat = $1;
-				    if (grep(/^$SubPlat$/, ('ALL', @Platform::Plats))) {
+				    if (grep(/^$SubPlat$/, ('ALL', @platform::Plats))) {
 					last COMPARAM1;
 				    }
 				}
@@ -381,8 +381,8 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 #				check whether the platform might in fact be a program, and
 #				set the platform, build and program accordingly if it is
 				if ($CommandHash{program}) {
-					if  (((not $Test) and grep /^$Plat$/, @{$Platform::Programs{ALL}})
-							or ($Test and grep /^$Plat$/, @{$Platform::TestPrograms{ALL}})) {
+					if  (((not $Test) and grep /^$Plat$/, @{$platform::Programs{ALL}})
+							or ($Test and grep /^$Plat$/, @{$platform::TestPrograms{ALL}})) {
 						$Program=$Plat;
 						$Plat='ALL';
 						$Bld='ALL';
@@ -449,8 +449,8 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 #					check whether the build might in fact be a program, and
 #					set the build and program if it is
 					if ($CommandHash{program}) {
-						if  (((not $Test) and grep /^$Bld$/, @{$Platform::Programs{$Plat}})
-								or ($Test and grep /^$Bld$/, @{$Platform::TestPrograms{$Plat}})) {
+						if  (((not $Test) and grep /^$Bld$/, @{$platform::Programs{$Plat}})
+								or ($Test and grep /^$Bld$/, @{$platform::TestPrograms{$Plat}})) {
 							$Program=$Bld;
 							$Bld='ALL';
 							last COMPARAM2;
@@ -480,13 +480,13 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 #	get the program parameter for those commands which require it
 	if ($CommandHash{program}) {
 		unless ($Program) {
-			unless ($Program=uc shift @ARGV) {
+			unless ($Program=shift @ARGV) {
 				$Program=''; #default - means ALL
 			}
 			else {
 #				check that the program is supported
-				unless (((not $Test) and grep /^$Program$/, @{$Platform::Programs{$Plat}})
-						or ($Test and grep /^$Program$/, @{$Platform::TestPrograms{$Plat}})) {
+				unless (((not $Test) and grep /^$Program$/, @{$platform::Programs{$Plat}})
+						or ($Test and grep /^$Program$/, @{$platform::TestPrograms{$Plat}})) {
 					my $Error="This project does not support $Test program \"$Program\"";
 					if ($Plat eq 'ALL') {
 						$Error.=" for any platform\n";
@@ -545,7 +545,7 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 	my @Plats;
 	unless ($CommandHash{noplatform}) {
 		if ($Plat eq 'ALL') {
-			@Plats=@Platform::RealPlats;
+			@Plats=@platform::RealPlats;
 #			Adjust the "ALL" list according to the availability of compilers
 			@Plats=grep !/WINSCW$/o, @Plats unless (defined $ENV{MWSym2Libraries});
 			@Plats=grep !/WINS$/o, @Plats unless (defined $ENV{MSDevDir});
@@ -598,9 +598,10 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 			}
 
 		foreach $Plat (@Plats) {
+			my $lcplat = lc $Plat;
 			foreach my $makefileVariation (@{$MakefileVariations{$Plat}}) {
-				unless (-e "$PrjBldDir$Plat$makefileVariation$Test.make") {
-					die "ABLD ERROR: \"$PrjBldDir$Plat$makefileVariation$Test.make\" not yet created\n";
+				unless (-e "$PrjBldDir$lcplat$makefileVariation$Test.make") {
+					die "ABLD ERROR: \"$PrjBldDir$lcplat$makefileVariation$Test.make\" not yet created\n";
 				}
 			}
 		}
@@ -613,7 +614,7 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 		@Commands=@{$CommandHash{subcommands}};
 		if ($Command eq 'BUILD') { # avoid makefile listings here
 			if ($Options{what} or $Options{check}) {
-				@Commands=grep !/^MAKEFILE$/o, @{$CommandHash{subcommands}};
+				@Commands=grep !/^MAKEFILE$/io, @{$CommandHash{subcommands}};
 			}
 		}
 	}
@@ -674,25 +675,25 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 
 #	handle the exports related calls first
 	if (($Command)=grep /^(.*EXPORT)$/o, @Commands) { # EXPORT, CLEANEXPORT
-		unless (-e "${PrjBldDir}EXPORT$Test.make") {
-			die "ABLD ERROR: \"${PrjBldDir}EXPORT$Test.make\" not yet created\n";
+		unless (-e "${PrjBldDir}export$Test.make") {
+			die "ABLD ERROR: \"${PrjBldDir}export$Test.make\" not yet created\n";
 		}
 		unless ($Options {checksource}) {
 			if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
 				unless ($Options{what} or $Options{check}) {
-					push @Calls, "$ENV{MAKE} -r $KeepgoingFlag -f \"${PrjBldDir}EXPORT$Test.make\" $Command$VerboseMacro$KeepgoingMacro";
+					push @Calls, "$ENV{MAKE} -r $KeepgoingFlag -f \"${PrjBldDir}export$Test.make\" $Command$VerboseMacro$KeepgoingMacro";
 				}
 				else {
-					push @Calls, "$ENV{MAKE} -r -f \"${PrjBldDir}EXPORT$Test.make\" WHAT";
+					push @Calls, "$ENV{MAKE} -r -f \"${PrjBldDir}export$Test.make\" WHAT";
 				}
 			}
 			else {
 			
 				unless ($Options{what} or $Options{check}) {
-					push @Calls, "make -r $KeepgoingFlag -f \"${PrjBldDir}EXPORT$Test.make\" $Command$VerboseMacro$KeepgoingMacro";
+					push @Calls, "make -r $KeepgoingFlag -f \"${PrjBldDir}export$Test.make\" $Command$VerboseMacro$KeepgoingMacro";
 				}
 				else {
-					push @Calls, "make -r -f \"${PrjBldDir}EXPORT$Test.make\" WHAT";
+					push @Calls, "make -r -f \"${PrjBldDir}export$Test.make\" WHAT";
 				}
 			}
 		}
@@ -705,10 +706,10 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 
 		if ($Options {checksource} && ($Command eq "TARGET" || $Command eq "SAVESPACE")) {
 			if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
-				push @Calls, "$ENV{MAKE} -r -f \"".$PrjBldDir."EXPORT.make\"".$checksourceMakeVariables."CHECKSOURCE";
+				push @Calls, "$ENV{MAKE} -r -f \"".$PrjBldDir."export.make\"".$checksourceMakeVariables."CHECKSOURCE";
 			}
 			else {
-				push @Calls, "make -r -f \"".$PrjBldDir."EXPORT.make\"".$checksourceMakeVariables."CHECKSOURCE";
+				push @Calls, "make -r -f \"".$PrjBldDir."export.make\"".$checksourceMakeVariables."CHECKSOURCE";
 			}
 		}
 
@@ -739,12 +740,13 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 
 			# You get CHECKSOURCE_GENERIC "for free" if no component is specified in the call
 			if ($Options {checksource} && ($Command eq "TARGET" || $Command eq "SAVESPACE") && $Program) {
+				my $lcplat = lc $Plat;
 				foreach my $makefileVariation (@{$MakefileVariations{$Plat}}) {
 					if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
-						push @Calls, "$ENV{MAKE} -r -f \"$PrjBldDir$Plat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE_GENERIC";
+						push @Calls, "$ENV{MAKE} -r -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE_GENERIC";
 					}
 					else {
-						push @Calls, "make -r -f \"$PrjBldDir$Plat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE_GENERIC";
+						push @Calls, "make -r -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE_GENERIC";
 					}
 				}
 			}
@@ -756,13 +758,14 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 					$CFG=" CFG=$LoopBld";
 				}
 				if ($Options {checksource}) {
+					my $lcplat = lc $Plat;
 					if ($Command eq "TARGET" || $Command eq "SAVESPACE") {
 						foreach my $makefileVariation (@{$MakefileVariations{$Plat}}) {
 							if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
-								push @Calls, "$ENV{MAKE} -r -f \"$PrjBldDir$Plat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE$Program$CFG";	  
+								push @Calls, "$ENV{MAKE} -r -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE$Program$CFG";	  
 							}
 							else {	
-								push @Calls, "make -r -f \"$PrjBldDir$Plat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE$Program$CFG";
+								push @Calls, "make -r -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\"".$checksourceMakeVariables."CHECKSOURCE$Program$CFG";
 							}
 						}
 					}
@@ -772,12 +775,12 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 				unless ($Options{what} or $Options{check}) {
 					if ($Program) { # skip programs if they're not supported for a platform
 						unless ($Test) {
-							unless (grep /^$Program$/, @{$Platform::Programs{$Plat}}) {
+							unless (grep /^$Program$/, @{$platform::Programs{$Plat}}) {
 								next PLATFORM;
 							}
 						}
 						else {
-							unless (grep /^$Program$/, @{$Platform::TestPrograms{$Plat}}) {
+							unless (grep /^$Program$/, @{$platform::TestPrograms{$Plat}}) {
 								next PLATFORM;
 							}
 						}
@@ -800,7 +803,8 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 								{
 									not scalar grep(/tracecompiler\.pl $Plat/,@Calls) and push @Calls, "perl " . $PerlLibPath . "tracecompiler.pl $Plat $Program";
 								}
-								push @Calls, "$ENV{MAKE} -r $KeepgoingFlag -f \"$PrjBldDir$Plat$makefileVariation$Test.make\""
+								my $lcplat = lc $Plat;
+								push @Calls, "$ENV{MAKE} -r $KeepgoingFlag -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\""
 								." $Command$Program$CFG$Source$VerboseMacro" .
 								"$KeepgoingMacro$RemoveMacro$NoDependencyMacro" .
 								"$AbldFlagsMacroTmp$CompilerWrapperFlagMacroTemp";
@@ -813,11 +817,12 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 									{
 										$CFGCOMPWRAP =" CFG=COMPWRAP".$LoopBld;	
 									}
-									push @Calls, "$ENV{MAKE} -r $KeepgoingFlag -f \"$PrjBldDir$Plat$makefileVariation$Test.make\""." TARGET$Program$CFGCOMPWRAP";
+									push @Calls, "$ENV{MAKE} -r $KeepgoingFlag -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\""." TARGET$Program$CFGCOMPWRAP";
 								}
 							}
 							else {	
-								push @Calls, "make -r $KeepgoingFlag -f \"$PrjBldDir$Plat$makefileVariation$Test.make\""
+								my $lcplat = lc $Plat;
+								push @Calls, "make -r $KeepgoingFlag -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\""
 								." $Command$Program$CFG$Source$VerboseMacro" .
 								"$KeepgoingMacro$RemoveMacro$NoDependencyMacro" .
 								"$AbldFlagsMacroTmp$CompilerWrapperFlagMacroTemp";
@@ -830,7 +835,7 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 									{
 										$CFGCOMPWRAP =" CFG=COMPWRAP".$LoopBld;	
 									}
-									push @Calls, "make -r $KeepgoingFlag -f \"$PrjBldDir$Plat$makefileVariation$Test.make\""." TARGET$Program$CFGCOMPWRAP";
+									push @Calls, "make -r $KeepgoingFlag -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\""." TARGET$Program$CFGCOMPWRAP";
 								}
 							}
 						}
@@ -842,27 +847,28 @@ chdir($BldInfDir) or die "ABLD ERROR: Can't CD to \"$BldInfDir\"\n";
 				}
 				if ($Program) { # skip programs if they're not supported for a platform
 					unless ($Test) {
-						unless (grep /^$Program$/, @{$Platform::Programs{$Plat}}) {
+						unless (grep /^$Program$/, @{$platform::Programs{$Plat}}) {
 							next PLATFORM;
 						}
 					}
 					else {
-						unless (grep /^$Program$/, @{$Platform::TestPrograms{$Plat}}) {
+						unless (grep /^$Program$/, @{$platform::TestPrograms{$Plat}}) {
 							next PLATFORM;
 						}
 					}
 				}
 				my $Makefile='';
-				if ($Command=~/MAKEFILE$/o) {
+				if ($Command=~/MAKEFILE$/oi) {
 					$Makefile='MAKEFILE';
 				}
 
 				foreach my $makefileVariation (@{$MakefileVariations{$Plat}}) {
+					my $lcplat = lc $Plat;
 					if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
-					push @Calls, "$ENV{MAKE} -r -f \"$PrjBldDir$Plat$makefileVariation$Test.make\" WHAT$Makefile$Program $CFG";
+					push @Calls, "$ENV{MAKE} -r -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\" WHAT$Makefile$Program $CFG";
 					}
 					else {
-					push @Calls, "make -r -f \"$PrjBldDir$Plat$makefileVariation$Test.make\" WHAT$Makefile$Program $CFG";
+					push @Calls, "make -r -f \"$PrjBldDir$lcplat$makefileVariation$Test.make\" WHAT$Makefile$Program $CFG";
 				    }
 				}
 			}
@@ -948,7 +954,7 @@ ENDHERESTRING
 
 	print
 		"project platforms:\n",
-		"   @Platform::Plats\n"
+		"   @platform::Plats\n"
 	;
 
 	if (%Platform::FeatureVariantSupportingPlats)
@@ -1002,7 +1008,7 @@ sub Help ($) {
 
 	my %CommandHash=%{$Commands{$Command}};
 
-	print 'ABLD';
+	print 'abld';
 	unless ($CommandHash{notest}) {
 		print ' [test]';
 	}
diff --git a/aiftool b/aiftool
new file mode 100644
index 0000000..5d2ae14
--- /dev/null
+++ b/aiftool
@@ -0,0 +1,74 @@
+#! /bin/bash
+#
+# aiftool - Unix frontend for aiftool.exe
+#
+# (c) 2001-2006 Alfred E. Heggestad 
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+# Arguments:
+#
+#   $1 input resource filename
+#   $2 input mbmname
+#
+
+usage()
+{
+echo 'AIFTOOL filename mbmname'
+echo 'Use this command to produce an AIF from'
+echo '- a resource file containing language, caption'
+echo '  and capability specifications'
+echo '- a multi-bitmap file containing icons and masks'
+echo '  in various sizes'
+echo 'Specify'
+echo '  filename: the name of the input resource file; the'
+echo '            .rss extension is added by AIFTOOL'
+echo '  mbmname:  the name of the input .mbm file: you'
+echo '            must specify the extension'
+}
+
+echo AIF tool
+
+#
+# check arguments - need at least 2 of them
+#
+if [ $# -lt 2  ] ; then usage ; exit 0 ; fi
+if [ $1 = ""   ] ; then usage ; exit 0 ; fi
+if [ $1 = "/?" ] ; then usage ; exit 0 ; fi
+if [ $1 = "/h" ] ; then usage ; exit 0 ; fi
+if [ $1 = "/H" ] ; then usage ; exit 0 ; fi
+
+
+#
+# compile the resource file
+#
+echo Compiling resource file
+arm-none-symbianelf-cpp -I. -I../inc -I../../epoc32/include -I$EPOCROOT/epoc32/include -D_UNICODE < $1.rss > $1.rpp
+wine $EPOCROOT/epoc32/tools/rcomp.exe -D_UNICODE -oaif.rsc -h$1.rs~ -i$1.rss -s$1.rpp
+rm -f $1.rs~
+rm -f $1.rpp
+
+#
+# duplicate mbm file
+#
+cp $2 aif.mbm
+
+
+#
+# run Aiftool
+#
+echo Running AIF writer
+#emxaif aif.rsc $2 -o $1.aif
+wine $EPOCROOT/epoc32/release/winc/udeb/aiftool.exe .
+
+#
+# cleanup
+#
+mv out.aif $1.aif
+#rm -f aif.rsc
+#rm -f aif.mbm
+
+# EOF - aiftool
diff --git a/armutl.pm b/armutl.pm
index 6621613..87f84fa 100644
--- a/armutl.pm
+++ b/armutl.pm
@@ -15,7 +15,7 @@
 # 
 #
 
-package Armutl;
+package armutl;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -36,7 +36,7 @@ require Exporter;
 	Armutl_ArmLibDir
 );
 
-use RVCT_plat2set;
+use rvct_plat2set;
 
 my $ArmInc='';
 my @ArmLibList=();
@@ -46,9 +46,10 @@ my @AsmFileList=();
 # make sure that some of the tool subroutines  still work in case of Plat() does not exists in namespace main
 my $Plat = main::Plat() if defined &main::Plat;
 
-my ($RVCTMajorVersion, $RVCTMinorVersion, $RVCTBuildNumber) = RVCT_plat2set::get_version_list($Plat);
+my ($RVCTMajorVersion, $RVCTMinorVersion, $RVCTBuildNumber) = rvct_plat2set::get_version_list($Plat);
 
-my $RVCTVersion = "$RVCTMajorVersion.$RVCTMinorVersion";
+my $RVCTVersion = "";
+$RVCTVersion = "$RVCTMajorVersion.$RVCTMinorVersion" if defined($RVCTMajorVersion);
 my $RVCTPatchLevel = 0;
 
 
@@ -81,7 +82,7 @@ sub Armutl_DoMmp (@) { # takes platform text
 		my $LineInfo=shift @$Line;
 		$_=shift @$Line;
 		if (/^ARMINC$/o) {
-			$ArmInc = RVCT_plat2set::get_inc_path($Plat);
+			$ArmInc = rvct_plat2set::get_inc_path($Plat);
 			next LINE;
 		}
 		if (/^ARMRT$/o) {
@@ -90,14 +91,14 @@ sub Armutl_DoMmp (@) { # takes platform text
 		}
 		if (/^ARMLIBS$/o) {
 			my $LibVar = "RVCT${RVCTMajorVersion}${RVCTMinorVersion}LIB";
-			my $ArmLibDir = RVCT_plat2set::get_lib_path($Plat);
+			my $ArmLibDir = rvct_plat2set::get_lib_path($Plat);
 
 			push @MmpWarn, "$LineInfo : No libraries specified for keyword ARMLIBS\n" unless @$Line;
 
 			while (@$Line) {
 			  my $lib = shift @$Line;
 
-              my $lib_path = RVCT_plat2set::find_lib( $Plat, $lib );
+              my $lib_path = rvct_plat2set::find_lib( $Plat, $lib );
 
               if ($lib_path)
               {
diff --git a/bldmake b/bldmake
new file mode 100644
index 0000000..3619320
--- /dev/null
+++ b/bldmake
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# bldmake - bash interface for bldmake.pl, part of GnuPoc project
+#
+# (c) 2001 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+perl -S bldmake.pl "$@"
diff --git a/bldmake.pl b/bldmake.pl
index ac03ab9..6618b80 100644
--- a/bldmake.pl
+++ b/bldmake.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -28,26 +29,25 @@ BEGIN {
 	require 5.005_03;
 # establish the path to the Perl libraries: currently the same directory as this script
 	$PerlLibPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlLibPath =~ s/\//\\/g;	# X:\epoc32\tools
-	$PerlLibPath .= "\\";
+	$PerlLibPath .= "/";
 }
 sub ExportDirs ($);
 
 use lib $PerlLibPath;
-use E32env;
-use E32Plat;
-use Modload;
-use Output;
-use Pathutl;
-use E32Variant;
-use RVCT_plat2set;
-use BPABIutl;
+use e32env;
+use e32plat;
+use modload;
+use output;
+use pathutl;
+use e32variant;
+use rvct_plat2set;
+use bpabiutl;
 use wrappermakefile;
-use CheckSource;
+use checksource;
 use File::Path; # for rmtree
 use featurevariantparser;
 
-my $BldInfName = 'BLD.INF';
+my $BldInfName = 'bld.inf';
 my %Options;
 my %KeepGoing;
 my @DefaultPlats=('WINSCW', 'GCCXML', 'EDG', 'X86GCC', 'GCCE');
@@ -63,13 +63,13 @@ my %CheckSourceBldInfIncludes;
 
 for ('ARMV4', 'ARMV5')
 {
-	push @BaseUserDefaultPlats, $_ if RVCT_plat2set::compiler_exists($_);
+	push @BaseUserDefaultPlats, $_ if rvct_plat2set::compiler_exists($_);
 }
 
 # Add ARMV5_ABIV1 platform if ENABLE_ABIV2_MODE is set in variant.cfg
 my $variantABIV2Keyword = &Variant_GetMacro();
 # Add ARMV5_ABIV1 platform only after determining the presence of RVCT compiler.
-if ($variantABIV2Keyword && RVCT_plat2set::compiler_exists('ARMV5_ABIV1') ) {
+if ($variantABIV2Keyword && rvct_plat2set::compiler_exists('ARMV5_ABIV1') ) {
 	push @OptionalPlats, 'ARMV5_ABIV1';
 }
 
@@ -84,7 +84,7 @@ foreach my $BPABIPlat (@BPABIPlats)
 	# determining the presence of RVCT compiler	
 	if(($BPABIPlat =~/^ARMV5/i))
 		{
-			if(!($BPABIPlat =~/^ARMV5$/i) && RVCT_plat2set::compiler_exists('ARMV5'))
+			if(!($BPABIPlat =~/^ARMV5$/i) && rvct_plat2set::compiler_exists('ARMV5'))
 			{
 			push @OptionalPlats, $BPABIPlat;
 			}
@@ -96,7 +96,7 @@ foreach my $BPABIPlat (@BPABIPlats)
 		}
 }
 
-if ( RVCT_plat2set::compiler_exists('ARMV5') ) {
+if ( rvct_plat2set::compiler_exists('ARMV5') ) {
 	#determine the presence of ARVCT compiler
 	push @DefaultPlats, 'ARMV5';
 }
@@ -129,7 +129,7 @@ my @FeatureVariants = featurevariantparser->GetBuildableFeatureVariants();
 	{
 		my @PlatList = &Plat_List();
 		
-		if (RVCT_plat2set::compiler_exists('ARMV6')){
+		if (rvct_plat2set::compiler_exists('ARMV6')){
 			foreach my $ARMV6Target ("ARMV6", "ARMV6_ABIV1", "ARMV6_ABIV2"){
 				if (grep /^$ARMV6Target$/, @PlatList) {
 					push @BaseUserDefaultPlats, "$ARMV6Target" if (!grep /^$ARMV6Target$/, @BaseUserDefaultPlats);
@@ -138,8 +138,8 @@ my @FeatureVariants = featurevariantparser->GetBuildableFeatureVariants();
 			}
 		}
 	
-		if (RVCT_plat2set::compiler_exists('ARMV7')){
- 			my $rvct_ver = RVCT_plat2set::get_version_string('ARMV7');
+		if (rvct_plat2set::compiler_exists('ARMV7')){
+ 			my $rvct_ver = rvct_plat2set::get_version_string('ARMV7');
  			if ((defined $rvct_ver) and ($rvct_ver ge "3.1.674")) {
  				if (grep /^ARMV7$/, @PlatList ) {
 					push @DefaultPlats, 'ARMV7' if (!grep /^ARMV7$/, @DefaultPlats);
@@ -186,7 +186,7 @@ my @FeatureVariants = featurevariantparser->GetBuildableFeatureVariants();
 			);
 		}
 		print(
-			"Macros defined for BLD.INF preprocessing of MMPFILE sections:\n"
+			"Macros defined for bld.inf preprocessing of MMPFILE sections:\n"
 		);
 		foreach $PlatName (@PlatList) {
 			my %Plat;
@@ -207,18 +207,22 @@ my @FeatureVariants = featurevariantparser->GetBuildableFeatureVariants();
 #	maybe BLDMAKE should allow a path to be specified leading to the BLD.INF file
 	my $BldInfPath=&Path_WorkPath;
 	unless (-e "${BldInfPath}$BldInfName") {
-		&FatalError("Can't find \"${BldInfPath}$BldInfName\"");
+		if (-e "${BldInfPath}bld.inf") {
+			$BldInfName = 'bld.inf';
+		} else {
+			&FatalError("Can't find \"${BldInfPath}$BldInfName\"");
+		}
 	}
 
-	if (!-d $E32env::Data{EPOCPath}){
-		&FatalError("Directory \"$E32env::Data{EPOCPath}\" does not exist");
+	if (!-d $e32env::Data{EPOCPath}){
+		&FatalError("Directory \"$e32env::Data{EPOCPath}\" does not exist");
 	}
 
 #	decide the output directory
-	my $OutDir=&Path_Chop($E32env::Data{BldPath}).$BldInfPath;
+	my $OutDir=&Path_Chop($e32env::Data{BldPath}).$BldInfPath;
 
 #	Work out the path for the IBY files
-	my $RomDir=&Path_Chop($E32env::Data{RomPath}).$BldInfPath;
+	my $RomDir=&Path_Chop($e32env::Data{RomPath}).$BldInfPath;
 
 #	Work out the name for the BLD.INF module
 	my @Dirs=&Path_Dirs($BldInfPath);
@@ -244,7 +248,7 @@ my @FeatureVariants = featurevariantparser->GetBuildableFeatureVariants();
 	}
 
 #	parse BLD.INF - to get the platforms and the export files
-	eval { &Load_ModuleL('PREPFILE'); };
+	eval { &Load_ModuleL('prepfile'); };
 	&FatalError($@) if $@;
 
 	my @RealPlats=();
@@ -254,7 +258,7 @@ my @FeatureVariants = featurevariantparser->GetBuildableFeatureVariants();
 		print "Reading \"${BldInfPath}$BldInfName\" for platforms and exports\n";
 	}
 	&ParseBldInf(\@RealPlats, \@Exports, \@TestExports, $BldInfPath, 
-		$E32env::Data{EPOCIncPath}, $E32env::Data{EPOCPath}, $E32env::Data{EPOCDataPath});
+		$e32env::Data{EPOCIncPath}, $e32env::Data{EPOCPath}, $e32env::Data{EPOCDataPath});
 
 #       Add Customizations
 	my @additions;
@@ -376,27 +380,28 @@ if (0) {
 
 #		create the perl file, PLATFORM.PM, listing the platforms
 		if ($Options{v}) {
-			print "Creating \"${OutDir}PLATFORM.PM\"\n";
+			print "Creating \"${OutDir}platform.pm\"\n";
 		}
 		&CreatePlatformPm($OutDir, \@Plats, \@RealPlats, \%Real, \%AllPlatData, \%AllPlatTestData);
 
-#		create the .BAT files required to call ABLD.PL
-		if ($Options{v}) {
-			print "Creating \"${BldInfPath}ABLD.BAT\"\n";
-		}
-		&CreatePerlBat($BldInfPath);
+		# Note from alfredh:
+		#
+		#     I removed the creation of the abld shell file
+		#     because it is not necessary. Instead, the file
+		#     is now in /epoc32/tools directory
+		#
 
 #		create the makefile for exporting files
 		if ($Options{v}) {
-			print "Creating \"${OutDir}EXPORT.MAKE\"\n";
+			print "Creating \"${OutDir}export.make\"\n";
 		}
-		&CreateExportMak("${OutDir}EXPORT.MAKE", \@Exports, \@ExportDirs);
+		&CreateExportMak("${OutDir}export.make", \@Exports, \@ExportDirs);
 
 #		create the makefile for exporting test files
 		if ($Options{v}) {
-			print "Creating \"${OutDir}EXPORTTEST.MAKE\"\n";
+			print "Creating \"${OutDir}exporttest.make\"\n";
 		}
-		&CreateExportMak("${OutDir}EXPORTTEST.MAKE", \@TestExports, \@TestExportDirs);
+		&CreateExportMak("${OutDir}exporttest.make", \@TestExports, \@TestExportDirs);
 
 # modified start: makefile improvement 
 		#create the feature variant infor file
@@ -405,7 +410,7 @@ if (0) {
 			my $realplat = $Real{$copyofPlat};
 			if(&Plat_SupportsFeatureVariants($copyofPlat))
 			{
-				my $variant_info = &Path_Chop($E32env::Data{BldPath}).$BldInfPath."\\FeatureVariantInfo\\".$realplat."\\";	
+				my $variant_info = &Path_Chop($e32env::Data{BldPath}).$BldInfPath."/FeatureVariantInfo/".$realplat."/";	
 				eval { &Path_MakePathL($variant_info); };
 				die $@ if $@;
 				if ($Options{v}) {
@@ -466,32 +471,33 @@ if (0) {
 #		create the platform meta-makefiles
 		foreach my $copyofPlat (@DoPlats) {  # Do not use $_ here !!
 			if ($Options{v}) {
-				print "Creating \"$OutDir$copyofPlat.MAKE\"\n";
+				my $tmp = lc $copyofPlat;
+				print "Creating \"$OutDir$tmp.make\"\n";
 			}
 			my $realplat = $Real{$copyofPlat};
-			&CreatePlatMak($OutDir, $E32env::Data{BldPath}, $AllPlatData{$realplat}, $copyofPlat, $realplat, $RomDir, $Module, $BldInfPath, \@Exports, '');
+			&CreatePlatMak($OutDir, $e32env::Data{BldPath}, $AllPlatData{$realplat}, $copyofPlat, $realplat, $RomDir, $Module, $BldInfPath, \@Exports, '');
 
 			if (&Plat_SupportsFeatureVariants($copyofPlat))
 				{
 				foreach my $featureVariant (@FeatureVariants)
 					{
-					print "Creating \"$OutDir$copyofPlat.$featureVariant.MAKE\"\n" if ($Options{v});
-					&CreatePlatMak($OutDir, $E32env::Data{BldPath}, $AllPlatData{$realplat}, $copyofPlat, $realplat, $RomDir, $Module, $BldInfPath, \@Exports, '', ".$featureVariant");
+					print "Creating \"$OutDir$copyofPlat.$featureVariant.make\"\n" if ($Options{v});
+					&CreatePlatMak($OutDir, $e32env::Data{BldPath}, $AllPlatData{$realplat}, $copyofPlat, $realplat, $RomDir, $Module, $BldInfPath, \@Exports, '', ".$featureVariant");
 					}
 				}
 		}
 		foreach (@DoPlats) {
 			if ($Options{v}) {
-				print "Creating \"$OutDir${_}TEST.MAKE\"\n";
+				print "Creating \"$OutDir${_}test.make\"\n";
 			}
-			&CreatePlatMak($OutDir, $E32env::Data{BldPath}, $AllPlatTestData{$Real{$_}}, $_, $Real{$_}, $RomDir, $Module, $BldInfPath, \@TestExports, 'TEST');
+			&CreatePlatMak($OutDir, $e32env::Data{BldPath}, $AllPlatTestData{$Real{$_}}, $_, $Real{$_}, $RomDir, $Module, $BldInfPath, \@TestExports, 'TEST');
 
 			if (&Plat_SupportsFeatureVariants($_))
 				{
 				foreach my $featureVariant (@FeatureVariants)
 					{
-					print "Creating \"$OutDir${_}.".$featureVariant."TEST.MAKE\"\n" if ($Options{v});
-					&CreatePlatMak($OutDir, $E32env::Data{BldPath}, $AllPlatTestData{$Real{$_}}, $_, $Real{$_}, $RomDir, $Module, $BldInfPath, \@TestExports, 'TEST', ".$featureVariant");
+					print "Creating \"$OutDir${_}.".$featureVariant."test.make\"\n" if ($Options{v});
+					&CreatePlatMak($OutDir, $e32env::Data{BldPath}, $AllPlatTestData{$Real{$_}}, $_, $Real{$_}, $RomDir, $Module, $BldInfPath, \@TestExports, 'TEST', ".$featureVariant");
 					}
 				}
 		}
@@ -509,7 +515,7 @@ if (0) {
 	foreach my $refplat (@DoRealPlats) {
 		my $tmp = $AllPlatData{$refplat};
 		foreach my $dref (@$tmp){
-			my $builddir = $OutDir . $$dref{Base} ."\\" . $refplat . "\\";
+			my $builddir = $OutDir . $$dref{Base} ."/" . lc $refplat . "/";
 				if (!-d $builddir){
 					if ($Options{v}) {
 						print "Creating directory \"$builddir\" \n";
@@ -544,7 +550,7 @@ if (0) {
 
 sub Usage () {
 
-	eval { &Load_ModuleL('E32TPVER'); };
+	eval { &Load_ModuleL('e32tpver'); };
 	&FatalError($@) if $@;
 
 	print
@@ -556,7 +562,7 @@ sub Usage () {
 		"<command>: (case insensitive)\n",
 		" BLDFILES - create build batch files\n",
 		" CLEAN    - remove all files bldmake creates\n",
-		" INF      - display basic BLD.INF syntax\n",
+		" INF      - display basic bld.inf syntax\n",
 		" PLAT     - display platform macros\n",
 		"\n",
 		"<platform>: (case insensitive)\n",
@@ -573,7 +579,7 @@ sub ShowBldInfSyntax () {
 
 	print <<ENDHERE1;
 
-BLD.INF - Syntax
+bld.inf - Syntax
 
 /* Use C++ comments if required */
 // (Curly braces denote optional arguments)
@@ -595,7 +601,7 @@ PRJ_EXPORTS
 PRJ_TESTEXPORTS
 [<source path>\<source file>]	{<destination>}
 // list each file exported from source on a separate line
-// {<destination>} defaults to BLD.INF dir
+// {<destination>} defaults to bld.inf dir
 
 PRJ_MMPFILES
 [<mmp path>\<mmp file>] {<qualifiers>}
@@ -656,6 +662,7 @@ sub ParseBldInf ($$$$$) {
 	LINE: foreach $Line (@Prj2D) {
 		my $LineNum=shift @$Line;
 		$_=shift @$Line;
+		$_=~s/\\/\//g; # backwards comp - convert backslash to forward slash
 		if ($LineNum eq '#') {
 			$CurFile=$_;
 			next LINE;
@@ -684,13 +691,13 @@ sub ParseBldInf ($$$$$) {
 			unshift @$Line, $_;
 			my $Candidate;
 			CANDLOOP: foreach $Candidate (@$Line) {
-				$Candidate=uc $Candidate;
+				$Candidate=lc $Candidate;
 #				ignore old WINC target
-				if ($Candidate eq 'WINC') {
+				if ($Candidate eq 'winc') {
 					next CANDLOOP;
 				}
 #				expand DEFAULT
-				if ($Candidate eq 'DEFAULT') {
+				if ($Candidate eq 'default') {
 					$DefaultPlatsUsed=1;
 					my $Default;
 					foreach $Default (@DefaultPlats) {
@@ -702,7 +709,7 @@ sub ParseBldInf ($$$$$) {
 					next CANDLOOP;
 				}
 #				expand BASEDEFAULT
-				if ($Candidate eq 'BASEDEFAULT') {
+				if ($Candidate eq 'basedefault') {
 					$DefaultPlatsUsed=1;
 					my $Default;
 					foreach $Default (@BaseDefaultPlats) {
@@ -742,7 +749,7 @@ sub ParseBldInf ($$$$$) {
 						push @Plats, 'CWTOOLS';
 						}
 #				check platform is supported
-				unless (grep /^$Candidate$/, @SupportedPlats) {
+				unless (grep /^$Candidate$/i, @SupportedPlats) {
 					WarnOrDie(\@PrjFileDie, "$CurFile($LineNum) : Unsupported platform $Candidate specified\n");
 					next CANDLOOP;
 				}
@@ -753,7 +760,7 @@ sub ParseBldInf ($$$$$) {
 				}
 #				add the platform
 				unless ($PlatformCheck{$Candidate}) {
-					push @Plats, $Candidate;
+					push @Plats, uc $Candidate;
 					my $SubPlat = sprintf("%sEDG", $Candidate);
 					push @Plats, $SubPlat 
 					    if (grep /^$SubPlat$/, @SupportedPlats);
@@ -790,10 +797,11 @@ sub ParseBldInf ($$$$$) {
 			if (@$Line) {
 #				get the destination file if it's specified
 				$Releasable=shift @$Line;
+				$Releasable=~s/\\/\//g;      # force to forward slash
 				CheckSource_MetaData(%CheckSourceEXPORTSMetaData, $CurFile, "PRJ_".$Section, $Releasable, $LineNum);
 				$Releasable = &Path_Norm ($Releasable);
-				$emReleasable=ucfirst $Releasable;
-				if ($emReleasable=~/^([A-Z]):(\\.*)$/)  {
+				$emReleasable=$Releasable;
+				if ($emReleasable=~/^([A-Z]):(\/.*)$/i)  {
 				  	$emReleasable=~s/://;
 					$Releasable=$EPOCDataPath.$emReleasable;
 				}
@@ -960,13 +968,11 @@ sub ParseBldInfPlat ($$$$) {
 
 		$CurFile = &Path_Norm ($CurFile);
 		
-#		upper-case all the data here, but record original source case
-#		in a hash so that it can be recalled for CheckSource purposes
+#		don't upper-case any data here
 
 		my %originalSourceCase;
    		foreach (@$Line) {
- 			$originalSourceCase{uc $_} = $_;  # needed for extension template makefile MACROs 
-   			$_=uc $_;
+ 			$originalSourceCase{$_} = $_;  # needed for extension template makefile MACROs 
    		}
 
 		$_=shift @$Line;
@@ -974,8 +980,8 @@ sub ParseBldInfPlat ($$$$) {
 #		check for section headers - don't test for the right ones here
 #		because we do that in the first parse function
 
-		if (/^PRJ_(\w*)$/o) {
-			$Section=$1;
+		if (/^PRJ_(\w*)$/oi) {
+			$Section=uc $1;
 			next LINE;
 		}
 
@@ -1025,7 +1031,7 @@ sub ParseBldInfPlat ($$$$) {
 					&FatalError("$CurFile($LineNum) : No 'start' corresponding to this 'end' in Extension Template section\n"); 
 				}
 				$IsExtensionBlock =0;
-				my $OutDir=Path_Chop($E32env::Data{BldPath}).$BldInfPath;
+				my $OutDir=Path_Chop($e32env::Data{BldPath}).$BldInfPath;
 #				Generate wrapper makefile for this platform.
 				eval { &Load_ModuleL('WrapperMakefile'); };
 					&FatalError($@) if $@;
@@ -1043,22 +1049,22 @@ sub ParseBldInfPlat ($$$$) {
 
 #		check for MMP sections and get the .MMP file details
 		if ($Section=~/^(MMPFILES|TESTMMPFILES)$/o) {
-			$Data{Ext}='.MMP';
+			$Data{Ext}='.mmp';
 #			check for MAKEFILE statements for custom building
 			my $SubSection = "MMP";
-			if (/^MAKEFILE$/o) {
+			if (/^MAKEFILE$/oi) {
 				$SubSection = $_;
-				$Data{Makefile}=2;  # treat MAKEFILE=>NMAKEFILE   =1;
+				$Data{Makefile}=1;
 				$_=shift @$Line;
 				$Data{Ext}=&Path_Split('Ext', $_);
 			}
-			if (/^NMAKEFILE$/o) {
+			if (/^NMAKEFILE$/oi) {
 				$SubSection = $_;
 				$Data{Makefile}=2;
 				$_=shift @$Line;
 				$Data{Ext}=&Path_Split('Ext', $_);
 			}
-			if (/^GNUMAKEFILE$/o) {
+			if (/^GNUMAKEFILE$/oi) {
 				$SubSection = $_;
 				$Data{Makefile}=1;
 				$_=shift @$Line;
@@ -1070,7 +1076,7 @@ sub ParseBldInfPlat ($$$$) {
 #			path considered relative to the current file
 			$Data{Path}=&Path_Split('Path', &Path_MakeAbs($CurFile, $_));
 
-#			this function doesn't care whether the .MMPs are listed with their extensions or not
+#			this function doesn't care whether the .mmp's are listed with their extensions or not
 			$Data{Base}=&Path_Split('Base', $_);
 			my $MmpFile= $Data{Path}.$Data{Base};
    
@@ -1081,6 +1087,8 @@ sub ParseBldInfPlat ($$$$) {
    			}
   			$Check{$MmpFile}="$CurFile: $LineNum";
 
+		        $Data{Base}=~s/\\/\//g;      # force to forward slash
+
 #			check the file exists
 			unless (-e "$Data{Path}$Data{Base}$Data{Ext}") {
 				WarnOrDie(\@PrjFileDie, "$CurFile($LineNum) : $Data{Path}$Data{Base}$Data{Ext} does not exist\n");
@@ -1091,6 +1099,7 @@ sub ParseBldInfPlat ($$$$) {
 #			process the file's attributes
 			if ($Section eq 'MMPFILES') {
 				foreach (@$Line) {
+				#$_ = uc $_; # alfredh: hack TODOAEH
 					if (/^TIDY$/o) {
 						$Data{Tidy}=1;
 						next;
@@ -1103,11 +1112,11 @@ sub ParseBldInfPlat ($$$$) {
 					  next;
 					}
 
-					push @PrjFileDie, "$CurFile($LineNum) : Don't understand .MMP file argument \"$_\"\n";
+					push @PrjFileDie, "$CurFile($LineNum) : Don't understand .mmp file argument \"$_\"\n";
 				}
 			}
 
-#			process the test .MMP file's attributes
+#			process the test .mmp file's attributes
 			elsif ($Section eq 'TESTMMPFILES') {
 				foreach (@$Line) {
 					if (/^TIDY$/o) {
@@ -1129,7 +1138,7 @@ sub ParseBldInfPlat ($$$$) {
 						$Data{Support}=1;
 						next;
 					}
-					push @PrjFileDie, "$CurFile($LineNum) : Don't understand test .MMP file argument \"$_\"\n";
+					push @PrjFileDie, "$CurFile($LineNum) : Don't understand test .mmp file argument \"$_\"\n";
 				}
 			}
 		}		
@@ -1201,12 +1210,14 @@ sub CreatePlatformPm ($$$$$$) {
 
 
 	&Output(
-		"# Bldmake-generated perl file - PLATFORM.PM\n",
+		"#!/usr/bin/perl -w\n",
+		"#\n",
+		"# Bldmake-generated perl file - platform.pm\n",
 		"\n",
 		"# use a perl integrity checker\n",
 		"use strict;\n",
 		"\n",
-		"package Platform;\n",
+		"package platform;\n",
 		"\n",
 		"use vars qw(\@Plats \@RealPlats %Programs %TestPrograms %FeatureVariantSupportingPlats);\n",
 		"\n",
@@ -1294,8 +1305,8 @@ sub CreatePlatformPm ($$$$$$) {
 		"1;\n"
 	);
 
-#	write the PLATFORM.PM file
-	&WriteOutFileL($BatchPath."PLATFORM.PM");
+#	write the platform.pm file
+	&WriteOutFileL($BatchPath."platform.pm");
 }
 
 sub CreatePerlBat ($) {
@@ -1356,7 +1367,7 @@ sub GetArchiveExportList($) {
 						push @list, "$ENV{EPOCROOT}$member";
 					}
 					else{
-						push @list, "$Dest\\$member";
+						push @list, "$Dest/$member";
 					}
 				}
 			}
@@ -1369,10 +1380,9 @@ sub GetArchiveExportList($) {
 sub CreateExportMak ($$$) {
 	my ($Makefile, $ExportsRef, $ExpDirsRef)=@_;
 
-#	create EXPORT.MAKE
+#	create export.make
 
-	my $erasedefn = "\@erase";
-	$erasedefn = "\@erase 2>>nul" if ($ENV{OS} eq "Windows_NT");
+	my $erasedefn = "\@rm -f";
 	&Output(
 		"ERASE = $erasedefn\n",
 		"\n",
@@ -1403,7 +1413,7 @@ sub CreateExportMak ($$$) {
 	else {
 		&Output(
 			" \n",
-			"\t\@echo Nothing to do\n"
+#			"\t\@echo Nothing to do\n"
 		);
 	}
 	&Output(
@@ -1464,7 +1474,7 @@ sub CreateExportMak ($$$) {
 			my $src=&Path_Quote($$ref{Source});
 			&Output(
 				"$dst : $src\n",
-					"\tcopy \"\$?\" \"\$\@\"\n",
+					"\tcp \"\$?\" \"\$\@\"\n",
 				"\n"
 			);
 		}
@@ -1521,9 +1531,9 @@ sub CreateExportMak ($$$) {
 	else {
 		&Output(
 			"CLEANEXPORT :\n",
-			"\t\@echo Nothing to do\n",
+#			"\t\@echo Nothing to do\n",
 			"WHAT :\n",
-			"\t\@rem do nothing\n"
+#			"\t\@rem do nothing\n"
 		);
 	}
 
@@ -1572,20 +1582,20 @@ sub CreatePlatExports ($$) {
 			 my @list = &GetArchiveExportList($Ref);	
 			  foreach (@list) {
 				my $dst=&Path_Quote($_);
-				if ($dst=~/([^\\]*)$/o){
+				if ($dst=~/([^\/]*)$/o){
 					$dst=$1;
 				}
 				my $zipdest=$dst;
-				$zipdest =~ s/\//\\/g;
-			    push  @expgen, "$exp\\$zipdest";
+				$zipdest =~ s/\\/\//g;
+			    push  @expgen, "$exp/$zipdest";
 			    my $zippath= &Path_Chop(&Path_Split('Path', $zipdest));
 				if(!$zippath){
 					$dirsg{$exp}=$exp;
 				}
 				else{
-					 $dirsg{"$exp\\$zippath"}="$exp\\$zippath";
+					 $dirsg{"$exp/$zippath"}="$exp/$zippath";
 				}
-				&Output(" \\\n","\t\$(EMULx)$exp\\$zipdest");
+				&Output(" \\\n","\t\$(EMULx)$exp/$zipdest");
 			 }      
 		 }
 		 else { 
@@ -1631,20 +1641,20 @@ sub CreatePlatExports ($$) {
 			  my @list = &GetArchiveExportList($Ref);
 			  foreach (@list) {
 				my $dst=&Path_Quote($_);
-				if ($dst=~/([^\\]*)$/o){
+				if ($dst=~/([^\/]*)$/o){
 					$dst=$1;
 				}
 				my $zipdest=$dst;
-				$zipdest=~ s/\//\\/g;
-				push  @expurel, "$exp\\$zipdest"; 
+				$zipdest=~ s/\\/\//g;
+				push  @expurel, "$exp/$zipdest"; 
 				my $zippath= &Path_Chop(&Path_Split('Path', $zipdest)); 
 				if(!$zippath){
 				   $dirsurel{$exp}=$exp;
 				}
 				else{
-					$dirsurel{"$exp\\$zippath"}="$exp\\$zippath";
+					$dirsurel{"$exp/$zippath"}="$exp/$zippath";
 				}
-				&Output(" \\\n","\t\$(URELx)$exp\\$zipdest");
+				&Output(" \\\n","\t\$(URELx)$exp/$zipdest");
 			}  
 		}
 		else {
@@ -1722,7 +1732,7 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 		$Test='';
 	}
 	else {
-		$Test='TEST';
+		$Test='test';
 	}
 
 	my $Ref;
@@ -1737,11 +1747,9 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 	} 
 
 
-	my $OutRomFile="$RomDir$RealPlat$Test.IBY";
-	my $GCCDir="gcc\$(PBUILDPID)\\bin";
+	my $OutRomFile="$RomDir$RealPlat$Test.iby";
 	
-	my $erasedefn = "\@erase";
-	$erasedefn = "\@erase 2>>nul" if ($ENV{OS} eq "Windows_NT");
+	my $erasedefn = "\@rm -f";
 
 # Get the root platform name to support hierarchy of customizations	
 	my $root = Plat_Root($Plat);
@@ -1758,12 +1766,12 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 
 		if ($root =~ /^ARMV\d/) {
 
-			unless ( RVCT_plat2set::compiler_exists($Plat) )
+			unless ( rvct_plat2set::compiler_exists($Plat) )
 			{
 				FatalError("Can't find any RVCT installation.");
 			}
 
-			my $rvct_ver = RVCT_plat2set::get_version_string($Plat);
+			my $rvct_ver = rvct_plat2set::get_version_string($Plat);
 
 			if ($Plat =~ "^ARMV5" && $rvct_ver lt "2.2.559")
 			{
@@ -1786,18 +1794,18 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 				return;
 			}
 
-			my $rvct_bin_name = RVCT_plat2set::get_bin_name($Plat);
-			my $rvct_bin_path = RVCT_plat2set::get_bin_path($Plat);
-			my $rvct_inc_name = RVCT_plat2set::get_inc_name($Plat);
-			my $rvct_inc_path = RVCT_plat2set::get_inc_path($Plat);
-			my $rvct_lib_name = RVCT_plat2set::get_lib_name($Plat);
-			my $rvct_lib_path = RVCT_plat2set::get_lib_path($Plat);
+			my $rvct_bin_name = rvct_plat2set::get_bin_name($Plat);
+			my $rvct_bin_path = rvct_plat2set::get_bin_path($Plat);
+			my $rvct_inc_name = rvct_plat2set::get_inc_name($Plat);
+			my $rvct_inc_path = rvct_plat2set::get_inc_path($Plat);
+			my $rvct_lib_name = rvct_plat2set::get_lib_name($Plat);
+			my $rvct_lib_path = rvct_plat2set::get_lib_path($Plat);
 
 			main::Output("export $rvct_bin_name:=$rvct_bin_path\n");
 			main::Output("export $rvct_inc_name:=$rvct_inc_path\n");
 			main::Output("export $rvct_lib_name:=$rvct_lib_path\n");
 
-			my ($rvct_M, $rvct_m, $rvct_b) = RVCT_plat2set::get_version_list($Plat);
+			my ($rvct_M, $rvct_m, $rvct_b) = rvct_plat2set::get_version_list($Plat);
 
 			Output( "\n" );
 			Output( "export RVCT_VER_MAJOR:=$rvct_M\n" );
@@ -1819,29 +1827,18 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 # modified by SV start: makefile improvement 
 		foreach $Ref (@$DataRef) {
 			&Output(
-			"include $BatchPath"."FeatureVariantInfo\\".uc($Plat)."\\"."$Plat$FeatureVariant.$$Ref{Base}.info\n\n",
+			"include $BatchPath"."FeatureVariantInfo/".lc($Plat)."/"."$Plat$FeatureVariant.$$Ref{Base}.info\n\n",
 			);
 		}
 # modified by SV end: makefile improvement 
 	}
 # modified end: makefile improvement 
-	# Don't hardcode the rvct path if rvct auto switch feature is not enabled.
-	if ($ENV{ABLD_PLAT_INI}) 
-	{
-		&Output(
-		'export Path:=',&main::Path_Drive,$E32env::Data{EPOCPath},$GCCDir,";", $rvct_path,"\$(Path)\n",
-		"export PATH:=\$(Path)\n"
-		);
-	}
-	else
-	{
-		&Output(
-		'export Path:=',&main::Path_Drive,$E32env::Data{EPOCPath},$GCCDir,";", "\$(Path)\n",
-		"export PATH:=\$(Path)\n"
-		);
-	}
 
 	&Output(		
+		"#\n",
+		"#   this makefile is for GNU make\n",
+		"#   generated by GnuPoc - EPOC SDK for GNU/Linux\n",
+		"#\n",
 		"\n",
 		"# prevent MAKEFLAGS variable from upsetting calls to NMAKE\n",
 		"unexport MAKEFLAGS\n",
@@ -1913,7 +1910,7 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 	if ($whatcount==0 and !$eDrive) {
 		&Output(
 			"\n",
-			"\t\@rem do nothing\n" 
+#			"\t\@rem do nothing\n" 
 		);
 	}
 
@@ -1924,7 +1921,7 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 	);
 	my $CheckSource=' CHECKSOURCE_GENERIC';
 	foreach $Ref (@$DataRef) {
-		$CheckSource.=" CHECKSOURCE$$Ref{Base}" if ($$Ref{Ext} eq ".MMP");
+		$CheckSource.=" CHECKSOURCE$$Ref{Base}" if ($$Ref{Ext} eq ".mmp");
 	}
 	&Output(
 		"$CheckSource\n"
@@ -1964,7 +1961,7 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 	else {
 		&Output(
 			"\n",
-			"\t\@echo Nothing to do\n"
+#			"\t\@echo Nothing to do\n"
 		);
 	}
 	&Output(
@@ -2033,15 +2030,15 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 
 #		standard commands
 		unless ($$Ref{Makefile}) {
-			my $MakefilePath=join('', &Path_Chop($E32MakePath), $BldInfPath, $$Ref{Base}, "\\", $RealPlat, "\\");
+			my $MakefilePath=join('', &Path_Chop($E32MakePath), $BldInfPath, $$Ref{Base}, "/", lc $RealPlat, "/");
 # modified start: makefile improvement 
 			my $RealMakefile;
 			if($FeatureVariant eq "")
 			{
-				$RealMakefile="-f \"$MakefilePath$$Ref{Base}.$RealPlat$FeatureVariant\"";
+				$RealMakefile="-f \"$MakefilePath$$Ref{Base}." . lc $RealPlat . "$FeatureVariant\"";
 			}
 			else{
-				$RealMakefile="-f \"$MakefilePath$$Ref{Base}.$RealPlat.\$(VARIANT_PLAT_NAME_$$Ref{Base})\"";
+				$RealMakefile="-f \"$MakefilePath$$Ref{Base}." . lc $RealPlat . ".\$(VARIANT_PLAT_NAME_$$Ref{Base})\"";
 			}
 # modified end: makefile improvement 
 			my $MakefileBase="$MakefilePath$$Ref{Base}";		
@@ -2069,7 +2066,7 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 			}
 			if ($RealPlat=~/^(WINS|WINSCW|WINC)$/o) {
 				&Output(
-					" \\\n\t\"$MakefileBase.UID.CPP\""	# Defect: actually uses $BaseTrg, not mmp file name
+					" \\\n\t\"$MakefileBase.uid.cpp\""	# Defect: actually uses $BaseTrg, not mmp file name
 				);
 			}
 			
@@ -2112,7 +2109,7 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 				    "\t$CallMake $RealMakefile MAKEWORK\$(CFG) LISTING\$(CFG)\$(SOURCE)\n",
 				"\n",
 				"FINAL$$Ref{Base} :\n",
-				    "\t\@rem do nothing\n",
+#				    "\t\@rem do nothing\n",
 				"\n",
 			);
 			foreach $Command (qw(CLEANALL)) {
@@ -2180,16 +2177,31 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 			if ($$Ref{Makefile}==2) {
 				$MakefileCall="cd $ChopRefPath;$CallNmake";
 			} else {
-				$MakefileCall="$CallGNUmake -C $ChopRefPath";
-			}
-			$MakefileCall.=" -f \"$$Ref{Base}$$Ref{Ext}\" TO_ROOT=";
-			$MakefileCall.=&Path_Chop(&Path_UpToRoot($$Ref{Path}));
+				my $epocroot = $ENV{EPOCROOT};
+				$epocroot =~ s/\//\\\\/g;
+				my $winChopRefPath = $ChopRefPath;
+				$winChopRefPath =~ s/\//\\\\/g;
+#				$MakefileCall="EPOCROOT=$epocroot wine $CallGNUmake -C $winChopRefPath";
+				$MakefileCall="EPOCROOT=$epocroot extmake \$(VERBOSE) \$(KEEPGOING) -C $winChopRefPath MAKE=extmake";
+			}
+			my $makefile = "$$Ref{Base}$$Ref{Ext}";
+			my $to_root = &Path_Chop(&Path_UpToRoot($$Ref{Path}));
+			my $epocbld = join('', &Path_Chop($E32MakePath),"/",$$Ref{Base}, "/", lc $RealPlat);
+			my $to_bldinf = join('', &Path_Chop(&Path_UpToRoot($$Ref{Path})), $ChopBldInfPath);
+			$makefile =~ s/\//\\\\/g;
+			$to_root =~ s/\//\\\\/g;
+			$epocbld =~ s/\//\\\\/g;
+			$to_bldinf =~ s/\//\\\\/g;
+			$MakefileCall.=" -f \"$makefile\" TO_ROOT=";
+			$MakefileCall.=$to_root;
 			$MakefileCall.=" EPOCBLD=";
-			$MakefileCall.=join('', &Path_Chop(&Path_UpToRoot($$Ref{Path})), &Path_Chop($E32MakePath), $BldInfPath, $$Ref{Base}, "\\", $RealPlat);
+			$MakefileCall.=$epocbld;
 			$MakefileCall.=" TO_BLDINF=";
-			$MakefileCall.=join('', &Path_Chop(&Path_UpToRoot($$Ref{Path})), $ChopBldInfPath);
+			$MakefileCall.=$to_bldinf;
 			if ($$Ref{ExtensionRoot}) {
-				$MakefileCall.=" EXTENSION_ROOT=".&Path_Chop($$Ref{ExtensionRoot});
+				my $extroot = &Path_Chop($$Ref{ExtensionRoot});
+				$extroot =~ s/\//\\\\/g;
+				$MakefileCall.=" EXTENSION_ROOT=".$extroot;
 			}
 			if ($$Ref{BuildAsARM}) {
 			  $MakefileCall.=" BUILD_AS_ARM=1";
@@ -2267,8 +2279,9 @@ sub CreatePlatMak ($$$$$$$$$;$) {
 		}
 
 	}
-	
-	&WriteOutFileL("$BatchPath$Plat$FeatureVariant$Test.MAKE");
+
+	$Plat = lc $Plat;
+	&WriteOutFileL("$BatchPath$Plat$FeatureVariant$Test.make");
 }
 
 sub CreatePlatBatches ($$$) {
@@ -2312,7 +2325,7 @@ sub CreatePlatBatches ($$$) {
 sub WriteOutFileL ($$) { # takes batch file and boolean read-only flag
 	my ($BATFILE, $ReadOnly)=@_;
 
-	$BATFILE=~ s/\//\\/g;  # convert unix slashes from wrappermakefile.pm
+	$BATFILE=~ s/\\/\//g;  # convert unix slashes from wrappermakefile.pm
 
 	eval { &Path_MakePathL($BATFILE); };
 	&FatalError($@) if $@;
diff --git a/bmconv b/bmconv
new file mode 100644
index 0000000..8f7b564
--- /dev/null
+++ b/bmconv
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# bmconv - bash frontend for bmconv.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/bpabiutl.pm b/bpabiutl.pm
index f0b4c54..a230894 100644
--- a/bpabiutl.pm
+++ b/bpabiutl.pm
@@ -15,7 +15,7 @@
 # 
 #
 
-package BPABIutl;
+package bpabiutl;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -25,8 +25,8 @@ require Exporter;
 	BPABIutl_Get_Config_Variables
 );
 
-use E32Variant;
-require E32Plat;
+use e32variant;
+require e32plat;
 
 my %ConfigPath;
 my $variantABIV2Keyword = &Variant_GetMacro();
@@ -42,10 +42,10 @@ sub BPABIutl_Plat_List {
 	if (exists($ENV{'SYMBIAN_COMPILATION_CONFIG_DIR'})) 
 	{
 		my $Path = $ENV{SYMBIAN_COMPILATION_CONFIG_DIR};
-		@CompilerConfigPath = split(/;/, $Path);
+		@CompilerConfigPath = split(/:/, $Path);
 	}
 
-	push @CompilerConfigPath, "$ENV{EPOCROOT}epoc32\\tools\\compilation_config";
+	push @CompilerConfigPath, "$ENV{EPOCROOT}epoc32/tools/compilation_config";
 
 	my $ConfigDir;
 	my @BPABIPlats = ();
@@ -71,13 +71,13 @@ sub BPABIutl_Plat_List {
 				}
 			}
 			unless (grep /$Plat$/i, @BPABIPlats) {
-				$Plat = uc $Plat;
-				push @BPABIPlats, $Plat;
+				$Plat = lc $Plat;
+				push @BPABIPlats, uc $Plat;
 				if (!$variantABIV2Keyword && $Plat =~ /^ARMV5_ABIV2$/i) {
-					$ConfigPath{$Plat} = "$ConfigDir\\ARMV5.mk";
+					$ConfigPath{$Plat} = "$ConfigDir/armv5.mk";
 				}
 				else {
-					$ConfigPath{$Plat} = "$ConfigDir\\$Plat.mk";
+					$ConfigPath{$Plat} = "$ConfigDir/$Plat.mk";
 				}
 			}
 		}
@@ -97,7 +97,7 @@ sub BPABIutl_Config_Path($) {
 	if (!$ConfigPath{$plat})
 	{
 		# Get the root platform name to support hierarchy of customizations
-		my $CustomizedPlat =  &E32Plat::Plat_Root($plat);
+		my $CustomizedPlat =  &e32plat::Plat_Root($plat);
 
 # In default ABIV1 mode, the platform name for v2 mode of ARMV5 is ARMV5_ABIV2
 		if ( !$variantABIV2Keyword && $CustomizedPlat =~ /^ARMV5$/i ){
@@ -112,7 +112,8 @@ sub BPABIutl_Config_Path($) {
 			$ConfigPath{$plat}=$ConfigPath{$CustomizedPlat};
 		}
 	}
-	return "$ConfigPath{$plat}";
+	my $lc_plat = lc $plat;
+	return "$ConfigPath{$lc_plat}";
 }
 
 # routine to extract a set of variables from the compilation configuration
@@ -122,7 +123,7 @@ sub BPABIutl_Get_Config_Variables
 {
     my ($plat) = @_;
     my $configfile = BPABIutl_Config_Path($plat);
-    my $extractvars = "$ENV{EPOCROOT}epoc32\\tools\\compilation_config\\extractvars.make";
+    my $extractvars = "$ENV{EPOCROOT}epoc32/tools/compilation_config/extractvars.make";
     my $command = "make CONFIG_FILE=$configfile -s -f $extractvars" ;
     my $result = `$command`;
     my %vars;
diff --git a/checkgcc.pm b/checkgcc.pm
index 9f011e5..4af73e0 100644
--- a/checkgcc.pm
+++ b/checkgcc.pm
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -15,31 +16,28 @@
 # 
 #
 
-package CheckGcc;
+package checkgcc;
 
-use Preprocessor;
+use preprocessor;
 
 
 sub CheckGcc_Default()
 {
  	# die if CPP.EXE (or whatever) in a dodgy place in the path
 	my $pbp = $ENV{PBUILDPID};
-	my @Paths=split ';', $ENV{Path};
+	my @Paths=split ':', $ENV{PATH};
 	unshift @Paths,'.';	# add the current directory
 	foreach (@Paths) {
-		s-/-\\-go;	# for those working with UNIX shells
-		s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
-		if ((-e $_.'CPP.EXE') or (-e $_.'CPP.BAT') or (-e $_.'CPP.CMD')) {
-			unless (/\\GCC(\w\w)?\\BIN\\$/i) {
-				unless (lc($1) eq lc($pbp)) {
+		s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
+		if (-e $_.'arm-none-symbianelf-cpp') {
+			unless (/\/bin\/$/i) {
 					die
 						"ERROR: First CPP executable found in path is in $_,\n",
-						"but the required CPP.EXE was expected to be found in a directory\n",
-						"with a name ending in \\GCC$pbp\\BIN\\, where the Cygnus tools\n",
+						"but the required CPP was expected to be found in a directory\n",
+						"with a name ending in /bin/, where the Cygnus tools\n",
 						"this program depends upon are stored.\n",
 						"Is your path set up correctly?\n"
 					;
-				}
 			}
 			return;
 		}
diff --git a/checklib b/checklib
new file mode 100644
index 0000000..7f432dc
--- /dev/null
+++ b/checklib
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# checklib - bash frontend for checklib.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+if [ "`which wine`" = "" ]; then
+	echo Wine not available, skipping the checklib step
+	exit 0
+fi
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/checksource.pl b/checksource.pl
index 44fa142..fb295b9 100644
--- a/checksource.pl
+++ b/checksource.pl
@@ -19,10 +19,10 @@ use FindBin;
 use Cwd;
 use Getopt::Long qw(:config posix_default);		#permits "+" in arguments, rather than as an option identifier
 use lib $FindBin::Bin;
-use CheckSource;
-use Pathutl;
+use checksource;
+use pathutl;
 
-my $preprocessCall = "cpp.exe -w -undef -nostdinc -+ -dI";
+my $preprocessCall = "arm-none-symbianelf-cpp -w -undef -nostdinc -x c++ -dI";
 
 my $verbose = 0;
 
diff --git a/checksource.pm b/checksource.pm
index ad78c64..1d41144 100644
--- a/checksource.pm
+++ b/checksource.pm
@@ -16,7 +16,7 @@
 #
 
 
-package CheckSource;
+package checksource;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -38,10 +38,9 @@ our $CheckSource_NoUserSystemDistinction = 1;
 );
 
 use Cwd;
-use Pathutl;
-use Win32;
+use pathutl;
 
-my $exclusionsFile = $ENV{EPOCROOT}."epoc32\\tools\\filenamepolicyexclusions.txt";
+my $exclusionsFile = $ENV{EPOCROOT}."epoc32/tools/filenamepolicyexclusions.txt";
 
 my $makefileWarningPrefix = "\@echo ";
 my $checksourcePrefix = "\@perl -S checksource.pl";
@@ -141,7 +140,7 @@ sub CheckSource_Physical (\%$$$$;$;$)
 			$searchText =~ s/(\.def)/\?$1/i if ($item !~ /NOSTRICTDEF/);
 			$searchText =~ s/\~/\*/;			
 			$physicalReference = $searchText;
-			$physicalReference =~ s/\//\\/g;
+			$physicalReference =~ s/\\/\//g;
 			$physicalReference =~ s/\?/u/;
 			$physicalReference =~ s/\.\w+$/\.def/;
 			$physicalReference = &Path_Split ('File', $physicalReference);			
@@ -163,11 +162,11 @@ sub CheckSource_Physical (\%$$$$;$;$)
 			}
 		elsif ($reference =~ /^\+/)
 			{
-			$physicalLocation = $ENV{EPOCROOT}."epoc32\\";
+			$physicalLocation = $ENV{EPOCROOT}."epoc32/";
 			}
 		elsif ($item =~ /EXTENSIONS/)
 			{
-			$physicalLocation = $ENV{EPOCROOT}."epoc32\\tools\\makefile_templates\\";
+			$physicalLocation = $ENV{EPOCROOT}."epoc32/tools/makefile_templates/";
 			}
 		else
 			{
@@ -177,7 +176,7 @@ sub CheckSource_Physical (\%$$$$;$;$)
 		$physicalCheck = $physicalLocation.$physicalReference;
 		}
 
-	$physicalCheck =~ s/\//\\/g;
+	$physicalCheck =~ s/\\/\//g;
 	$physicalCheck = &Path_Strip ($physicalCheck);
 
 	# If a file reference is actually under \epoc32, we just need to confirm that it's lowercase
@@ -188,16 +187,16 @@ sub CheckSource_Physical (\%$$$$;$;$)
 		}
 
 	# Massage search text to provide something we can compare with a physical check on the filesystem
-	$searchText =~ s/\//\\/g;
-	$searchText =~ s/\.\.\\//g;
-	$searchText =~ s/\.\\//g;
-	$searchText =~ s/\\\\/\\/g;
+	$searchText =~ s/\\/\//g;
+	$searchText =~ s/\.\.\///g;
+	$searchText =~ s/\.\///g;
+	$searchText =~ s/\/\//\//g;
 
 	my $warningSearchText = $searchText;	# Record a more intelligible version of the search text for warning purposes
 	
 	$searchText = quotemeta ($searchText);
-	$searchText =~ s/\\\*/\\w\+/g;			# * -> \w+
-	$searchText =~ s/\\\?/\\w\{1\}/g;		# ? -> \w{1}
+	$searchText =~ s/\/\*/\/w\+/g;			# * -> \w+
+	$searchText =~ s/\/\?/\/w\{1\}/g;		# ? -> \w{1}
 
 	my $physicalReality = getPhysical ($physicalCheck);
 
@@ -269,9 +268,9 @@ sub CheckSource_Includes ($\%$\@;\@;\@;$)
 
 		if ($macro =~ /__ARMCC_2_2__/)
 			{
-			$platformPreInclude = $ENV{EPOCROOT}."epoc32\\include\\rvct2_2\\rvct2_2.h";
+			$platformPreInclude = $ENV{EPOCROOT}."epoc32/include/rvct2_2/rvct2_2.h";
 
-			if (($sourceFile =~ /BASE\\E32\\compsupp\\/i) && $ENV{RVCT22INC})
+			if (($sourceFile =~ /base\/e32\/compsupp\//i) && $ENV{RVCT22INC})
 				{					
 				# Need some way to deal with ARMINC from the front-end...
 				my $rvctIncDir = $ENV{RVCT22INC};
@@ -280,11 +279,11 @@ sub CheckSource_Includes ($\%$\@;\@;\@;$)
 			}
 		elsif ($macro =~ /__GCCE__/)
 			{
-			$platformPreInclude = $ENV{EPOCROOT}."epoc32\\include\\GCCE\\GCCE.h";
+			$platformPreInclude = $ENV{EPOCROOT}."epoc32/include/gcce/gcce.h";
 
-			my $GCCEinstall = Cl_bpabi::getConfigVariable('COMPILER_INSTALL_PATH');
+			my $GCCEinstall = cl_bpabi::getConfigVariable('CC_INSTALL_PATH');
 			
-			push @systemIncludes, "\"\\\"$GCCEinstall\\..\\lib\\gcc\\arm-none-symbianelf\\3.4.3\\include\\\"\"";
+			push @systemIncludes, "\"/\"$GCCEinstall/../lib/gcc/arm-none-symbianelf/3.4.3/include/\"\"";
 			}
 		}
 
@@ -313,12 +312,12 @@ sub CheckSource_Includes ($\%$\@;\@;\@;$)
 
 	foreach my $include (@systemIncludes)
 		{
-		$include =~ s/\\$//;
+		$include =~ s/\/$//;
 		$include = getDrive().$include if (($include !~ /^[a-zA-Z]:/) && ($include !~ /^[\"|\.]/));
 		$call .= "-I $include ";
 		}
 
-	$sourceFile =~ s/\//\\/g;
+	$sourceFile =~ s/\\/\//g;
 	$sourceFile = &Path_Strip ($sourceFile);
 	$sourceFile = getDrive().$sourceFile;
 
@@ -337,7 +336,7 @@ sub CheckSource_ExportedIncludes ($$\%)
 	# Exclude exported files as appropriate
 	if ($destinationFile)
 		{
-		my $epoc32Include = quotemeta ($ENV{EPOCROOT})."epoc32\\\\include";
+		my $epoc32Include = quotemeta ($ENV{EPOCROOT})."epoc32/include";
 		return if ($destinationFile !~ /^$epoc32Include/i);
 		return if ($destinationFile =~ /\.def$/i);
 		}
@@ -394,7 +393,7 @@ sub constructWarning ($$$$$;$)
 	{
 	my ($sourceFile, $lineNumber, $item, $warningText, $reference, $suffix) = @_;
 
-	$sourceFile =~ s/\//\\/g;
+	$sourceFile =~ s/\\/\//g;
 	$sourceFile = Win32::GetLongPathName($sourceFile);
 	$sourceFile =~ s/^[a-zA-Z]{1}://;
 	$sourceFile = &Path_Strip ($sourceFile);
@@ -434,7 +433,7 @@ sub lowercaseExclusionCheck ($)
 
 		$exclusion =~ s/^\s+//;
 		$exclusion =~ s/\s+$//;
-		$exclusion =~ s/\//\\/g;
+		$exclusion =~ s/\\/\//g;
 		my $quotemetaExclusion = quotemeta ($exclusion);
 
 		if ($referenceDOSSlash =~ /^$quotemetaExclusion$/i)
diff --git a/cl_arm.pm b/cl_arm.pm
index 61846be..462ae70 100644
--- a/cl_arm.pm
+++ b/cl_arm.pm
@@ -14,7 +14,7 @@
 #
 
 
-package Cl_arm;
+package cl_arm;
 
 my $ToolPrefix='';
 my %PlatOpt=(
@@ -70,11 +70,11 @@ require Exporter;
 );
 
 use Cwd;
-use Armutl;
-use RVCT_plat2set;
+use armutl;
+use rvct_plat2set;
 use cl_generic;
-use E32env;
-use Genutl;
+use e32env;
+use genutl;
 
 use constant NOCOMPRESSIONMETHOD => 0;
 use constant INFLATECOMPRESSIONMETHOD => 1;
@@ -94,7 +94,7 @@ sub PMHelp_Mmp {
 
 my $Plat=main::Plat();
 
-my ($RVCTMajorVersion, $RVCTMinorVersion, $RVCTBuildNumber) = RVCT_plat2set::get_version_list($Plat); 
+my ($RVCTMajorVersion, $RVCTMinorVersion, $RVCTBuildNumber) = rvct_plat2set::get_version_list($Plat); 
 
 my $RVCTVersion = "${RVCTMajorVersion}_${RVCTMinorVersion}";
 
@@ -133,12 +133,12 @@ my $symNameLkupOpt = '';
 
 sub PMPlatProcessMmp (@) {
         &Armutl_DoMmp(@_);
-	$ArmIncDir = RVCT_plat2set::get_inc_path($Plat);
+	$ArmIncDir = rvct_plat2set::get_inc_path($Plat);
 	&main::SetStdIncPaths($ArmIncDir);
 	@ArmLibList = &Armutl_ArmLibList;
 	$ArmRT = &Armutl_ArmRT;
 	my @AsmFileList = &Armutl_AsmFileList;
-	foreach (@AsmFileList) { $AsmFiles{ucfirst lc $_} = 1; }
+	foreach (@AsmFileList) { $AsmFiles{$_} = 1; }
 }
 
 sub SysTrg () {
@@ -371,7 +371,7 @@ sub PMStartBldList($) {
 	my $DefFile=&main::DefFile;
 	my $EPOCPath=&main::EPOCPath;
 	my $LinkAs=&main::LinkAs;
-	my $LibPath=&main::LibPath.'LIB\\';
+	my $LibPath=&main::LibPath.'lib/';
 	my @MacroList=&main::MacroList();
 	push @MacroList, "__SUPPORT_CPP_EXCEPTIONS__";
 
@@ -464,23 +464,6 @@ sub PMStartBldList($) {
 
 	&Generic_Header(0,$Makecmd);	# define standard things using absolute paths
 		 
-	if ($Makecmd eq "nmake") {
-		&main::Output(
-			"\n",
-  			"PATH=",&main::Path_Drive,$EPOCPath,"gcc\$(PBUILDPID)\\bin;\$(PATH)\n",
-			"\n"
-		);
-	}
-	else {
-		&main::Output(
-			"\n",
-			"# must set both PATH and Path to make it work correctly\n",
-  			"Path:=",&main::Path_Drive,$EPOCPath,"gcc\$(PBUILDPID)\\bin;\$(Path)\n",
-			"PATH:=\$(Path)\n",
-			"\n"
-		);
-	}
-
 	&main::Output(
 		"INCDIR  ="
 	);
@@ -633,7 +616,7 @@ sub PMStartBldList($) {
 		if ($BasicTrgType !~ /IMPLIB/io) {
 			&main::Output (
 				" \\\n\t",
-				&Generic_Quote("\$(EPOCTRG$_)\\".&main::Trg($_))
+				&Generic_Quote("\$(EPOCTRG$_)/".&main::Trg($_))
 			);
 		}
 
@@ -668,12 +651,12 @@ sub PMStartBldList($) {
 		unless (&main::ExportUnfrozen) {
 			if (-e $DefFile) { # effectively "if project frozen ..."
 				&main::Output(
-					" ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.lib"),
+					" ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.lib"),
 				);
 				# if elf2e32.exe(postlinker) exists, then generate .dso along with .lib
 				if ($IsExistELF2E32EXE) {
 					&main::Output(
-						" ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.dso"), "\n"
+						" ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.dso"), "\n"
 					);
 				}
 				else {
@@ -690,49 +673,49 @@ sub PMStartBldList($) {
 		} else {
 			&main::Output(
 				"\n",
-				"\t\@echo Not attempting to create \"\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.lib\"\n",
+				"\t\@echo Not attempting to create \"\$(EPOCLIB)/lib/$PrimaryExportLibrary.lib\"\n",
 				"\t\@echo from frozen .DEF file, since EXPORTUNFROZEN specified.\n"
 			);
 		}
 
 		my $theDefFile = $DefFile;
-		$theDefFile = "\$(EPOCBLD)\\$BaseTrg.def" unless (-e $DefFile);
+		$theDefFile = "\$(EPOCBLD)/$BaseTrg.def" unless (-e $DefFile);
 		&main::Output(
 			"\n",
 			"\n",
 			"# REAL TARGET - LIBRARY\n",
 			"\n",
-			&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.lib"), " : ",
+			&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.lib"), " : ",
 			&Generic_Quote($DefFile), "\n",
-				"\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
-				"\tdef2dll.bat --path=\$(EPOCLIB)\\LIB \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--import=$ExportLibrary \\\n",
-			"\t\t--deffile=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking\n",
+				"\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)/$ExportLibrary.prep.def\"\n",
+				"\tdef2dll --path=\$(EPOCLIB)/lib \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--import=$ExportLibrary \\\n",
+			"\t\t--deffile=\"\$(EPOCBLD)/$ExportLibrary.prep.def\" \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking\n",
 			"\n",
 		 );
 		if ($ExtraExportLibrary) {
 			&main::Output(
 				"\n",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib"), " : ",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.lib"), "\n",
-				"\tcopy \"\$<\" \"\$@\"\n"
+				&Generic_Quote("\$(EPOCLIB)/lib/$ExtraExportLibrary.lib"), " : ",
+				&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.lib"), "\n",
+				"\tcp \"\$<\" \"\$@\"\n"
 			);
 		}
 		#if elf2e32.exe(postlinker) exists, then generate .dso(which will be used by ABIV2 platforms)
 		if ($IsExistELF2E32EXE) {
 			&main::Output(
 				"\n",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), " : ",
+				&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), " : ",
 				&Generic_Quote($DefFile), "\n",
-					"\telf2e32 --definput=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" --dso=",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"),
+					"\telf2e32 --definput=\"\$(EPOCBLD)/$ExportLibrary.prep.def\" --dso=",
+					&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"),
 					" --linkas=$LinkAs\n"
 			);
 			if ($ExtraExportLibrary) {
 				&main::Output(
 					"\n",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso"), " : ",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), "\n",
-					"\tcopy \"\$<\" \"\$@\"\n"
+					&Generic_Quote("\$(EPOCLIB)/lib/$ExtraExportLibrary.dso"), " : ",
+					&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), "\n",
+					"\tcp \"\$<\" \"\$@\"\n"
 				);
 			}		
 		}		
@@ -769,7 +752,7 @@ sub PMStartBldList($) {
 	if ($DefFile and $BasicTrgType!~/^IMPLIB$/io) {
 # 	    call perl on the script here so make will die if there are errors 
 #           - this doesn't happen if calling perl in a batch file
-	    &main::Output( "\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n" );
+	    &main::Output( "\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)/$ExportLibrary.def\" \n" );
 	}
 	&main::Output(
 		"\n",
@@ -777,11 +760,11 @@ sub PMStartBldList($) {
 	);
 	if ($DefFile and !$NoExportLibrary) {
 		&main::Output(
-			"\t-\$(ERASE) \"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\"\n"
+			"\t-\$(ERASE) \"\$(EPOCLIB)/lib/$ExportLibrary.lib\"\n"
 		);
 		if ($ExtraExportLibrary) {
 			&main::Output(
-				"\t-\$(ERASE) \"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib\"\n"
+				"\t-\$(ERASE) \"\$(EPOCLIB)/lib/$ExtraExportLibrary.lib\"\n"
 			);
 		}
 	}
@@ -1016,33 +999,33 @@ sub PMBld {
 			# Temporary Workaround for RVCT2.1 static libs problem with RVCT2.2 builds
 			&main::Output(
 				" \\\n\t",
-				&Generic_Quote("\$(EPOCSTATLINK$Bld)\\EDLLSTUB$RVCTVersion.lib")
+				&Generic_Quote("\$(EPOCSTATLINK$Bld)/edllstub$RVCTVersion.lib")
 			);
 		}
 		else {
 			&main::Output(
 				" \\\n\t",
-				&Generic_Quote("\$(EPOCSTATLINK$Bld)\\EDLLSTUB.lib")
+				&Generic_Quote("\$(EPOCSTATLINK$Bld)/edllstub.lib")
 			);
 		}
 	}
 	    
-        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList);
-        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @LibList);
+        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)/\$_\"\)", @StatLibList);
+        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @LibList);
 
 		#OE Import Libraries 
 		if ( $TrgType=~/^STDEXE$/o || $TrgType=~/^STDDLL$/o ) 
 		{
-			PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @oe_import_library_list);
+			PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @oe_import_library_list);
 		}
 
 		#OE Glue Code
 		if ($TrgType=~/^STDEXE$/o) {
 			if (&main::IsWideCharMain()) {
-				PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\$Bld\\\\\$_\"\)", @oe_exe_libs_wchar);
+				PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/$Bld/\$_\"\)", @oe_exe_libs_wchar);
 			}
 			else {
-				PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\$Bld\\\\\$_\"\)", @oe_exe_libs);
+				PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/$Bld/\$_\"\)", @oe_exe_libs);
 			}
 		}
 
@@ -1051,7 +1034,7 @@ sub PMBld {
         $StaticRTLib = "ksrt${RVCTVersion}" if ($SystemTrg);
         &main::Output(
 	        " \\\n\t",
-		&Generic_Quote("\$(EPOCSTATLINK$Bld)\\$StaticRTLib\.lib")
+		&Generic_Quote("\$(EPOCSTATLINK$Bld)/$StaticRTLib\.lib")
 		) unless ($Trg =~ /(U|K)SRT/i || ($BasicTrgType=~/^LIB$/o));
 
 	unless ($ArmRT || ($BasicTrgType=~/^LIB$/o)) {
@@ -1061,7 +1044,7 @@ sub PMBld {
 			foreach (@RTLibList) {
 				&main::Output(
 					" \\\n\t",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$_")
+					&Generic_Quote("\$(EPOCLIB)/lib/$_")
 				) unless ($_ =~ /$TargLib/i);
 			}
 	    }
@@ -1082,8 +1065,8 @@ sub PMBld {
 	&main::Output(
 		"VTBLEXPORTS$Bld="
 	);
-        my $vtobj = quotemeta("(VtblExports.o)");
-        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_$vtobj\"\)", @LibList);
+        my $vtobj = quotemeta("\\(VtblExports.o\\)");
+        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_$vtobj\"\)", @LibList);
 	&main::Output(
 		"\n",
 		"\n"
@@ -1097,7 +1080,7 @@ sub PMBld {
 	if ( defined( $ENV{LOCAL_BUILD_PATH} ) )  {
 		$replacement = 	$ENV{"LOCAL_BUILD_PATH"};
 		my $epocroot=$ENV{"EPOCROOT"};
-		my $match = "\Q${epocroot}\EEPOC32\\\\BUILD";
+		my $match = "\Q${epocroot}\Eepoc32/build";
 		$bldPath =~ s/${match}/${replacement}/;
 	}
 #	Must add StringTable obj files first to preserve Evalid results consistency.
@@ -1117,7 +1100,7 @@ sub PMBld {
 
 	        &main::Output(
 		        " \\\n\t",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o")
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o")
 		      );
 
 #	Only add if not already added from @StringTables
@@ -1143,13 +1126,13 @@ sub PMBld {
 
         if ($BasicTrgType=~/^LIB$/o) {
 	        &main::Output(
-		      &Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"),
+		      &Generic_Quote("\$(EPOCTRG$Bld)/$Trg"),
 		      " : \$(OBJECTS$Bld)"
 		);
         } else {
 	        &main::Output(
-		      &Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"), " : ",
-		      &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg.in")
+		      &Generic_Quote("\$(EPOCTRG$Bld)/$Trg"), " : ",
+		      &Generic_Quote("\$(EPOCBLD$Bld)/$BaseTrg.in")
 	        );
         }
 
@@ -1160,7 +1143,7 @@ sub PMBld {
 	}
 	if ($BasicTrgType=~/^(EXE|DLL)$/o) {
 		&main::Output(
-			" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$FirstLib")
+			" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$FirstLib")
 		);
 	}
 	&main::Output(
@@ -1170,23 +1153,23 @@ sub PMBld {
 #	generate an export object from the ordered .DEF file
         if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o || $TrgType=~/^EXEDLL$/o) {
 #       	make the .exp file a dependency for targets that have exports		
-		&main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), "\n");
+		&main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), "\n");
 		if (&main::ExportUnfrozen) {
 		    &main::Output(
-			"\tdef2dll.bat --path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD$Bld) \\\n\t\t--export=$ExportLibrary \\\n\t\t--import=$ExportLibrary\\\n",
-			"\t\t--deffile=\$(EPOCBLD$Bld)\\$ExportLibrary.def \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking $symNameLkupOpt\n",
+			"\tdef2dll --path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD$Bld) \\\n\t\t--export=$ExportLibrary \\\n\t\t--import=$ExportLibrary\\\n",
+			"\t\t--deffile=\$(EPOCBLD$Bld)/$ExportLibrary.def \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking $symNameLkupOpt\n",
 		    );
 		    &main::Output(
 		        "\n",
-		        "\tcopy ", " \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\" ",
-		        "\"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\"",
+		        "\tcp ", " \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\" ",
+		        "\"\$(EPOCLIB)/lib/$ExportLibrary.lib\"",
 		        "\n"
 		    );
 		    if ($ExtraExportLibrary) {
 			&main::Output(
 			    "\n",
-			    "\tcopy \"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\" ",
-			    "\"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib\"",
+			    "\tcp \"\$(EPOCLIB)/lib/$ExportLibrary.lib\" ",
+			    "\"\$(EPOCLIB)/lib/$ExtraExportLibrary.lib\"",
 			    "\n"
 			);
 		    }			    
@@ -1194,14 +1177,14 @@ sub PMBld {
 		    if ($IsExistELF2E32EXE) {
 			    &main::Output(
 				    "\n",
-				    "\telf2e32 --definput=\"\$(EPOCBLD$Bld)\\$ExportLibrary.def\" --dso=",
-				    "\$(EPOCLIB)\\LIB\\$ExportLibrary.dso --linkas=$LinkAs\n"
+				    "\telf2e32 --definput=\"\$(EPOCBLD$Bld)/$ExportLibrary.def\" --dso=",
+				    "\$(EPOCLIB)/lib/$ExportLibrary.dso --linkas=$LinkAs\n"
 			    );
 			    if ($ExtraExportLibrary) {
 				    &main::Output(
 					    "\n",
-					    "\tcopy \"\$(EPOCLIB)\\LIB\\$ExportLibrary.dso\" ",
-					    "\"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso\"",
+					    "\tcp \"\$(EPOCLIB)/lib/$ExportLibrary.dso\" ",
+					    "\"\$(EPOCLIB)/lib/$ExtraExportLibrary.dso\"",
 					    "\n"
 				    );
 			    }		
@@ -1209,7 +1192,7 @@ sub PMBld {
 	        }
 	} elsif($NamedSymLkup){
 #		For an EXE, generate the .exp to accomodate 0th ordinal
-		&main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), "\n");
+		&main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), "\n");
 	}
 	else {
 	    &main::Output("\n");
@@ -1218,7 +1201,7 @@ sub PMBld {
 #       get rid of any -symbols produced .map file
         if ($BasicTrgType=~/^(DLL|EXE)/o) {
 	        &main::Output(
-			"\t-\$(ERASE) \"\$(EPOCTRG$Bld)\\$Trg.map\" \n"
+			"\t-\$(ERASE) \"\$(EPOCTRG$Bld)/$Trg.map\" \n"
 		);	
 	}
 #		Generate the dependency info - This is required to put the libraries in the same order
@@ -1227,7 +1210,7 @@ sub PMBld {
 			&main::Output(
 			"\tperl -S deputil.pl $InterWorking --path=\$(EPOCBLD$Bld) \\\n",
 			 "\t\t--out=$ExportLibrary \\\n",
-			 "\t\t--libpath=\$(EPOCLIB)\\LIB \\\n",
+			 "\t\t--libpath=\$(EPOCLIB)/lib \\\n",
 			 "\t\t\$(LIBS$Bld)\n",
 			);
 		}
@@ -1273,8 +1256,8 @@ sub PMBld {
 		            $ObjFile = "V_ENTRY_.o";
 	            }
 	            &main::Output(
-				    "\t\t${oP}entry _E32Dll \$(EPOCSTATLINK$Bld)\\$FirstLib($ObjFile) \$(EPOCSTATLINK$Bld)\\$FirstLib \\\n",
-				    "\t\t\$(EPOCBLD$Bld)\\$ExportLibrary.exp \\\n"
+				    "\t\t${oP}entry _E32Dll \$(EPOCSTATLINK$Bld)/$FirstLib($ObjFile) \$(EPOCSTATLINK$Bld)/$FirstLib \\\n",
+				    "\t\t\$(EPOCBLD$Bld)/$ExportLibrary.exp \\\n"
 				);
 	        } elsif ($BasicTrgType=~/^EXE$/o || $TrgType=~/^EXEXP$/o) {
 			    # get the right object file for the entry point
@@ -1289,36 +1272,36 @@ sub PMBld {
 					} 
 				} 
 			    
-			    &main::Output( "\t\t${oP}entry _E32Startup \$(EPOCSTATLINK$Bld)\\$FirstLib($ObjFile) \$(EPOCSTATLINK$Bld)\\$FirstLib \\\n" );
+			    &main::Output( "\t\t${oP}entry _E32Startup \$(EPOCSTATLINK$Bld)/$FirstLib\\($ObjFile\\) \$(EPOCSTATLINK$Bld)/$FirstLib \\\n" );
 			    if ($TrgType=~/^EXEXP$/o || $TrgType=~/^EXEDLL$/o || $NamedSymLkup) {
-					&main::Output( "\t\t\$(EPOCBLD$Bld)\\$ExportLibrary.exp \\\n" );
+					&main::Output( "\t\t\$(EPOCBLD$Bld)/$ExportLibrary.exp \\\n" );
 			    }
 			}
 			if($NamedSymLkup) {
 				&main::Output(
-				"\t\t--edit \"\$(EPOCBLD$Bld)\\$ExportLibrary.dep\" \\\n"
+				"\t\t--edit \"\$(EPOCBLD$Bld)/$ExportLibrary.dep\" \\\n"
 				);
 			}
 	        &main::Output(
-		        "\t\t-o \"\$(EPOCBLD$Bld)\\$Trg\" \\\n",
-		        "\t\t${oP}symbols ${oP}list \"\$(EPOCTRG$Bld)\\$Trg.map\" \\\n",
-				"\t\t\$(EPOCBLD$Bld)\\$BaseTrg.in \\\n"
+		        "\t\t-o \"\$(EPOCBLD$Bld)/$Trg\" \\\n",
+		        "\t\t${oP}symbols ${oP}list \"\$(EPOCTRG$Bld)/$Trg.map\" \\\n",
+				"\t\t\$(EPOCBLD$Bld)/$BaseTrg.in \\\n"
 			);
 	        &main::Output(
-		        "\t\t\$(LIBS$Bld) \\\n",
+			"\t\t\$(addsuffix ',\$(addprefix ',\$(LIBS$Bld))) \\\n",
 				"\t\t\$(VTBLEXPORTS$Bld) \$(USERLDFLAGS) \n"
 			);
 
 	        if(&main::DebugSwitchUsed() ){
 				if(&main::SymbolicDebugEnabled() ) {
 				&main::Output(
-					"\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$FeatureVariantBaseTrg.sym\"\n"
+					"\tcp \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$FeatureVariantBaseTrg.sym\"\n"
 					);
 				}
 			}
 	        elsif ($Bld=~/^UDEB$/o) {
 	               &main::Output(
-			       "\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$FeatureVariantBaseTrg.sym\"\n"
+			       "\tcp \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$FeatureVariantBaseTrg.sym\"\n"
 		       );
 	        }
 		
@@ -1460,7 +1443,7 @@ sub PMBld {
 			"\\\n\t\t"
 		);
 		&main::Output(
-			" \"\$(EPOCBLD$Bld)\\$Trg\""
+			" \"\$(EPOCBLD$Bld)/$Trg\""
 		);
 		&main::Output(
 			"\\\n\t\t"
@@ -1475,7 +1458,7 @@ sub PMBld {
          }
          elsif ($BasicTrgType=~/^LIB$/o) {
 	        &main::Output(
-		        "\tarmar ${oP}create \$(EPOCSTATLINK$Bld)\\$Trg ${oP}via $objectsViaFile\n"
+		        "\tarmar ${oP}create \$(EPOCSTATLINK$Bld)/$Trg ${oP}via $objectsViaFile\n"
 		);
          }
 
@@ -1496,7 +1479,7 @@ sub PMBld {
     #------------
 	 
     &main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg.in"), ": \$(OBJECTS$Bld)\n",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseTrg.in"), ": \$(OBJECTS$Bld)\n",
  	    "\t$Link $linkerDebugOpt ${oP}partial \\\n",
 	    "\t\t-o \$\@ \\\n",
 	    "\t\t${oP}via $objectsViaFile\n\n",
@@ -1509,7 +1492,7 @@ sub PMBld {
 	    # TARGET *.EXP
 	    #------------
 	    &main::Output(
-		    &Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), ": \$(EPOCBLD$Bld)\\$BaseTrg.in"
+		    &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), ": \$(EPOCBLD$Bld)/$BaseTrg.in"
 	    );
 
 # if project is frozen, makedef (and hence the .exp file) are dependent upon it
@@ -1520,9 +1503,9 @@ sub PMBld {
 		}
 
 	    &main::Output(
-		"\n\tperl -S elf2inf.pl -o \$(EPOCBLD$Bld)\\$ExportLibrary.inf \\\n", 
+		"\n\tperl -S elf2inf.pl -o \$(EPOCBLD$Bld)/$ExportLibrary.inf \\\n", 
 		"\t\t\$\<",
-		"\n\tperl -S makedef.pl $AbsentSubst -Inf \$(EPOCBLD$Bld)\\$ExportLibrary.inf \\\n"
+		"\n\tperl -S makedef.pl $AbsentSubst -Inf \$(EPOCBLD$Bld)/$ExportLibrary.inf \\\n"
 	    );
     	if (!$DefFile || $NoExportLibrary) {    			
     		&main::Output( "\t\t-ignore_unfrozen_noncallable \\\n" );
@@ -1552,12 +1535,12 @@ sub PMBld {
 		    $Num++;
 	    }
 	    
-	    my $theDefFile = "\$(EPOCBLD$Bld)\\$ExportLibrary.def";
+	    my $theDefFile = "\$(EPOCBLD$Bld)/$ExportLibrary.def";
 	    $theDefFile = $DefFile if (-e $DefFile && !&main::ExportUnfrozen);
 	    &main::Output(
-		"\t\t\"\$(EPOCBLD$Bld)\\$ExportLibrary.def\"\n",
-		"\tcopy \"\$(EPOCBLD$Bld)\\$ExportLibrary.def\" \"\$(EPOCBLD)\\$ExportLibrary.def\"\n",
-		"\tdef2dll.bat $AbsentSubst \\\n\t\t--path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD$Bld) \\\n\t\t--export=$ExportLibrary \\\n",
+		"\t\t\"\$(EPOCBLD$Bld)/$ExportLibrary.def\"\n",
+		"\tcp \"\$(EPOCBLD$Bld)/$ExportLibrary.def\" \"\$(EPOCBLD)/$ExportLibrary.def\"\n",
+		"\tdef2dll $AbsentSubst \\\n\t\t--path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD$Bld) \\\n\t\t--export=$ExportLibrary \\\n",
 		"\t\t--deffile=$theDefFile \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking $symNameLkupOpt\n"
 	    );
     }
@@ -1686,12 +1669,12 @@ sub PMSrcDepend {
 
 	foreach (@BldList) {
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc.pre"), " ",
-			&Generic_Quote("\$(EPOCBLD$_)\\$BaseObj.cpp"), " ",
+			&Generic_Quote("\$(EPOCBLD$_)/$BaseSrc.pre"), " ",
+			&Generic_Quote("\$(EPOCBLD$_)/$BaseObj.cpp"), " ",
 		) if $cia;
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc.lis"), " ",
-			&Generic_Quote("\$(EPOCBLD$_)\\$BaseObj.o"), " \\\n",
+			&Generic_Quote("\$(EPOCBLD$_)/$BaseSrc.lis"), " ",
+			&Generic_Quote("\$(EPOCBLD$_)/$BaseObj.o"), " \\\n",
 		);
 	}
 	&main::Output(
@@ -1720,12 +1703,12 @@ sub PMSrcBldDepend {
 	}
 
 	&main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " ",
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.cpp"), " ",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " ",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.cpp"), " ",
 	) if $cia;
 	&main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " ",
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.o"), " :",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " ",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.o"), " :",
 	);
         PrintList("\' \\\n\t\'\.\&Generic_Quote\(\$_\)", @DepList);
 	&main::Output(
@@ -1752,12 +1735,12 @@ sub PMPrefixFile
 { 
     my $IncPath = &main::EPOCIncPath;
     
-    return quoted_path(&Generic_Quote("$IncPath"."rvct\\rvct.h"));
+    return quoted_path(&Generic_Quote("$IncPath"."rvct/rvct.h"));
 }
 
 
-my $preinclude =   "--preinclude \$(EPOCINC)\\rvct\\rvct.h";
-my $edg_preinclude = "-I \$(EPOCINC)\\RVCT${RVCTVersion} --preinclude edg_rvct${RVCTVersion}.h";
+my $preinclude =   "--preinclude \$(EPOCINC)/rvct/rvct.h";
+my $edg_preinclude = "-I \$(EPOCINC)/rvct${RVCTVersion} --preinclude edg_rvct${RVCTVersion}.h";
 
 sub SelectLangOptions {
 	my ($Ext) = @_;
@@ -1802,18 +1785,17 @@ sub PMEndSrcBld {
 	my $Plat=&main::Plat;
 	my $BaseSrc=&main::BaseSrc;
 	my $Bld=&main::Bld;
-	my $Src=lc &main::Src;	
+	my $Src=&main::Src;	
 	my $SrcPath=&main::Path_Chop(&main::SrcPath);
 	my $Ext = &main::Path_Split('Ext', $Src);	
 	my $BaseTrg=&main::BaseTrg;
 	my $BldPath = &main::BldPath;
-	$Src = ucfirst $Src if ($Ext !~ /\.(cpp|c)$/);		
 	my $LangOptions = &SelectLangOptions($Ext);
 	# support for auto 'translated' ASM 
 	my $AsmFilep = $AsmFiles{$Src};
 
 	# Logger Ouput filename 
-	my $Logger_Output = lc ($BaseSrc) . ".int.cpp";
+	my $Logger_Output = ($BaseSrc) . ".int.cpp";
 	my $LstExt ;
 	if($Plat =~ /^(ARMV[6-9])/i){
 		$LstExt = $1 ;	
@@ -1830,77 +1812,77 @@ sub PMEndSrcBld {
 	if ($AsmFilep || $Ext =~ /cia/i) {
 		&main::Output(
 # compile the translated, preprocessed source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.o"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.o"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
 			"\t\@echo $Src\n",
-			"\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n",
+			"\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n",
 			"\n",
 # rule to translate the preprocessed source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), "\n",
-			"\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)\\$BaseSrc.pre\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), "\n",
+			"\ttranasm -n -s -o=\$\@ \$(EPOCBLD$Bld)/$BaseSrc.pre\n",
 			"\n",
 # rule to preprocess the source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " : ",
-			&Generic_Quote("$SrcPath\\$Src"), "\n",
-  			"\t\$(ARMCC$Bld) -D__CIA__ -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath\\$Src -o \$\@ \n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " : ",
+			&Generic_Quote("$SrcPath/$Src"), "\n",
+  			"\t\$(ARMCC$Bld) -D__CIA__ -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath/$Src -o \$\@ \n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
-			"\t", &Generic_CopyAction("$SrcPath\\$BaseSrc\_.$LstExt.lst"),
+			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n",
+			"\t", &Generic_CopyAction("$SrcPath/$BaseSrc\_.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
+			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n",
 			"\n"
 			);
 	} else {
 		#If Function Call logging is enabled, add call to function call logger
 		if ($Function_Call_Logger) {
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"),
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"),
 				" : ",
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$Logger_Output"),
+				&Generic_Quote("\$(EPOCBLD$Bld)/$Logger_Output"),
 				"\n",
 				"\t\@echo $Logger_Output\n",
-				"\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$Logger_Output\n",
+				"\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$Logger_Output\n",
 				"\n",
 # generate an assembly listing target too
-				"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
-				"\t", &Generic_CopyAction("$SrcPath\\$BaseSrc.$LstExt.lst"),
+				"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n",
+				"\t", &Generic_CopyAction("$SrcPath/$BaseSrc.$LstExt.lst"),
 				"\n",
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ",
-				&Generic_Quote("$SrcPath\\$Logger_Output"), "\n",
-				"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$Logger_Output \n",
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ",
+				&Generic_Quote("$SrcPath/$Logger_Output"), "\n",
+				"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$Logger_Output \n",
 				"\n"
 			);
 
 			#Call to Function Call Logger
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$Logger_Output"), " : ",
-				&Generic_Quote("$SrcPath\\$Src"),
+				&Generic_Quote("\$(EPOCBLD$Bld)/$Logger_Output"), " : ",
+				&Generic_Quote("$SrcPath/$Src"),
 				"\n",
 				"\t \@echo $Logger_Output\n",
 				"\t \$(FCLOGGER$Bld) $lfboption$edg_preinclude \\\n",
 			    "\t -I $SrcPath  \\\n",
 				"\t \$(INCDIR_FCLOGGER) $FC_Logger_Option \\\n",
-			    "\t --gen_c_file_name \$\@ $SrcPath\\$Src\n",
+			    "\t --gen_c_file_name \$\@ $SrcPath/$Src\n",
 				"\n\n",
 			);
 		}
 		else {			
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " : ",
-				&Generic_Quote("$SrcPath\\$Src"), "\n",
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), " : ",
+				&Generic_Quote("$SrcPath/$Src"), "\n",
 				"\t\@echo $Src\n",
-				"\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src\n",
+				"\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src\n",
 				"\n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
-			"\t", &Generic_CopyAction("$SrcPath\\$BaseSrc.$LstExt.lst"),
+			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n",
+			"\t", &Generic_CopyAction("$SrcPath/$BaseSrc.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ",
-			&Generic_Quote("$SrcPath\\$Src"), "\n",
-			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src \n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ",
+			&Generic_Quote("$SrcPath/$Src"), "\n",
+			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src \n",
 			"\n"
 			);
 			#Compiler wrapper support starts
@@ -1909,9 +1891,9 @@ sub PMEndSrcBld {
 				my $Platcmpwrap=&main::Plat;
 				&main::Output(
 					"COMPWRAP$Bld$BaseSrc : ",
-					&Generic_Quote("$SrcPath\\$Src"), "\n",
+					&Generic_Quote("$SrcPath/$Src"), "\n",
 					"\t\@echo Analysing $Src\n",
-					"\t\$(COMPWRAP) \$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src \n",
+					"\t\$(COMPWRAP) \$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src \n",
 					"\n"
 				);
 			}
@@ -1927,7 +1909,7 @@ sub MultiFileEndSrcBld {
 	my $BaseSrc=&main::BaseSrc;
 	my $Bld=&main::Bld;
         my $KeyFile = &main::Src;
-	my $Src=ucfirst lc $KeyFile;
+	my $Src=$KeyFile;
 	my $SrcPath=&main::Path_Chop(&main::SrcPath);
 	my $Ext = &main::Path_Split('Ext', $Src);
 	my $LangOptions = &SelectLangOptions($Ext);
@@ -1941,12 +1923,12 @@ sub MultiFileEndSrcBld {
 # compile the translated, preprocessed source
 		       &main::Output( "OBJECTS$MFVarN = ");
 		       foreach my $obj (@{$CompilationGroups{$KeyFile}{Objects}}) {
-			       &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$obj"), " "); 
+			       &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$obj"), " "); 
 		       }
        		       &main::Output( "\n\n");
 		       &main::Output( "SOURCES$MFVarN = ");
 		       foreach my $src (@{$CompilationGroups{$KeyFile}{Sources}}) {
-			       &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$src", " "));
+			       &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$src", " "));
 		       }
        		       &main::Output( "\n\n");
 		       &main::Output( "\$(OBJECTS$MFVarN) : \$(SOURCES$MFVarN) \n");
@@ -1961,21 +1943,21 @@ sub MultiFileEndSrcBld {
 		}
 		&main::Output(
 # rule to translate the preprocessed source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), "\n",
-			"\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)\\$BaseSrc.pre\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), "\n",
+			"\ttranasm -n -s -o=\$\@ \$(EPOCBLD$Bld)/$BaseSrc.pre\n",
 			"\n",
 # rule to preprocess the source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " : ",
-			&Generic_Quote("$SrcPath\\$Src"), "\n",
-  			"\t\$(ARMCC$Bld) -D__CIA__ -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath\\$Src -o \$\@ \n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " : ",
+			&Generic_Quote("$SrcPath/$Src"), "\n",
+  			"\t\$(ARMCC$Bld) -D__CIA__ -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath/$Src -o \$\@ \n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
-			"\t", &Generic_CopyAction("$SrcPath\\$BaseSrc\_.$LstExt.lst"),
+			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n",
+			"\t", &Generic_CopyAction("$SrcPath/$BaseSrc\_.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
+			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n",
 			"\n"
 			);
 	} else {
@@ -1984,7 +1966,7 @@ sub MultiFileEndSrcBld {
 #                      compile the source
 		       &main::Output( "OBJECTS$MFVarN = ");
 		       foreach my $obj (@{$CompilationGroups{$KeyFile}{Objects}}) {
-			       &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$obj"), " "); 
+			       &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$obj"), " "); 
 		       }
        		       &main::Output( "\n\n");
 		       &main::Output( "SOURCES$MFVarN = ");
@@ -2004,12 +1986,12 @@ sub MultiFileEndSrcBld {
 		}
 #		generate an assembly listing target too
 		&main::Output(
-			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
-			"\t", &Generic_CopyAction("$SrcPath\\$BaseSrc.$LstExt.lst"),
+			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n",
+			"\t", &Generic_CopyAction("$SrcPath/$BaseSrc.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ",
-			&Generic_Quote("$SrcPath\\$Src"), "\n",
-			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src \n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ",
+			&Generic_Quote("$SrcPath/$Src"), "\n",
+			"\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src \n",
 			"\n"
 			);
 	}
diff --git a/cl_bpabi.pm b/cl_bpabi.pm
index e8aca8a..221b735 100644
--- a/cl_bpabi.pm
+++ b/cl_bpabi.pm
@@ -14,7 +14,7 @@
 #
 
 # This package contains routines to handle Base Platform ABI (BPABI) Platforms.
-package Cl_bpabi;
+package cl_bpabi;
 
 my @commonOptions;
 my @thumbOptions;
@@ -83,10 +83,10 @@ require Exporter;
 use Cwd;
 
 # Armutl package does various ancillary things for armedg modules
-use Armutl;
-use BPABIutl;
-use E32Plat;
-use RVCT_plat2set;
+use armutl;
+use bpabiutl;
+use e32plat;
+use rvct_plat2set;
 use gcce_plat2set;
 
 # This is the RVCT Version information required by Armutl package
@@ -104,7 +104,7 @@ my $PlatName = main::Plat();
 # The name of the root platform. This is useful if the plaform is derived using a
 # BSF file. If the current platform is not derived, $RootName will be the same as
 # $PlatName.
-my $RootName = E32Plat::Plat_Root($PlatName);
+my $RootName = e32plat::Plat_Root($PlatName);
 
 
 # cl_generic package contains generic routines to handle bits of makefiles which are
@@ -113,14 +113,14 @@ use cl_generic;
 
 # E32env package contains information for makmake and associated e32tools perl programs
 # within the Epoc32 Environment
-use E32env;
+use e32env;
 
 # Genutl package contains utility subroutines for MAKMAKE and associated scripts
-use Genutl;
+use genutl;
 
 # Modload package is the runtime module-loading routine for loading e32tools modules into
 # 'main' module
-use Modload;
+use modload;
 
 use constant NOCOMPRESSIONMETHOD => 0;
 use constant INFLATECOMPRESSIONMETHOD => 1;
@@ -178,7 +178,7 @@ sub PMPlatProcessMmp (@) {
 # shouldn't be linked against itself or other runtime libs
 	$ArmRT = &IsTargetRT;
 	my @AsmFileList = &GetToolChainAsmFileList;
-	foreach (@AsmFileList) { $AsmFiles{ucfirst lc $_} = 1; }
+	foreach (@AsmFileList) { $AsmFiles{$_} = 1; }
 }
 
 my $preinclude;
@@ -196,7 +196,7 @@ sub PMStartBldList($) {
 	my $DefFile=&main::DefFile;
 	my $EPOCPath=&main::EPOCPath;
 	my $LinkAs=&main::LinkAs;
-	my $LibPath=&main::LibPath.'LIB\\';
+	my $LibPath=&main::LibPath.'lib/';
 	my @MacroList=&main::MacroList();
 	push @MacroList, "__SUPPORT_CPP_EXCEPTIONS__";
 	push @MacroList, "__SYMBIAN_STDCPP_SUPPORT__" if ( StdCppTarget() );
@@ -213,8 +213,8 @@ sub PMStartBldList($) {
   	my %PlatHash = &main::PlatRec();
   	unless ($PlatHash{SMP}) {
 		my $myStatLinkPath;
-		$myStatLinkPath = "$E32env::Data{LinkPath}";
-		$myStatLinkPath .= "ARMV5";
+		$myStatLinkPath = "$e32env::Data{LinkPath}";
+		$myStatLinkPath .= lc "ARMV5";
 		&main::SetStatLinkPath($myStatLinkPath);
 	}
 
@@ -261,22 +261,6 @@ sub PMStartBldList($) {
 		"\n"
 	);
 # modified end: makefile improvement 
-	if ($Makecmd eq "nmake") {
-		&main::Output(
-			"\n",
-  			"PATH=",&main::Path_Drive,$EPOCPath,"gcc\$(PBUILDPID)\\bin;\$(PATH)\n",
-			"\n"
-		);
-	}
-	else {
-		&main::Output(
-			"\n",
-			"# must set both PATH and Path to make it work correctly\n",
-  			"Path:=",&main::Path_Drive,$EPOCPath,"gcc\$(PBUILDPID)\\bin;\$(Path)\n",
-			"PATH:=\$(Path)\n",
-			"\n"
-		);
-	}
 
 	if ($BasicTrgType=~/^(DLL|EXE)/o)
 	{
@@ -295,12 +279,12 @@ sub PMStartBldList($) {
 		&main::Output("ifdef LINKER_SYMBOLS_MAP_OPTION\n");
 		foreach (@BldList)
 			{
-			&main::Output("\t$_"."_MAP_FILE=\"\$(EPOCTRG$_)\\".&main::Trg($_).".map\"\n");
+			&main::Output("    $_"."_MAP_FILE=\"\$(EPOCTRG$_)/".&main::Trg($_).".map\"\n");
 			}
 		&main::Output("else\n");
 		foreach (@BldList)
 			{
-			&main::Output("\t$_"."_MAP_FILE=\n");
+			&main::Output("    $_"."_MAP_FILE=\n");
 			}
 		&main::Output("endif\n");
 
@@ -728,7 +712,7 @@ sub PMStartBldList($) {
 		if ($BasicTrgType !~ /IMPLIB/io) {
 			&main::Output (
 				" \\\n\t",
-				&Generic_Quote("\$(EPOCTRG$_)\\".&main::Trg($_))
+				&Generic_Quote("\$(EPOCTRG$_)/".&main::Trg($_))
 			);
 		}
 
@@ -764,13 +748,13 @@ sub PMStartBldList($) {
 			if (-e $DefFile) { # effectively "if project frozen ..."
 				if ($PlatName =~ /^ARMV5$/) {
 					&main::Output(
-						" ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.dso"),
-						" ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.lib"), "\n"
+						" ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.dso"),
+						" ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.lib"), "\n"
 					);
 				}
 				else {
 					&main::Output(
-						" ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.dso"), "\n"
+						" ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.dso"), "\n"
 					);
 				}
 			}
@@ -784,32 +768,34 @@ sub PMStartBldList($) {
 		} else {
 			&main::Output(
 				"\n",
-				"\t\@echo Not attempting to create \"\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.dso\"\n",
+				"\t\@echo Not attempting to create \"\$(EPOCLIB)/lib/$PrimaryExportLibrary.dso\"\n",
 				"\t\@echo from frozen .DEF file, since EXPORTUNFROZEN specified.\n"
 			);
 		}
 
 		my $theDefFile = $DefFile;
-		$theDefFile = "\$(EPOCBLD)\\$BaseTrg.def" unless (-e $DefFile);
+		$theDefFile = "\$(EPOCBLD)/$BaseTrg.def" unless (-e $DefFile);
+		my $dsoname = &Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso");
+		$dsoname =~ s/\//\\\\/g; # elf2e32 strips leading directories when storing the dsoname, but only knows about backslashes. The $(EPOCLIB) part still has forward slashes, but this seems to be enough
 		&main::Output(
 			"\n",
 			"\n",
 			"# REAL TARGET - LIBRARY (.dso) \n",
 			"\n",
-			&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), " : ",
+			&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), " : ",
 			&Generic_Quote($DefFile), "\n",
-				"\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
-				"\telf2e32 --definput=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" --dso=",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"),
+				"\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)/$ExportLibrary.prep.def\"\n",
+				"\telf2e32 --definput=\"\$(EPOCBLD)/$ExportLibrary.prep.def\" --dso=",
+				$dsoname,
 				" --linkas=$LinkAs\n",
 			"\n"
 		 );
 		if ($ExtraExportLibrary) {
 			&main::Output(
 				"\n",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso"), " : ",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), "\n",
-				"\tcopy \"\$<\" \"\$@\"\n"
+				&Generic_Quote("\$(EPOCLIB)/lib/$ExtraExportLibrary.dso"), " : ",
+				&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), "\n",
+				"\tcp \$< \$@\n"
 			);
 		}
 
@@ -822,19 +808,19 @@ sub PMStartBldList($) {
 				"\n",
 				"# REAL TARGET - LIBRARY (.lib) \n",
 				"\n",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.lib"), " : ",
+				&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.lib"), " : ",
 				&Generic_Quote($DefFile), "\n",
 					"\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
-					"\tdef2dll.bat --path=\$(EPOCLIB)\\LIB \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--import=$ExportLibrary \\\n",
-					"\t\t--deffile=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking\n",
+					"\tdef2dll --path=\$(EPOCLIB)/lib \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--import=$ExportLibrary \\\n",
+					"\t\t--deffile=\"\$(EPOCBLD)/$ExportLibrary.prep.def\" \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking\n",
 					"\n",
 			);
 			if ($ExtraExportLibrary) {
 				&main::Output(
 					"\n",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib"), " : ",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.lib"), "\n",
-					"\tcopy \"\$<\" \"\$@\"\n"
+					&Generic_Quote("\$(EPOCLIB)/lib/$ExtraExportLibrary.lib"), " : ",
+					&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.lib"), "\n",
+					"\tcp \"\$<\" \"\$@\"\n"
 				);
 			}
 		}
@@ -871,7 +857,7 @@ sub PMStartBldList($) {
 	if ($DefFile and $BasicTrgType!~/^IMPLIB$/io) {
 #		call perl on the script here so make will die if there are errors
 #           - this doesn't happen if calling perl in a batch file
-		&main::Output( "\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n" );
+		&main::Output( "\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)/$ExportLibrary.def\" \n" );
 	}
 	else {
 		&main::Output( "\tperl -e \"print \\\"warning: freeze could not be supported or \\
@@ -884,11 +870,11 @@ sub PMStartBldList($) {
 	);
 	if ($DefFile and !$NoExportLibrary) {
 		&main::Output(
-			"\t-\$(ERASE) \"\$(EPOCLIB)\\LIB\\$ExportLibrary.dso\"\n"
+			"\t-\$(ERASE) \"\$(EPOCLIB)/lib/$ExportLibrary.dso\"\n"
 		);
 		if ($ExtraExportLibrary) {
 			&main::Output(
-				"\t-\$(ERASE) \"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso\"\n"
+				"\t-\$(ERASE) \"\$(EPOCLIB)/lib/$ExtraExportLibrary.dso\"\n"
 			);
 		}
 	}
@@ -1065,7 +1051,7 @@ sub PMBld {
 
 		#Create a make variable for the libraries.
 		main::Output("\nUSER_ADDED_ARCHIVES_$Bld=");
-		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList);
+		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCBSFSTATLINK$Bld\)/\$_\"\)", @StatLibList);
 		main::Output("\n\n");
 	}
 
@@ -1077,9 +1063,9 @@ sub PMBld {
 	if ($BasicTrgType=~/^DLL$/o) { # Add the DLL stub library
 		&main::Output(
 			" \\\n\t",
-			&Generic_Quote("\$(EPOCSTATLINK$Bld)\\EDLLSTUB.lib")
+			&Generic_Quote("\$(EPOCSTATLINK$Bld)/edllstub.lib")
 		);
-		push @depLibs, &Generic_Quote("\$(EPOCSTATLINK$Bld)\\EDLLSTUB.lib");
+		push @depLibs, &Generic_Quote("\$(EPOCSTATLINK$Bld)/edllstub.lib");
 	}
         
 	my $StaticRTLib = "";
@@ -1107,28 +1093,28 @@ sub PMBld {
 		$StaticRTLib .= "2_2";
 	}
 
-	&main::Output(" \\\n\$(EPOCSTATLINK$Bld)\\$StaticRTLib\.lib");
+	&main::Output(" \\\n\$(EPOCSTATLINK$Bld)/$StaticRTLib\.lib");
 
 	&main::Output(" \\\n\t",getConfigVariable('VIA_FILE_PREFIX'));
 	if($PlatName =~ /^gcce$/i) {
-		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList);
+		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)/\$_\"\)", @StatLibList);
 	}
 	else {
-		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCBSFSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList);
+		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCBSFSTATLINK$Bld\)/\$_\"\)", @StatLibList);
 	}
 	&main::Output(" \\\n\t",getConfigVariable('VIA_FILE_SUFFIX'));
 	
 	if($PlatName =~ /^gcce$/i) {
-		@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList));
+		@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)/\$_\"\)", @StatLibList));
 	}
 	else {
-		@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCBSFSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList));
+		@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCBSFSTATLINK$Bld\)/\$_\"\)", @StatLibList));
 	}
 	
 	
 	my @ImportLibList = ImportLibraryList(@LibList);
-	PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @ImportLibList);
-	@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @ImportLibList));
+	PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @ImportLibList);
+	@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @ImportLibList));
         
 	if ($TrgType=~/^STDEXE$/o || $TrgType=~/^STDDLL$/o) {
 		$NamedSymLkup = 1;
@@ -1137,8 +1123,8 @@ sub PMBld {
 		if(not (grep /^libc.dso$/i, @LibList)) {
 				push @OEImportLibraryList, "libc.dso";
 		}
-		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @OEImportLibraryList);
-		@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @OEImportLibraryList));
+		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @OEImportLibraryList);
+		@depLibs = (@depLibs, DepLinkList("\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @OEImportLibraryList));
 	}
 
 	unless ($ArmRT || ($BasicTrgType=~/^LIB$/o)) {
@@ -1153,9 +1139,9 @@ sub PMBld {
   				}
 				&main::Output(
 					" \\\n\t",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$_")
+					&Generic_Quote("\$(EPOCLIB)/lib/$_")
 				) unless ($_ =~ /$TargLib/i);
-				push @depLibs, &Generic_Quote("\$(EPOCLIB)\\LIB\\$_") unless ($_ =~ /$TargLib/i);
+				push @depLibs, &Generic_Quote("\$(EPOCLIB)/lib/$_") unless ($_ =~ /$TargLib/i);
 			}
 		}
 	}
@@ -1165,9 +1151,9 @@ sub PMBld {
 		foreach (@OELibList) {
 			&main::Output(
 				" \\\n\t",
-				&Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_"),
+				&Generic_Quote("\$(EPOCSTATLINK$Bld)/$_"),
 			);
-			push @depLibs, &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_");
+			push @depLibs, &Generic_Quote("\$(EPOCSTATLINK$Bld)/$_");
 		}
 	}
 	PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\$_\"\)", @ToolChainLibList);
@@ -1217,7 +1203,7 @@ sub PMBld {
 
 			&main::Output(
 				" \\\n\t",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o")
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o")
 			  );
 
 			$objectFiles .= &main::BldPath.$BaseSrc.".o ";
@@ -1238,7 +1224,7 @@ sub PMBld {
 		if((-e $DefFile) && (!&main::ExportUnfrozen))
 		{
 			&main::Output(
-				"EXPFILE$Bld = \$(EPOCBLD$Bld)\\$ExportLibrary.bin \n",			
+				"EXPFILE$Bld = \$(EPOCBLD$Bld)/$ExportLibrary.bin \n",			
 				"\n"
 			);
 		}
@@ -1267,7 +1253,7 @@ sub PMBld {
 	&main::CreateExtraFile($objectsViaFile, $objectFiles);
 		 
 		   &main::Output(
-			 &Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"),
+			 &Generic_Quote("\$(EPOCTRG$Bld)/$Trg"),
 			 " : \$(OBJECTS$Bld) \$(LIBS". $Bld . "DEPS)"
             );
 
@@ -1288,7 +1274,7 @@ sub PMBld {
 #       get rid of any -symbols produced .map file
         if ($BasicTrgType=~/^(DLL|EXE)/o) {
 			&main::Output(
-			"\t-\$(ERASE) \"\$(EPOCTRG$Bld)\\$Trg.map\" \n"
+			"\t-\$(ERASE) \"\$(EPOCTRG$Bld)/$Trg.map\" \n"
 		);
 		}
 
@@ -1408,8 +1394,8 @@ sub PMBld {
 				}
 
 				&main::Output(
-					" \$(EPOCSTATLINK$Bld)\\$FirstLib", "$ObjFile",
-					" \$(EPOCSTATLINK$Bld)\\$FirstLib", " \\", "\n"
+					" \$(EPOCSTATLINK$Bld)/$FirstLib", "$ObjFile",
+					" \$(EPOCSTATLINK$Bld)/$FirstLib", " \\", "\n"
 				);
 			} elsif ($BasicTrgType=~/^EXE$/o || $TrgType=~/^EXEXP$/o) {
 				# get the right object file for the entry point
@@ -1419,13 +1405,13 @@ sub PMBld {
 				}
 
 				&main::Output(
-					" \$(EPOCSTATLINK$Bld)\\$FirstLib", "$ObjFile",
-					" \$(EPOCSTATLINK$Bld)\\$FirstLib", " \\", "\n"
+					" \$(EPOCSTATLINK$Bld)/$FirstLib", "$ObjFile",
+					" \$(EPOCSTATLINK$Bld)/$FirstLib", " \\", "\n"
 				);
 			}
 
 			&main::Output(
-				"\t\t\$(LINKER_OUTPUT_OPTION) \"\$(EPOCBLD$Bld)\\$Trg\" \\\n",
+				"\t\t\$(LINKER_OUTPUT_OPTION) \"\$(EPOCBLD$Bld)/$Trg\" \\\n",
 #				"\t\t\$(OBJECTS$Bld) \\\n"
 			);
 
@@ -1467,18 +1453,18 @@ sub PMBld {
 			if(&main::DebugSwitchUsed() ){
 				if(&main::SymbolicDebugEnabled() ) {
 				&main::Output(
-					"\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$FeatureVariantBaseTrg.sym\"\n"
+					"\tcp \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$FeatureVariantBaseTrg.sym\"\n"
 					);
 				}
 			}
 			elsif ($Bld=~/^U?DEB$/o) {
 				   &main::Output(
-				   "\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$FeatureVariantBaseTrg.sym\"\n"
+				   "\tcp \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$FeatureVariantBaseTrg.sym\"\n"
 			   );
 			}
 		if (-e $DefFile) {
 			&main::Output(
-				"\tcopy ", &Generic_Quote(("\"$DefFile\"")), " \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
+				"\tcp ", &Generic_Quote(("\"$DefFile\"")), " \"\$(EPOCBLD)/$ExportLibrary.prep.def\"\n",
 			);
 		}
 
@@ -1612,20 +1598,22 @@ sub PMBld {
 		if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o || $TrgType=~/^EXEDLL$/o) {
 			if (-e $DefFile) {
 				&main::Output(
-					' --definput=',"\"\$(EPOCBLD)\\$ExportLibrary.prep.def\""
+					' --definput=',"\"\$(EPOCBLD)/$ExportLibrary.prep.def\""
 					);
 			}
 			# Non-callable exports will be ignored if the MMP file does not contain the DEFFILE keyword or contains the NOEXPORTLIBRARY keyword			 
 			if (!($DefFile) || $NoExportLibrary) {				
 				&main::Output( " --ignorenoncallable" );
 			}
+			my $dsoname = &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.dso");
+			$dsoname =~ s/\//\\\\/g; # elf2e32 strips leading directories when storing the dsoname, but only knows about backslashes. The $(EPOCLIB) part still has forward slashes, but this seems to be enough
 			&main::Output(
 				' --dso=',
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.dso")
+				$dsoname
 				);
 			&main::Output(
 				' --defoutput=',
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.def")
+				&Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.def")
 				);
 				if(&main::ExportUnfrozen) {
 					&main::Output( ' --unfrozen ');
@@ -1633,7 +1621,7 @@ sub PMBld {
 			}
 		#the input elf file - as the last arg
 		&main::Output(
-			" --elfinput=","\"\$(EPOCBLD$Bld)\\$Trg\"",
+			" --elfinput=","\"\$(EPOCBLD$Bld)/$Trg\"",
 			" --linkas=$LinkAs"
 			);
 		if (&main::CompressTarget)
@@ -1669,7 +1657,7 @@ sub PMBld {
 		}
 
 		&main::Output(
-		" --libpath=", "\"\$(EPOCLIB)\\LIB\""
+		" --libpath=", "\"\$(EPOCLIB)/lib\""
 		);
 
 		if($BasicTrgType=~/^DLL/ && $TrgType!~/^DLL/){
@@ -1719,10 +1707,10 @@ sub PMBld {
 				" \$(ARCHIVER_CREATE_OPTION) "
 			);
 			if($PlatName =~ /^gcce$/i) {
-				&main::Output(" \$(EPOCSTATLINK$Bld)\\$Trg \\\n");
+				&main::Output(" \$(EPOCSTATLINK$Bld)/$Trg \\\n");
 			}
 			else {
-				&main::Output(" \$(EPOCBSFSTATLINK$Bld)\\$Trg \\\n");
+				&main::Output(" \$(EPOCBSFSTATLINK$Bld)/$Trg \\\n");
 			}
 		# Pass in the command file if the command file option is passed in
 		if($viaoption) {
@@ -1756,26 +1744,26 @@ sub PMBld {
 
 	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o || $TrgType=~/^EXEDLL$/o) {
 		&main::Output(
-			"\tcopy ", " \"\$(EPOCBLD$Bld)\\$ExportLibrary.def\" ", "\"\$(EPOCBLD)\\$ExportLibrary.def\"\n"
+			"\tcp ", " \"\$(EPOCBLD$Bld)/$ExportLibrary.def\" ", "\"\$(EPOCBLD)/$ExportLibrary.def\"\n"
 			);
 		if  (&main::ExportUnfrozen) {
 			if ($PlatName =~ /^ARMV5$/)
 			{
 				&main::Output(
-				"\tdef2dll.bat --path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD$Bld) \\\n\t\t--export=$ExportLibrary \\\n\t\t--import=$ExportLibrary \\\n",
-				"\t\t--deffile=\$(EPOCBLD)\\$ExportLibrary.def \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking \\\n\t\t--absent=undef \n"
+				"\tdef2dll --path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD$Bld) \\\n\t\t--export=$ExportLibrary \\\n\t\t--import=$ExportLibrary \\\n",
+				"\t\t--deffile=\$(EPOCBLD)/$ExportLibrary.def \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking \\\n\t\t--absent=undef \n"
 				);
 				&main::Output(
 					"\n",
-					"\tcopy ", " \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\" ",
-					"\"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\"",
+					"\tcp ", " \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\" ",
+					"\"\$(EPOCLIB)/lib/$ExportLibrary.lib\"",
 					"\n"
 				);
 				if ($ExtraExportLibrary) {
 				&main::Output(
 					"\n",
-					"\tcopy ", " \"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\" ",
-					"\"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib\"",
+					"\tcp ", " \"\$(EPOCLIB)/lib/$ExportLibrary.lib\" ",
+					"\"\$(EPOCLIB)/lib/$ExtraExportLibrary.lib\"",
 					"\n"
 				);
 				}
@@ -1783,15 +1771,15 @@ sub PMBld {
 
 			&main::Output(
 					  "\n",
-				  "\tcopy ", " \"\$(EPOCBLD$Bld)\\$ExportLibrary.dso\" ",
-				  "\"\$(EPOCLIB)\\LIB\\$ExportLibrary.dso\"",
+				  "\tcp ", " \"\$(EPOCBLD$Bld)/$ExportLibrary.dso\" ",
+				  "\"\$(EPOCLIB)/lib/$ExportLibrary.dso\"",
 				  "\n"
 				 );
 
 			&main::Output(
 					  "\n",
-				  "\tcopy ", " \"\$(EPOCBLD$Bld)\\$ExportLibrary.dso\" ",
-				  "\"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso\"",
+				  "\tcp ", " \"\$(EPOCBLD$Bld)/$ExportLibrary.dso\" ",
+				  "\"\$(EPOCLIB)/lib/$ExtraExportLibrary.dso\"",
 				  "\n"
 				 ) if ($ExtraExportLibrary);
 
@@ -1801,17 +1789,17 @@ sub PMBld {
 	if($IsCustomDll eq 1)
 	{
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.bin"), ": $DefFile\n");
+			&Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.bin"), ": $DefFile\n");
 
-	    my $theDefFile = "\$(EPOCBLD)\\$ExportLibrary.def";
+	    my $theDefFile = "\$(EPOCBLD)/$ExportLibrary.def";
 	    $theDefFile = $DefFile if (-e $DefFile && !&main::ExportUnfrozen);
 	    my $theAssembler = " \$(ASM) ";
 	    &main::Output(
-		"\telf2e32  \\\n\t\t--definput=$theDefFile \\\n\t\t--dump=a \\\n\t\t--output=\$(EPOCBLD$Bld)\\$ExportLibrary.s \n",
-  		"\t$theAssembler \$(AAPCS_OPTION) \\\n\t\t \$(ASM_OUTPUT_OPTION) \$(EPOCBLD$Bld)\\$ExportLibrary.bin  \$(EPOCBLD$Bld)\\$ExportLibrary.s\n\n"
+		"\telf2e32  \\\n\t\t--definput=$theDefFile \\\n\t\t--dump=a \\\n\t\t--output=\$(EPOCBLD$Bld)/$ExportLibrary.s \n",
+  		"\t$theAssembler \$(AAPCS_OPTION) \\\n\t\t \$(ASM_OUTPUT_OPTION) \$(EPOCBLD$Bld)/$ExportLibrary.bin  \$(EPOCBLD$Bld)/$ExportLibrary.s\n\n"
 	    );
 		&main::Output(
-			"\t-\$(ERASE) \"\$(EPOCBLD$Bld)\\$ExportLibrary.s\"\n\n"
+			"\t-\$(ERASE) \"\$(EPOCBLD$Bld)/$ExportLibrary.s\"\n\n"
 		);
 	}
 
@@ -1942,16 +1930,16 @@ sub PMSrcDepend {
 		if ($tranasm)
 		{
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " ",
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " ",
 			) if $cia && ($PlatName ne "GCCE");
 		}
 
 		&main::Output(
-  			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.cpp"), " ",
+  			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.cpp"), " ",
 		) if $cia && ($PlatName ne "GCCE");
 		&main::Output(
-  			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " ",
-  			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.o"), " \\\n",
+  			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " ",
+  			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.o"), " \\\n",
 		);
 	}
 	&main::Output(
@@ -2000,17 +1988,17 @@ sub PMSrcBldDepend {
 	if ($tranasm)
 	{
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " ",
 		) if $cia && ($PlatName ne "GCCE");
 	}
 
 	&main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.cpp"), " ",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.cpp"), " ",
 	) if $cia && ($PlatName ne "GCCE");
 
 	&main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " ",
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.o"), " :",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " ",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.o"), " :",
 	);
 
 	my $prefix_file=getConfigVariable('PREFIXFILE');
@@ -2040,7 +2028,7 @@ sub quoted_path
 {
     my $curdrive="";
     my ($arg) = @_;
-    return "\"$arg\"" if ($arg !~ /^\\[^\\]/);	# not an absolute path
+    return "\"$arg\"" if ($arg !~ /^\/[^\/]/);	# not an absolute path
 
 		$curdrive=$1 if (cwd =~ /^(.:)/);
     return "\"$curdrive$arg\"";
@@ -2071,7 +2059,7 @@ sub PMEndSrcBld {
 	my $Plat=&main::Plat;
 	my $BaseSrc=&main::BaseSrc;
 	my $Bld=&main::Bld;
-	my $Src=lc &main::Src;
+	my $Src=&main::Src;
 	my $SrcPath=&main::SrcPath;
 	my $BaseTrg=&main::BaseTrg;
 	my $BldPath = &main::BldPath;
@@ -2101,10 +2089,10 @@ sub PMEndSrcBld {
 	if ($AsmFilep || ($Ext =~ /cia/i && ($PlatName ne "GCCE"))) {
 		&main::Output(
 # compile the translated, preprocessed source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.o"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.o"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
 			"\t\@echo $Src\n",
-			"\t\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp)\n",
+			"\t\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp)\n",
 			"\n"
 			);
 # rule to translate the preprocessed source
@@ -2112,40 +2100,40 @@ sub PMEndSrcBld {
 			if ($tranasm)
 			{
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), "\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), "\n",
 
-				"\t\$(TRANASM) \$(TRANASM_FLAGS) \$(TRANASM_OUTPUT_OPTION)\$\@ \$(TRANASM_INPUT_OPTION)\$(EPOCBLD$Bld)\\$BaseSrc.pre\n",
+				"\t\$(TRANASM) \$(TRANASM_FLAGS) \$(TRANASM_OUTPUT_OPTION)\$\@ \$(TRANASM_INPUT_OPTION)\$(EPOCBLD$Bld)/$BaseSrc.pre\n",
 			"\n"
 			);
 # rule to preprocess the source
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
-			"\t\$(CC$Bld) \$(PREPROCESSOR_OPTION) $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) $ChopSrcPath\\$Src \$(OUTPUT_OPTION) \$\@) \n",
+			"\t\$(CC$Bld) \$(PREPROCESSOR_OPTION) $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) $ChopSrcPath/$Src \$(OUTPUT_OPTION) \$\@) \n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
+			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc\_.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp)\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
+			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp)\n",
 			"\n"
 			);
 			}
 			else
 			{
 			&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
-			"\t\$(CC$Bld) \$(PREPROCESSOR_OPTION) $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) $ChopSrcPath\\$Src \$(OUTPUT_OPTION) \$\@) \n",
+			"\t\$(CC$Bld) \$(PREPROCESSOR_OPTION) $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) $ChopSrcPath/$Src \$(OUTPUT_OPTION) \$\@) \n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
+			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc\_.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp)\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
+			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp)\n",
 			"\n"
 			);
 			}
@@ -2154,38 +2142,38 @@ sub PMEndSrcBld {
 		#If Function call logging is enabled, add call to function call logger
 		if ($Function_Call_Logger)	{
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), 
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), 
 				" : ",
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.int.cpp"), 
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.int.cpp"), 
 				"\n",
 				"\t\@echo $BaseSrc.int.cpp\n",
 				"\t\$(CC$Bld) $lfboption$LangOptions ", 
 				" \$(INCLUDE_OPTION) ",
-				"\$(call absolutePaths, $ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)\\$BaseSrc.int.cpp)\n",
+				"\$(call absolutePaths, $ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc.int.cpp)\n",
 				"\n",
 # generate an assembly listing target too
 				"LISTING$Bld$BaseSrc : ", 
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), 
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), 
 				"\n",
 				"\t",
 				&Generic_CopyAction("$SrcPath$BaseSrc.$LstExt.lst"),
 				"\n",
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), 
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), 
 				" : ",
 				&Generic_Quote("$SrcPath$Src"), 
 				"\n",
 				"\t\$(CC$Bld) $LangOptions ",
 				"\$(ASSEMBLER_LISTING_OPTION) ",
 				"\$(INCLUDE_OPTION)",
-				" \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath\\$Src) \n",
+				" \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath/$Src) \n",
 				"\n"
 			);
 			
 			#Call to Function Call Logger
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.int.cpp"),
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.int.cpp"),
 				" : ",
-				&Generic_Quote("$SrcPath\\$Src"),
+				&Generic_Quote("$SrcPath/$Src"),
 				"\n",
 				"\t\@echo $BaseSrc.int.cpp\n",
 				"\t\$(FCLOGGER$Bld) $lfboption \\\n" ,
@@ -2193,24 +2181,24 @@ sub PMEndSrcBld {
 				"\t$logger_preinclude \\\n ",
 				"\t\$(INCDIR_FCLOGGER) \\\n" ,
 				"\t$Dictionary_File_Name $BldPath$BaseTrg.txt \\\n" ,
-				"\t$Generated_C_File_Name \$\@ $ChopSrcPath\\$Src \n",
+				"\t$Generated_C_File_Name \$\@ $ChopSrcPath/$Src \n",
 				"\n\n"
 			);
 		}
 		else {
 			&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
 			"\t\@echo $Src\n",
-			"\t\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath\\$Src)\n",
+			"\t\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath/$Src)\n",
 			"\n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
+			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
-			"\t\$(CC$Bld) $LangOptions ","\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath\\$Src) \n",
+			"\t\$(CC$Bld) $LangOptions ","\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath/$Src) \n",
 			"\n"
 			);
 			# Compiler wrapper support starts...
@@ -2220,7 +2208,7 @@ sub PMEndSrcBld {
 					"COMPWRAP$Bld$BaseSrc : ",
 					&Generic_Quote("$SrcPath$Src"), "\n",
 					"\t\@echo Analysing $Src\n",
-					"\t\$(COMPWRAP) \$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath\\$Src)\n",
+					"\t\$(COMPWRAP) \$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath/$Src)\n",
 					"\n"
 				);
 			}
@@ -2235,7 +2223,7 @@ sub MultiFileEndSrcBld {
 	my $BaseSrc=&main::BaseSrc;
 	my $Bld=&main::Bld;
         my $KeyFile = &main::Src;
-	my $Src=ucfirst lc $KeyFile;
+	my $Src=$KeyFile;
 	my $SrcPath=&main::SrcPath;
 	my $Ext = &main::Path_Split('Ext', $Src);
 	my $LangOptions = &SelectLangOptions($Ext);
@@ -2250,12 +2238,12 @@ sub MultiFileEndSrcBld {
 # compile the translated, preprocessed source
 			   &main::Output( "OBJECTS$MFVarN = ");
 			   foreach my $obj (@{$CompilationGroups{$KeyFile}{Objects}}) {
-				   &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$obj"), " ");
+				   &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$obj"), " ");
 			   }
 				   &main::Output( "\n\n");
 			   &main::Output( "SOURCES$MFVarN = ");
 			   foreach my $src (@{$CompilationGroups{$KeyFile}{Sources}}) {
-				   &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$src", " "));
+				   &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$src", " "));
 			   }
 				   &main::Output( "\n\n");
 			   &main::Output( "\$(OBJECTS$MFVarN) : \$(SOURCES$MFVarN) \n");
@@ -2270,21 +2258,21 @@ sub MultiFileEndSrcBld {
 		}
 		&main::Output(
 # rule to translate the preprocessed source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), "\n",
-			"\ttranasm -n -s -o=\$\@ \$(EPOCBLD$Bld)\\$BaseSrc.pre\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), "\n",
+			"\ttranasm -n -s -o=\$\@ \$(EPOCBLD$Bld)/$BaseSrc.pre\n",
 			"\n",
 # rule to preprocess the source
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
-			"\t\$(CC$Bld) \$(PREPROCESSOR_OPTION) $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR)) $ChopSrcPath\\$Src \$(OUTPUT_OPTION) \$\@ \n",
+			"\t\$(CC$Bld) \$(PREPROCESSOR_OPTION) $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR)) $ChopSrcPath/$Src \$(OUTPUT_OPTION) \$\@ \n",
 # generate an assembly listing target too
-			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
+			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc\_.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR)) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n",
+			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR)) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n",
 			"\n"
 			);
 	} else {
@@ -2293,7 +2281,7 @@ sub MultiFileEndSrcBld {
 #                      compile the source
 			   &main::Output( "OBJECTS$MFVarN = ");
 			   foreach my $obj (@{$CompilationGroups{$KeyFile}{Objects}}) {
-				   &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$obj"), " ");
+				   &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$obj"), " ");
 			   }
 				   &main::Output( "\n\n");
 			   &main::Output( "SOURCES$MFVarN = ");
@@ -2313,12 +2301,12 @@ sub MultiFileEndSrcBld {
 		}
 #		generate an assembly listing target too
 		&main::Output(
-			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
+			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc.$LstExt.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
-			"\t\$(CC$Bld) $LangOptions ","\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR)) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath\\$Src \n",
+			"\t\$(CC$Bld) $LangOptions ","\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," \$(call absolutePaths,$ChopSrcPath \$(INCDIR)) \$(OUTPUT_OPTION) \$\@ $ChopSrcPath/$Src \n",
 			"\n"
 			);
 	}
@@ -2530,7 +2518,7 @@ sub InitToolChain(@) {
 	{
 		my $RVCTBuildNumber;
 
-		($RVCTMajorVersion, $RVCTMinorVersion, $RVCTBuildNumber) = RVCT_plat2set::get_version_list($PlatName);
+		($RVCTMajorVersion, $RVCTMinorVersion, $RVCTBuildNumber) = rvct_plat2set::get_version_list($PlatName);
 
 		$RVCTVersion = "${RVCTMajorVersion}_${RVCTMinorVersion}";
 
@@ -2735,11 +2723,9 @@ sub GetLibList() {
 		@LibList=&Armutl_ArmLibList;
 		if(@LibList==0) {
 			my $LibDir = Armutl_ArmLibDir();
-			# convert '/' to  '\'  if there are some '/'
-			$LibDir =~ s#/#\\#g;
 			if (@StaticLibList) {
 				foreach my $lib (@StaticLibList) {
-					push @LibList, ("$LibDir\\$lib");
+					push @LibList, ("$LibDir/$lib");
 				}
 			}
 		}
@@ -2831,6 +2817,7 @@ sub checkVMAPFiles
 {
 	my %srcSet = %{&main::getSrcSet};
 	my %featureVariantInfo = &main::FeatureVariantInfo();
+	return if !defined($featureVariantInfo{NAME});
 	my $vmapfile = &main::Trg.".".$featureVariantInfo{NAME}.".vmap";
 	my $mmpFile = &main::MmpFile;
 	if ( $vmapfile ){
diff --git a/cl_codewarrior.pm b/cl_codewarrior.pm
index 027076a..a1a57bd 100644
--- a/cl_codewarrior.pm
+++ b/cl_codewarrior.pm
@@ -14,7 +14,7 @@
 #
 
 
-package Cl_codewarrior;
+package cl_codewarrior;
 
 # declare variables global for module
 my @Win32LibList=();
@@ -56,9 +56,9 @@ require Exporter;
 	PMEndSrcList
 );
 
-use Winutl;
+use winutl;
 use cl_generic;
-use E32Variant;
+use e32variant;
 
 my $NamedSymLkup = 0;
 
@@ -121,7 +121,7 @@ sub PMCheckPlatformL {
 		}
 	}
 
-	open PIPE, "$MWCC |", or &main::FatalError( "Failed to find version information for $MWCC \n");
+	open PIPE, "wine $MWCC |", or &main::FatalError( "Failed to find version information for $MWCC \n");
 	while (<PIPE>) {
 		if($_ =~ /Version\s+(\d+)\.(\d+)\.(\d+)\s+build\s+(\d+)/) {
 			my $MajorVer = $1;
@@ -196,7 +196,7 @@ sub PMStartBldList($) {
 	my $TrgDir="";
 	my $AifTrgDir="";
 	if (&Generic_Definition("TRGDIR") ne "") {
-		$TrgDir="\$(TRGDIR)\\";
+		$TrgDir="\$(TRGDIR)/";
 		$AifTrgDir=$TrgDir;
 	}
 
@@ -253,7 +253,7 @@ sub PMStartBldList($) {
 			" \\\n -i \"$_\""
 		);
 	}
-	use Pathutl;
+	use pathutl;
 	if($VariantFile){
 	    my $variantFilePath = Path_Split('Path',$VariantFile);
 	    $VariantFile  = Path_Split('FILE',$VariantFile);
@@ -332,7 +332,7 @@ sub PMStartBldList($) {
 
 	foreach (@BldList) {
 		&main::Output(
-			"CW$_ = $MWCC"
+			"CW$_ = wine $MWCC"
 		);
 		if (/DEB$/o) {
 			&main::Output(
@@ -392,12 +392,12 @@ sub PMStartBldList($) {
 		if ($BasicTrgType !~ /IMPLIB/io) {
 			&main::Output (
 				" \\\n",
-				"\t", &Generic_Quote("\$(EPOCTRG$_)\\$TrgDir$Trg")
+				"\t", &Generic_Quote("\$(EPOCTRG$_)/$TrgDir$Trg")
 			);
 			if (&Winutl_CopyForStaticLinkage) {
 				&main::Output(
 					" \\\n",
-					"\t", &Generic_Quote("\$(EPOCTRG$_)\\$Trg")
+					"\t", &Generic_Quote("\$(EPOCTRG$_)/$Trg")
 				);
 			}
 		}
@@ -424,7 +424,7 @@ sub PMStartBldList($) {
 
 		my $BitMapRef;
 		foreach $BitMapRef (@$BitMapStructRef) {
-			my $file="\$(EPOCTRG$_)\\$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
+			my $file="\$(EPOCTRG$_)/$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
 			&Generic_MakeWorkFile($makework,$file);
 			&main::Output(
 				" \\\n",
@@ -436,7 +436,7 @@ sub PMStartBldList($) {
 		my $ResourceRef;
 		foreach $ResourceRef (@$ResourceStructRef) {
 			if(! defined $$ResourceRef{Hdronly}) {
-				my $file="\$(EPOCTRG$_)\\$$ResourceRef{Trg}";
+				my $file="\$(EPOCTRG$_)/$$ResourceRef{Trg}";
 				&Generic_MakeWorkFile($makework,$file);
 				&main::Output(	# must come before main target because source for target will depend on the
 				" \\\n",		# *.rsg file in $EPOCIncPath
@@ -448,7 +448,7 @@ sub PMStartBldList($) {
 
 		my $AifRef;
 		foreach $AifRef (@$AifStructRef) {
-			my $file="\$(EPOCTRG$_)\\$AifTrgDir$$AifRef{Trg}";
+			my $file="\$(EPOCTRG$_)/$AifTrgDir$$AifRef{Trg}";
 			&Generic_MakeWorkFile($makework,$file);
 			&main::Output(
 				" \\\n",
@@ -485,26 +485,26 @@ sub PMStartBldList($) {
 			if (-e $DefFile) { # effectively "if project frozen ..."
 				my $LibLinkAs = ($BasicTrgType=~/^IMPLIB$/io) ? $LinkAs : $Trg;
 				&main::Output(
-					" ", &Generic_Quote("\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib"), "\n",
+					" ", &Generic_Quote("\$(EPOCLIB)/udeb/$ExportLibrary.lib"), "\n",
 					"\n",
-					&Generic_Quote("\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib"), " : ",
+					&Generic_Quote("\$(EPOCLIB)/udeb/$ExportLibrary.lib"), " : ",
 					&Generic_Quote($DefFile), "\n",
-					"\tperl -S prepdef.pl ",&Generic_Quote($DefFile)," \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
-					"\t$MWLD \"\$(EPOCBLD)\\$ExportLibrary.prep.def\" -importlib -o \$\@",
+					"\tperl -S prepdef.pl ",&Generic_Quote($DefFile)," \"\$(EPOCBLD)/$ExportLibrary.prep.def\"\n",
+					"\twine $MWLD \"\$(EPOCBLD)/$ExportLibrary.prep.def\" -importlib -o \$\@",
 					" -addcommand \"out:$LibLinkAs\" -warnings off",
 					"\n"
 				);
 			} else {
 				&main::Output(
 					"\n",
-					"\t\@echo WARNING: Not attempting to create \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\".\n",
+					"\t\@echo WARNING: Not attempting to create \"\$(EPOCLIB)/udeb/$ExportLibrary.lib\".\n",
 					"\t\@echo When exports are frozen in \"$DefFile\", regenerate Makefile.\n"
 				);
 			}
 		} else {
 			&main::Output(
 				"\n",
-				"\t\@echo Not attempting to create \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n",
+				"\t\@echo Not attempting to create \"\$(EPOCLIB)/udeb/$ExportLibrary.lib\"\n",
 				"\t\@echo from frozen .DEF file, since EXPORTUNFROZEN specified.\n"
 			);
 		}
@@ -517,7 +517,7 @@ sub PMStartBldList($) {
 	if ($DefFile and $BasicTrgType!~/^IMPLIB$/io) {
 		&main::Output(
 #			call perl on the script here so nmake will die if there are errors - this doesn't happen if calling perl in a batch file
-			"\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n"
+			"\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)/$ExportLibrary.def\" \n"
 		);
 	}
 	else {
@@ -531,13 +531,13 @@ sub PMStartBldList($) {
 	);
 	if ($DefFile and !$NoExportLibrary) {
 		&main::Output(
-			"\t-\$(ERASE) \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n"
+			"\t-\$(ERASE) \"\$(EPOCLIB)/udeb/$ExportLibrary.lib\"\n"
 		);
 	}
 	&main::Output(
 		"\n"
 	);
-	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}UDEB");
+	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}udeb");
 
 	&Generic_Releaseables;
 }
@@ -568,7 +568,7 @@ sub PMBld {
 
 	$NamedSymLkup = 1 if($TrgType =~ /^(STDDLL|STDEXE)$/o);
 
-	$uidfile = "$BaseTrg.UID";
+	$uidfile = "$BaseTrg.uid";
 
 	if ($Bld =~ /DEB/) {
 		@LibList=&main::DebugLibList;
@@ -591,12 +591,12 @@ sub PMBld {
 	my $BLDTRGPATH = "";
 	my $AIFBLDTRGPATH = "";
 	if ($TrgPath) {
-		$BLDTRGPATH = "\$(TRGDIR)\\";	    # handles TARGETPATH
+		$BLDTRGPATH = "\$(TRGDIR)/";	    # handles TARGETPATH
 		$AIFBLDTRGPATH = $BLDTRGPATH;
 		&Winutl_AdjustTargetPath(\$BLDTRGPATH);
 	}
-	$BLDTRGPATH = "\$(EPOCTRG$Bld)\\".$BLDTRGPATH;
-	$AIFBLDTRGPATH = "\$(EPOCTRG$Bld)\\".$AIFBLDTRGPATH;
+	$BLDTRGPATH = "\$(EPOCTRG$Bld)/".$BLDTRGPATH;
+	$AIFBLDTRGPATH = "\$(EPOCTRG$Bld)/".$AIFBLDTRGPATH;
 
 	# REAL TARGETS
 	#-------------
@@ -616,17 +616,17 @@ sub PMBld {
 					push @releaseables,"$BLDTRGPATH$Trg.map";
 				}
 				if (&Winutl_CopyForStaticLinkage) {
-					push @releaseables, "\$(EPOCTRG$Bld)\\$Trg";
+					push @releaseables, "\$(EPOCTRG$Bld)/$Trg";
 				}
 			}
 			my $BitMapRef;
 			foreach $BitMapRef (@$BitMapStructRef) {
-				push @releaseables, "\$(EPOCTRG$Bld)\\$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
+				push @releaseables, "\$(EPOCTRG$Bld)/$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
 			}
 			my $ResourceRef;
 			foreach $ResourceRef (@$ResourceStructRef) {
 				if(! defined $$ResourceRef{Hdronly}) {
-					push @releaseables,"\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}";
+					push @releaseables,"\$(EPOCTRG$Bld)/$$ResourceRef{Trg}";
 				}
 			}
 			my $AifRef;
@@ -635,7 +635,7 @@ sub PMBld {
 			}
 		}
 		if (-e $DefFile and !$NoExportLibrary) { # effectively "if project frozen ..."
-			push @releaseables, "\$(EPOCLIB$Bld)\\$ExportLibrary.lib";
+			push @releaseables, "\$(EPOCLIB$Bld)/$ExportLibrary.lib";
 		}
 		if ($Bld=~/DEB$/o) {
 			# debugging support files?
@@ -705,7 +705,7 @@ sub PMBld {
 		my $BaseSrc = &main::Path_Split('Base', $_);
 		my $Ext = &main::Path_Split('Ext', $_);
 		$BaseSrc.='_' if (lc($Ext) eq '.cia');
-		$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
+		$BaseSrc =~ s/\.uid/_uid_/i if ($BaseSrc eq $uidfile);
 		
    		&main::Output(
 			" \\\n\tLISTING$Bld$BaseSrc"
@@ -772,7 +772,7 @@ sub PMBld {
 	);
 	foreach (@StatLibList) {
 		&main::Output(
-			" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_")
+			" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$_")
 		);
 	}
 	
@@ -781,14 +781,14 @@ sub PMBld {
 		if (&main::IsWideCharMain()) {
 			foreach (@oe_exe_libs_wchar) {
 				&main::Output(
-					" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_")
+					" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$_")
 				);
 			}
 		}
 		else {
 			foreach (@oe_exe_libs) {
 				&main::Output(
-					" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_")
+					" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$_")
 				);
 			}
 		}
@@ -796,7 +796,7 @@ sub PMBld {
 
 	foreach (@LibList) {
 		&main::Output(
-			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)\\$_")
+			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)/$_")
 		);
 	}
 
@@ -804,7 +804,7 @@ sub PMBld {
 	if ($TrgType =~ /^STDEXE$/o || $TrgType =~ /^STDDLL$/o) {
 		foreach (@oe_import_libs) {
 		&main::Output(
-			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)\\$_")
+			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)/$_")
 		);
 		}
 	}
@@ -828,7 +828,7 @@ sub PMBld {
 		$BaseSrc.='_' if (lc($Ext) eq '.cia');
    		&main::Output(
 			" \\\n",
-			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o")
+			"\t", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o")
    		);
    	}
 
@@ -841,14 +841,14 @@ sub PMBld {
 	if ($add_stdcpp_tag) {
 		&main::Output(
 			" \\\n",
-			"\t", &Generic_Quote("$stdcpp_tag_path\\$stdcpp_tag_file")
+			"\t", &Generic_Quote("$stdcpp_tag_path/$stdcpp_tag_file")
 		);
 	}
 	if ($Win32Resrc) {
 		my $resbase=&main::Path_Split('Base',$Win32Resrc);
 		&main::Output(
 			" \\\n",
-			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$resbase.res")
+			"\t", &Generic_Quote("\$(EPOCBLD$Bld)/$resbase.res")
 		);
 	}
 	if ($have_uidfile) {
@@ -856,7 +856,7 @@ sub PMBld {
 		# CodeWarrior IDE projects.
 		&main::Output(
 			" \\\n",
-			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg"."_UID_.o")
+			"\t", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseTrg"."_uid_.o")
 		);
 	}
 	&main::Output(
@@ -875,12 +875,12 @@ sub PMBld {
 		);
 	}
 
-	main::OutFormat(" \"\$(EPOCSTATLINK$Bld)\\$firstlib\" ") if $firstlib;
-	main::OutFormat(" \"\$(EPOCSTATLINK$Bld)\\$newlib\" ")   if $newlib;
+	main::OutFormat(" \"\$(EPOCSTATLINK$Bld)/$firstlib\" ") if $firstlib;
+	main::OutFormat(" \"\$(EPOCSTATLINK$Bld)/$newlib\" ")   if $newlib;
 
 	foreach my $lib (@Win32LibList) {
 		 my $win32lib = $lib;    # take a copy, to avoid updating contents of Win32LibList!
-		$win32lib = "-l$win32lib" unless ($win32lib =~ /\\/);
+		$win32lib = "-l$win32lib" unless ($win32lib =~ /\//);
 		&main::OutFormat(
 			" ",lc $win32lib
 		);
@@ -953,12 +953,12 @@ sub PMBld {
 		}
 		&main::Output(
 			"STAGE1_LINK_FLAGS$Bld= \$(COMMON_LINK_FLAGS$Bld) \$(LIBS$Bld) \\\n\t",
-			" -o \"\$(EPOCBLD$Bld)\\$Trg\"");
+			" -o \"\$(EPOCBLD$Bld)/$Trg\"");
 		
 		if ($NamedSymLkup) {
 			&main::Output(
 			" -export all",
-			" -map \"\$(EPOCBLD$Bld)\\$Trg.map\""
+			" -map \"\$(EPOCBLD$Bld)/$Trg.map\""
 			);
 		}
 		else {
@@ -974,7 +974,7 @@ sub PMBld {
 			&main::Output(
 				" $Include",
 				' -nocompactimportlib', 
-				" -implib \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"",
+				" -implib \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\"",
 				" -addcommand \"out:$Trg\" -warnings off",
 				"\n",
 			);
@@ -1010,11 +1010,11 @@ sub PMBld {
 	}
 	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
 		&main::Output(
-			" -f \"\$(EPOCBLD)\\$ExportLibrary.def\"",	# use generated .DEF file
+			" -f \"\$(EPOCBLD)/$ExportLibrary.def\"",	# use generated .DEF file
 		);
 		if (&main::ExportUnfrozen) {
 			&main::Output(
-				" -implib \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"",
+				" -implib \"\$(EPOCLIB)/udeb/$ExportLibrary.lib\"",
 				" -addcommand \"out:$Trg\" -warnings off"
 			);
 		}
@@ -1043,8 +1043,8 @@ sub PMBld {
 		);
 	}
 
-	main::Output(" ", Generic_Quote("\$(EPOCSTATLINK$Bld)\\$firstlib") ) if $firstlib;
-	main::Output(" ", Generic_Quote("\$(EPOCSTATLINK$Bld)\\$newlib") )   if $newlib;
+	main::Output(" ", Generic_Quote("\$(EPOCSTATLINK$Bld)/$firstlib") ) if $firstlib;
+	main::Output(" ", Generic_Quote("\$(EPOCSTATLINK$Bld)/$newlib") )   if $newlib;
 
 	&main::Output(
 		" \$(LIBS$Bld)\n"
@@ -1063,12 +1063,12 @@ sub PMBld {
 #	Link by name first time round for dlls
 	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
 		&main::Output(
-			"\t$MWLD \$(STAGE1_LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
+			"\twine $MWLD \$(STAGE1_LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
 		);
 		if(!$NamedSymLkup){
 #		Dont delete the binary as we need to extract symbol/dependency info
 			&main::Output(
-			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$Trg\"\n",
+			"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$Trg\"\n",
 			);
 		}
 
@@ -1076,13 +1076,13 @@ sub PMBld {
 		my $show_options = "names,verbose";
 		$show_options = "names,unmangled,verbose" if ($MWLD =~ /mwldsym2.exe/);
 		&main::Output(
-			"\t$MWLD -S -show only,$show_options -o \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\" \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n"
+			"\twine $MWLD -S -show only,$show_options -o \"\$(EPOCBLD$Bld)/$ExportLibrary.inf\" \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\"\n"
 		);
 
 #		call makedef to reorder the export information
 		&main::Output(
 #			call perl on the script here so nmake will die if there are errors - this doesn't happen if calling perl in a batch file
-			"\tperl -S makedef.pl $AbsentSubst -Inffile \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\""
+			"\tperl -S makedef.pl $AbsentSubst -Inffile \"\$(EPOCBLD$Bld)/$ExportLibrary.inf\""
 		);
 		if (SysTrg()) {
     			&main::Output( "\t\t-SystemTargetType \\\n" );
@@ -1107,23 +1107,23 @@ sub PMBld {
 		&main::Output(" -export_entrypoint_E32Dll") if ($TrgType =~ /^STDDLL$/i);  # Workaround: To export entry point _E32DLL for target type STDDLL
 
 		&main::Output(
-			" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n",
-			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\"\n",
-			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n"
+			" \"\$(EPOCBLD)/$ExportLibrary.def\" \n",
+			"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$ExportLibrary.inf\"\n",
+			"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\"\n"
 		);
 	}
 	elsif($NamedSymLkup) {
 #	2-stage linking required for all those targets that enable symbol lookup
 		&main::Output( "\t$checklib ","\$(USER_ADDED_ARCHIVES_$Bld)\n" ) if ($run_checklib);
 		&main::Output(
-			"\t$MWLD \$(STAGE1_LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
+			"\twine $MWLD \$(STAGE1_LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
 		);
 	}
 	my $gen_src_file = "";
 	if($NamedSymLkup){
 #		pick the symbols and the dependencies.
 		&main::Output(
-			"\t$MWLD -S -show only,names,verbose -o \"\$(EPOCBLD$Bld)\\$ExportLibrary.sym\" \"\$(EPOCBLD$Bld)\\$Trg\"\n",
+			"\twine $MWLD -S -show only,names,verbose -o \"\$(EPOCBLD$Bld)/$ExportLibrary.sym\" \"\$(EPOCBLD$Bld)/$Trg\"\n",
 		);
 
 #		Generate the source file with symbol and dependency information in the named data segment.
@@ -1132,23 +1132,23 @@ sub PMBld {
 		if($BasicTrgType=~/^EXE$/o){
 #		For an EXE, generate the symbols as well as the dependencies
 			&main::Output(
-				"\tperl -S sym_lkup_util.pl -o \"\$(EPOCBLD$Bld)\\$gen_src_file.cpp\" -sym \"\$(EPOCBLD$Bld)\\$ExportLibrary.sym\" -map \"\$(EPOCBLD$Bld)\\$Trg.map\"\n"
+				"\tperl -S sym_lkup_util.pl -o \"\$(EPOCBLD$Bld)/$gen_src_file.cpp\" -sym \"\$(EPOCBLD$Bld)/$ExportLibrary.sym\" -map \"\$(EPOCBLD$Bld)/$Trg.map\"\n"
 			);
 		}
 		else {
 #		For DLLs, generate only the dependencies.
 			&main::Output(
-				"\tperl -S sym_lkup_util.pl -o \"\$(EPOCBLD$Bld)\\$gen_src_file.cpp\" -sym \"\$(EPOCBLD$Bld)\\$ExportLibrary.sym\" --ignore_export_dir\n"
+				"\tperl -S sym_lkup_util.pl -o \"\$(EPOCBLD$Bld)/$gen_src_file.cpp\" -sym \"\$(EPOCBLD$Bld)/$ExportLibrary.sym\" --ignore_export_dir\n"
 			);
 		}
 		main::Output(
-			"\t\$(CW$Bld) -c \"\$(EPOCBLD$Bld)\\$gen_src_file.cpp\" -o \"\$(EPOCBLD$Bld)\\$gen_src_file.o\"\n",
+			"\t\$(CW$Bld) -c \"\$(EPOCBLD$Bld)/$gen_src_file.cpp\" -o \"\$(EPOCBLD$Bld)/$gen_src_file.o\"\n",
 		);
 	}
 
 #	Perform the final link step
 	&main::Output(
-		"\t$MWLD "
+		"\twine $MWLD "
 	);
 	if ($BasicTrgType=~/^LIB$/o) {
 		&main::Output(
@@ -1162,12 +1162,12 @@ sub PMBld {
 #	Final linking and cleanup
 		main::Output(
 		"\$(LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))",
-		" \"\$(EPOCBLD$Bld)\\$gen_src_file.o\"\n",
-		"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$gen_src_file.cpp\"\n",
-		"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$gen_src_file.o\"\n",
-		"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$ExportLibrary.sym\"\n",
-		"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$Trg.map\"\n",
-		"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$Trg\"\n",
+		" \"\$(EPOCBLD$Bld)/$gen_src_file.o\"\n",
+		"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$gen_src_file.cpp\"\n",
+		"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$gen_src_file.o\"\n",
+		"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$ExportLibrary.sym\"\n",
+		"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$Trg.map\"\n",
+		"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$Trg\"\n",
 		);
 	}
 	else {
@@ -1186,7 +1186,7 @@ sub PMBld {
 		&Generic_MakeWorkDir("MAKEWORK$Bld", "\$(EPOCTRG$Bld)");
 		&main::Output(
 			"\n",
-			&Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"), " : ", 
+			&Generic_Quote("\$(EPOCTRG$Bld)/$Trg"), " : ", 
 			&Generic_Quote("$BLDTRGPATH$Trg"), "\n",
 			"\t", &Generic_CopyAction(),
 		);
@@ -1216,7 +1216,7 @@ sub PMBitMapBld {
 
 	my $ChopTrgPath="";
 	if ($$BitMapRef{TrgPath}) {
-		$ChopTrgPath.="\\$$BitMapRef{TrgPath}";
+		$ChopTrgPath.="/$$BitMapRef{TrgPath}";
 		chop $ChopTrgPath;
 	}
 
@@ -1225,7 +1225,7 @@ sub PMBitMapBld {
 	foreach $Bld (@BldList) {
 		my $path="\$(EPOCTRG$Bld)$ChopTrgPath";
 		&main::Output(
-			&Generic_Quote("$path\\$$BitMapRef{Trg}"), " : ", 
+			&Generic_Quote("$path/$$BitMapRef{Trg}"), " : ", 
 			&Generic_Quote("$$BitMapRef{GenericTrg}"), "\n",
 			"\t", &Generic_CopyAction(),
 			"\n"
@@ -1247,7 +1247,7 @@ sub PMResrcBld {
 		if(! defined $$ResourceRef{Hdronly})
 		{
 			&main::Output(
-				&Generic_Quote("\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}"), " : ", 
+				&Generic_Quote("\$(EPOCTRG$Bld)/$$ResourceRef{Trg}"), " : ", 
 				&Generic_Quote("$$ResourceRef{GenericTrg}"), "\n",
 				"\t", &Generic_CopyAction(),
 				"\n"
@@ -1265,7 +1265,7 @@ sub PMAifBld {
 	my $AifRef=&main::AifRef;
 	my $TrgDir="";
 	if (&Generic_Definition("TRGDIR") ne "") {
-		$TrgDir="\\\$(TRGDIR)";
+		$TrgDir="/\$(TRGDIR)";
 	}
 
 	my @BldList=&main::BldList;
@@ -1273,7 +1273,7 @@ sub PMAifBld {
 	foreach $Bld (@BldList) {
 		my $path="\$(EPOCTRG$Bld)$TrgDir";
 		&main::Output(
-			&Generic_Quote("$path\\$$AifRef{Trg}"), " : ",
+			&Generic_Quote("$path/$$AifRef{Trg}"), " : ",
 			&Generic_Quote("$$AifRef{GenericTrg}"), "\n",
 			"\t", &Generic_CopyAction(),
 			"\n"
@@ -1295,13 +1295,13 @@ sub PMSrcDepend {
 	my @BldList=&main::BldList;	
 	my @DepList=&main::DepList;
 	my $BaseSrc=&main::BaseSrc;
-	$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
+	$BaseSrc =~ s/\.uid/_uid_/i if ($BaseSrc eq $uidfile);
 
 	return if (@DepList == 0);
 
 	foreach (@BldList) {
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc.o"), " \\\n",
+			&Generic_Quote("\$(EPOCBLD$_)/$BaseSrc.o"), " \\\n",
 		);
 	}
 	&main::Output(
@@ -1322,12 +1322,12 @@ sub PMSrcBldDepend {
 	my $Bld=&main::Bld;
 	my @DepList=&main::DepList;
 	my $BaseSrc=&main::BaseSrc;
-	$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
+	$BaseSrc =~ s/\.uid/_uid_/i if ($BaseSrc eq $uidfile);
 
 	return if (@DepList == 0);
 
 	&main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " :",
+		&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), " :",
 	);
 	foreach (@DepList) {
 		&main::Output(
@@ -1342,7 +1342,7 @@ sub PMSrcBldDepend {
 
 sub PMEndSrcBld {
 	my $BaseSrc=&main::BaseSrc;
-	$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
+	$BaseSrc =~ s/\.uid/_uid_/i if ($BaseSrc eq $uidfile);
 	my $Bld=&main::Bld;
 	my $Plat=&main::Plat;
 	my $Src=&main::Src;
@@ -1355,19 +1355,19 @@ sub PMEndSrcBld {
 
 	if ($Cia) {
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.o"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.o"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
 			"\techo $Src\n",
 			"\t\$(CW$Bld) -lang c++ -o \"\$\@\" -c \"$SrcPath$Src\"\n",
 			"\n",
 #			assembler listing target - uses implicit rule to do disassembly
-			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
+			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc\_.$Plat.lst"),
 			"\n"
 		);
 	} else {
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " : ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), " : ",
 			&Generic_Quote("$SrcPath$Src"), "\n",
 			"\techo $Src\n",
 			"\t\$(CW$Bld) -o \"\$\@\" -c \"$SrcPath$Src\" "
@@ -1389,7 +1389,7 @@ sub PMEndSrcBld {
  		);
 		&main::Output(
 #			assembler listing target - uses implicit rule to do disassembly
-			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
+			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n",
 			"\t", &Generic_CopyAction("$SrcPath$BaseSrc.$Plat.lst"),
 			"\n"
 		);
@@ -1430,7 +1430,7 @@ sub PMEndSrcList {
 		".SUFFIXES : .lis .o\n",
 		"\n",
 		".o.lis:\n",
-		"\t$MWLD -S -show $show_options \$< -o \$\@\n",
+		"\twine $MWLD -S -show $show_options \$< -o \$\@\n",
 		"\n",
 		"\n"
 	);
@@ -1459,7 +1459,7 @@ sub PMEndSrcList {
 		my $respath=&main::Path_Chop(&main::Path_Split('Path',$Win32Resrc));
 		foreach $Bld (@BldList) {
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$resbase.res"), " : ",
+				&Generic_Quote("\$(EPOCBLD$Bld)/$resbase.res"), " : ",
 				&Generic_Quote($Win32Resrc), " \$(DEPEND)\n",
 				"\tmwwinrc -o \$\@ \"$Win32Resrc\"\n",
 				"\n"
diff --git a/cl_generic.pm b/cl_generic.pm
index 82b21e4..ca7cc54 100644
--- a/cl_generic.pm
+++ b/cl_generic.pm
@@ -40,8 +40,8 @@ require Exporter;
 
 use File::Basename;
 use lockit_info;
-use CheckSource;
-use E32Variant;
+use checksource;
+use e32variant;
 
 my $SavedBldPath;
 my $MakefileType=0;	# 0=NMAKE, 1=MAKE
@@ -52,9 +52,9 @@ sub Generic_Header ($$;$) {
 	
 	$MakefileType=($makefileType eq "nmake")? 0:1;
 
-	my $LibSubDir="UDEB";
+	my $LibSubDir="udeb";
 	if (&main::PlatOS eq 'EPOC32') {
-		$LibSubDir="UREL";
+		$LibSubDir="urel";
 	}
 	elsif (&main::PlatOS eq 'TOOLS2') {
 		$LibSubDir="LIB";
@@ -102,10 +102,15 @@ sub Generic_Header ($$;$) {
 	my $DataPath=&main::Path_Chop(&main::DataPath);
 	my $TrgPath=&main::Path_Chop(&main::TrgPath);
 
-	my $erasedefn = "\@erase";
-	$erasedefn = "\@erase 2>>nul" if ($ENV{OS} eq "Windows_NT");
+	my $erasedefn = "\@rm -f ";
 
 	&main::Output(
+		"#\n",
+		"#   this makefile is for GNU make\n",
+		"#   generated by GnuPoc - EPOC SDK for GNU/Linux\n",
+		"#\n",
+		     );
+	&main::Output(
 		"\n",
 		'# CWD ',             &main::Path_WorkPath, "\n",
 		'# MMPFile ',         &main::MmpFile,       "\n",
@@ -182,18 +187,18 @@ sub Generic_Header ($$;$) {
 		my $bldOffset = "";
 		$bldOffset .= $featureVariantInfo{$_."_LABEL"}."\\" if (%featureVariantInfo && !$featureVariantInfo{INVARIANT});
 			
-		Generic_Define("EPOCBLD$_", "\$(EPOCBLD)\\".$bldOffset.lc($_));
+		Generic_Define("EPOCBLD$_", "\$(EPOCBLD)/".$bldOffset.lc($_));
 		if (defined $ENV{PBUILDPID}) {
-			Generic_Define("EPOCBLDP$_", "\$(EPOCBLDP)\\".$bldOffset.lc($_));
+			Generic_Define("EPOCBLDP$_", "\$(EPOCBLDP)/".$bldOffset.lc($_));
 		} else {
-			Generic_Define("EPOCBLDP$_", "\$(EPOCBLD)\\".$bldOffset.lc($_));
+			Generic_Define("EPOCBLDP$_", "\$(EPOCBLD)/".$bldOffset.lc($_));
 		}
-		Generic_Define("EPOCTRG$_", "\$(EPOCTRG)\\".lc($_));
-		Generic_Define("EPOCLIB$_", "\$(EPOCLIB)\\".lc($LibSubDir));
-		Generic_Define("EPOCLINK$_", "\$(EPOCLINK)\\".lc($LibSubDir));
-		Generic_Define("EPOCSTATLINK$_", "\$(EPOCSTATLINK)\\".lc($_));
-		Generic_Define("EPOCBSFSTATLINK$_","\$(EPOCBSFSTATLINK)\\".lc($_));
-		Generic_Define("EPOCASSPLINK$_", "\$(EPOCASSPLINK)\\".lc($LibSubDir));
+		Generic_Define("EPOCTRG$_", "\$(EPOCTRG)/".lc($_));
+		Generic_Define("EPOCLIB$_", "\$(EPOCLIB)/".lc($LibSubDir));
+		Generic_Define("EPOCLINK$_", "\$(EPOCLINK)/".lc($LibSubDir));
+		Generic_Define("EPOCSTATLINK$_", "\$(EPOCSTATLINK)/".lc($_));
+		Generic_Define("EPOCBSFSTATLINK$_","\$(EPOCBSFSTATLINK)/".lc($_));
+		Generic_Define("EPOCASSPLINK$_", "\$(EPOCASSPLINK)/".lc($LibSubDir));
 	}
 	
 	# Compiler Wrapper option support 
@@ -362,7 +367,6 @@ sub Generic_Definition ($) {
 my %MkDirs;
 sub Generic_MkDir ($) {
 	my $dir=&main::Path_Chop(&expandDefines($_[0]));
-	$dir = lc $dir;
 	$dir =~ s/\$\(pbuildpid\)/\$\(PBUILDPID\)/g;
 	$MkDirs{$dir}=1;
 	return $dir;
@@ -524,7 +528,7 @@ sub Generic_WhatCleanTargets($$$@) {
 		&main::Output(
 			"\n",
 			"\n$whattarget $cleantarget :\n",
-			"\t\@rem none\n"
+#			"\t\@rem none\n"
 		);
 	} else {
 # emit list of releasables in batches to avoid overflowing the 2048 character 
@@ -678,8 +682,8 @@ sub Generic_Releaseables {
 	foreach $AifRef (@$AifStructRef) {
 # regression change - workaround lack of AIF directory
 		$$AifRef{TrgFile}=&main::Path_Split('File',$$AifRef{Trg});  # record for later
-		my $path=&main::Path_Split('Path',"$ResrcPath$$AifRef{Trg}");  
-		my $file="\$(EPOCDATA)\\$ResrcPath$$AifRef{Trg}";
+		my $path=&main::Path_Split('Path',"$ResrcPath$$AifRef{Trg}");
+		my $file="\$(EPOCDATA)\/$ResrcPath$$AifRef{Trg}";
 		my $xip="_xip";
 		my $base=&main::Path_Split('Base',"$file");
 		my $root=&main::Path_Split('Path',"$file");
@@ -687,7 +691,7 @@ sub Generic_Releaseables {
 		my $file_xip="$root"."$base$xip$ext";	# since XIP AIF format is generated
 		if ($path eq "") {
 			# no target path for the AIF file, so not a releasable
-			$file="$SavedBldPath\\$$AifRef{Trg}";
+			$file="$SavedBldPath\/$$AifRef{Trg}";
 		} else {
 			$Files{$file}=1;
 			$Files{$file_xip}=1;
@@ -700,13 +704,13 @@ sub Generic_Releaseables {
 	my $BitMapRef;
 	foreach $BitMapRef (@$BitMapStructRef) {
 		my $path=$$BitMapRef{TrgPath};
-		my $file="\$(EPOCDATA)\\$path$$BitMapRef{Trg}";
+		my $file="\$(EPOCDATA)\/$path$$BitMapRef{Trg}";
 		$$BitMapRef{GenericTrg}=$file;	    # record for later
 		$Files{$file}=1;
 		&Generic_MakeWorkFile('GENERIC_MAKEWORK',$file);
 		if ($$BitMapRef{Hdr}) {
 			my $mbg=&main::Path_Split('Base', $$BitMapRef{Trg});
-			$mbg="\$(EPOCINC)\\$mbg.mbg";
+			$mbg="\$(EPOCINC)\/$mbg.mbg";
 			&Generic_MakeWorkDir('GENERIC_MAKEWORK',$EPOCIncPath);
 			$Files{$mbg}=1;
 		}
@@ -717,7 +721,7 @@ sub Generic_Releaseables {
 	foreach $ResourceRef (@$ResourceStructRef) {
 		if(defined $$ResourceRef{Hdronly})
 			{
-				my $rsg="\$(EPOCINC)\\$$ResourceRef{BaseTrg}.rsg";
+				my $rsg="\$(EPOCINC)\/$$ResourceRef{BaseTrg}.rsg";
 				$$ResourceRef{GenericTrg}=$rsg;	# record for later
 
 				&Generic_MakeWorkDir('GENERIC_MAKEWORK',$EPOCIncPath);
@@ -725,12 +729,12 @@ sub Generic_Releaseables {
 			}
 		else
 			{
-				my $file="\$(EPOCDATA)\\$$ResourceRef{Trg}";
+				my $file="\$(EPOCDATA)\/$$ResourceRef{Trg}";
 				$$ResourceRef{GenericTrg}=$file;	# record for later
 				$Files{$file}=1;
 				&Generic_MakeWorkFile('GENERIC_MAKEWORK',$file);
 				if ($$ResourceRef{Hdr}) {
-					my $rsg="\$(EPOCINC)\\$$ResourceRef{BaseTrg}.rsg";
+					my $rsg="\$(EPOCINC)\/$$ResourceRef{BaseTrg}.rsg";
 					&Generic_MakeWorkDir('GENERIC_MAKEWORK',$EPOCIncPath);
 					$Files{$rsg}=1;
 				}
@@ -743,7 +747,7 @@ sub Generic_Releaseables {
 	{
 		if(defined $stringtable->{ExportPath})
 		{
-			$Files{$stringtable->{ExportPath}."\\".$stringtable->{BaseTrg}.".h"} = 1;
+			$Files{$stringtable->{ExportPath}."/".$stringtable->{BaseTrg}.".h"} = 1;
 		}
 	}
 
@@ -882,8 +886,8 @@ sub Generic_ResrcBld {
 	}
 	else {
 	if ($$ResourceRef{Hdr} || $$ResourceRef{Hdronly}) {
-		$HeaderOption = " -h\"$SavedBldPath\\$BaseResrc.rsg\"";
-		$HeaderCopyCmd = "\tperl -S ecopyfile.pl \"$SavedBldPath\\$BaseResrc.rsg\" \"$ResrcHdr\"\n";
+		$HeaderOption = " -h\"$SavedBldPath/$BaseResrc.rsg\"";
+		$HeaderCopyCmd = "\tperl -S ecopyfile.pl \"$SavedBldPath/$BaseResrc.rsg\" \"$ResrcHdr\"\n";
 	}
 	}
 	if (! $$ResourceRef{Hdronly}) {
@@ -931,8 +935,9 @@ sub Generic_ResrcBld {
 			" -D$_ "
 		);
 	}
+	my $uclang = uc $$ResourceRef{Lang};
 	&main::Output(
-		" -DLANGUAGE_$$ResourceRef{Lang} -u \"$AbsSrc\" ",
+		" -DLANGUAGE_$uclang -u \"$AbsSrc\" ",
 		" $Uidsarg ",
 		"$RscOption $HeaderOption -t\"$SavedBldPath\""
 	);
@@ -970,7 +975,7 @@ sub Generic_ResrcBld {
 	}
 
 	my @macros;
-	push @macros, "LANGUAGE_$$ResourceRef{Lang}", "_UNICODE";
+	push @macros, "LANGUAGE_$uclang", "_UNICODE";
 	my @userIncludes = &main::Path_Chop(&main::Path_AbsToWork(&main::UserIncPaths));
 	unshift (@userIncludes, $AbsSrcPath);	
 	my @systemIncludes = &main::Path_Chop(&main::Path_AbsToWork(&main::ResourceSysIncPaths));
diff --git a/cl_tools.pm b/cl_tools.pm
index 506f01b..efa519b 100644
--- a/cl_tools.pm
+++ b/cl_tools.pm
@@ -253,7 +253,7 @@ sub PMStartBldList($) {
 		"\n",
 		"CLEANLIBRARY :\n"
 	);
-	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}UDEB");
+	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}udeb");
 
 	&Generic_Releaseables;
 }
diff --git a/compilation_config/armv5.mk b/compilation_config/armv5.mk
index 2a66ed6..3c66b91 100644
--- a/compilation_config/armv5.mk
+++ b/compilation_config/armv5.mk
@@ -38,7 +38,7 @@ ASM=armasm
 AR=armar
 
 # Translator to translate the GCC inline assembler code
-TRANASM=tranasm.bat
+TRANASM=tranasm
 
 #--------------------
 # Option Prefix
@@ -183,7 +183,7 @@ EXTRA_CC_OPTION=
 #---------------------
 
 # Prefix Header File passed to the preprocessor
-PREFIXFILE=$(EPOCROOT)epoc32\include\rvct\rvct.h
+PREFIXFILE=$(EPOCROOT)epoc32/include/rvct/rvct.h
 
 # For .cpp Source files
 CPP_LANG_OPTION=--cpp
@@ -226,7 +226,7 @@ INCLUDE_OPTION=-J
 
 # Preinclude file for that compiler that contains all the compiler specific definitions
 # required by the Symbian OS source code.
-PREINCLUDE_OPTION=--preinclude $(EPOCROOT)epoc32\include\rvct\rvct.h
+PREINCLUDE_OPTION=--preinclude $(EPOCROOT)epoc32/include/rvct/rvct.h
 
 # Include options required by Function Call Logger
 FC_LOGGER_INCLUDE_OPTION=-I
@@ -234,7 +234,7 @@ FC_LOGGER_DICTIONARY_FILE_NAME=--dictionary_file_name
 FC_LOGGER_GENERATED_C_FILE_NAME=--gen_c_file_name
 
 # Preinclude file to be passed to the Function Call Logger which uses EDG compiler
-#PREINCLUDE_OPTION_FCLOGGER=$(FC_LOGGER_INCLUDE_OPTION) $(EPOCROOT)EPOC32\INCLUDE\RVCT --preinclude edg_rvct2_2.h
+#PREINCLUDE_OPTION_FCLOGGER=$(FC_LOGGER_INCLUDE_OPTION) $(EPOCROOT)epoc32/include/rvct --preinclude edg_rvct2_2.h
 
 # Option to control the search for the header files. For example, if we do not want to do a search in the
 # standard include directory of C++, then can restrict it by providing the appropriate option.
@@ -374,10 +374,10 @@ endif
 LINKER_ENTRY_OPTION=--entry
 
 # Symbol used to denote the Start of the grouped archives.
-START_GROUP_SYMBOL=(
+START_GROUP_SYMBOL=\(
 
 # Symbol used to denote the End of the grouped archives.
-END_GROUP_SYMBOL=)
+END_GROUP_SYMBOL=\)
 
 #-------------------------
 # Library Specific Options
@@ -388,9 +388,9 @@ STDLIB_OPTION=--no_scanlib
 
 # Additional static libraries that should automatically be supplied to the linker.
 ifeq "$(RVCT_VER_MAJOR)" "2"
-STATIC_LIBS_LIST=armlib\h_t__uf.l(switch8.o)
+STATIC_LIBS_LIST=armlib/h_t__uf.l\\\(switch8.o\\\)
 else
-STATIC_LIBS_LIST=armlib\h_5.l(switch8.o)
+STATIC_LIBS_LIST=armlib/h_5.l\\\(switch8.o\\\)
 endif
 
 # Option to pass the path from where the runtime libraries should be picked up
@@ -434,7 +434,7 @@ VIA_FILE_PREFIX=
 VIA_FILE_SUFFIX=
 
 # option to take object file names from other(via) file, here in case of ARMV5 it is necessary to specify space after the "--via " option.
-COMMANDFILE_OPTION:=--via 
+COMMANDFILE_OPTION:="--via "
 
 # Linker options which can be customized from BSF
 LD_OPTIONS=$(SYMBIAN_LD_MESSAGE_OPTION)$(UNRESOLVED_SYMBOL_REF_OPTION) $(STDLIB_OPTION) $(EXTRA_LD_OPTION)
diff --git a/compilation_config/extractvars.make b/compilation_config/extractvars.make
index 9deb8e5..3243175 100644
--- a/compilation_config/extractvars.make
+++ b/compilation_config/extractvars.make
@@ -26,6 +26,7 @@ all:
 	echo VERSION=$(VERSION)
 	echo VERSION_INFO=$(VERSION_INFO)
 	echo COMPILER_PLAT=$(COMPILER_PLAT)
+	echo CC_INSTALL_PATH=$(CC_INSTALL_PATH)
 	echo FC_LOGGER_INCLUDE_OPTION=$(FC_LOGGER_INCLUDE_OPTION)
 	echo FC_LOGGER_DICTIONARY_FILE_NAME=$(FC_LOGGER_DICTIONARY_FILE_NAME)
 	echo FC_LOGGER_GENERATED_C_FILE_NAME=$(FC_LOGGER_GENERATED_C_FILE_NAME)
diff --git a/compilation_config/gcce.mk b/compilation_config/gcce.mk
index d14b8cf..b6aa2a9 100644
--- a/compilation_config/gcce.mk
+++ b/compilation_config/gcce.mk
@@ -204,7 +204,7 @@ EXTRA_CC_OPTION=
 #---------------------
 
 # Prefix Header File passed to the preprocessor
-PREFIXFILE=$(EPOCROOT)EPOC32\INCLUDE\GCCE\GCCE.h
+PREFIXFILE=$(EPOCROOT)epoc32/include/gcce/gcce.h
 
 # For .cpp Source files
 CPP_LANG_OPTION=-x c++ -Wno-ctor-dtor-privacy
@@ -247,7 +247,7 @@ INCLUDE_OPTION=-I
 
 # Preinclude file for that compiler that contains all the compiler specific definitions
 # required by the Symbian OS source code.
-PREINCLUDE_OPTION=-include $(EPOCROOT)EPOC32/INCLUDE/GCCE/GCCE.h
+PREINCLUDE_OPTION=-include $(EPOCROOT)epoc32/include/gcce/gcce.h
 
 # Include options required by Function Call Logger  
 FC_LOGGER_INCLUDE_OPTION=-I
@@ -452,8 +452,8 @@ LINKER_SYMBOLS_MAP_OPTION=$(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION)
 LINKER_SCRIPT_FILE_OPTION=-T
 
 #Via file prefix and suffix 
-VIA_FILE_PREFIX=-(
-VIA_FILE_SUFFIX=-)	
+VIA_FILE_PREFIX=-\\\(
+VIA_FILE_SUFFIX=-\\\)	
 
 # option to take object file names from other(via) file, here the condition check for 
 # GCCE compiler version is done as the via option differs for different versions in GCCE
diff --git a/def2dll b/def2dll
new file mode 100644
index 0000000..706c7c3
--- /dev/null
+++ b/def2dll
@@ -0,0 +1,4 @@
+#!/bin/sh
+DIR=`dirname $0`
+TOOL=`basename $0`
+perl $DIR/$TOOL.bat "$@"
diff --git a/def2dll.bat b/def2dll.bat
index a0cc437..5e562ec 100644
--- a/def2dll.bat
+++ b/def2dll.bat
@@ -13,8 +13,6 @@
 :: Description:
 ::
 
-@goto invoke
-
 #!perl
 #line 19
 
@@ -30,12 +28,11 @@ BEGIN {
 	require 5.005_03;
 # establish the path to the Perl libraries: currently the same directory as this script
 	$PerlLibPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlLibPath =~ s/\//\\/g;	# X:\epoc32\tools
-	$PerlLibPath .= "\\";
+	$PerlLibPath .= "/";
 }
 
 use lib $PerlLibPath;
-use Defutl;
+use defutl;
 
 my %opts = ();
 
@@ -104,7 +101,7 @@ sub usage( )
         print "\t--linkas=<file>     		: linkas to file name specified\n";
         print "\t--inter                 	: enables interworking on ARM and THUMB\n";
         print "\t--export=<file>			: export to filename\n";
-        print "\t--sym_name_lkup         	: symbol name ordinal number lookup\n";
+        print "\t--sym_name_lkup         	: symbol name ordinal number lookup\n";
         print "\n";
         exit 1;
 }
@@ -149,8 +146,8 @@ sub genExpFile ($$$)
     my $numkeys = keys %symbolIndexMap;
     my $failed = 0;
 
-    open EXPFILE, ">$path\\$expFile.s" or
- 		die "Error: can't create $path\\$expFile.s\n";
+    open EXPFILE, ">$path/$expFile.s" or
+ 		die "Error: can't create $path/$expFile.s\n";
 
     print EXPFILE "\tEXPORT __DLL_Export_Table__\n\n";
     print EXPFILE "\tEXPORT |DLL\#\#ExportTable|\n\n";
@@ -205,9 +202,9 @@ sub genExpFile ($$$)
     print EXPFILE "\tEND";
     close EXPFILE;
 
-    $failed = system "armasm $floatingpointmodel $interworking -o $path\\$expFile.exp $path\\$expFile.s";
-    unlink ("$path\\$expFile.s") unless $failed;
-    die "Error: cant create $path\\$expFile.exp\n" if $failed;
+    $failed = system "armasm $floatingpointmodel $interworking -o $path/$expFile.exp $path/$expFile.s";
+    unlink ("$path/$expFile.s") unless $failed;
+    die "Error: cant create $path/$expFile.exp\n" if $failed;
 }
 
 my %DataSymbols = ();
@@ -217,8 +214,8 @@ sub genVtblExportFile($$)
     my ($bldpath, $dllName) = @_;
     my $FileName = "VtblExports";
 
-    open VTBLFILE, ">$bldpath\\$FileName.s" or
-		die "Error: can't create $bldpath\\$FileName.s\n";
+    open VTBLFILE, ">$bldpath/$FileName.s" or
+		die "Error: can't create $bldpath/$FileName.s\n";
 
     print VTBLFILE "\tAREA |.directive|, NOALLOC, READONLY, ALIGN=2\n";
     printf VTBLFILE "\tDCB \"\#\<SYMEDIT\>\#\\n\"\n";
@@ -234,17 +231,17 @@ sub genVtblExportFile($$)
     print VTBLFILE "\tEND";
     close VTBLFILE;
 
-    my $failed = system "armasm $floatingpointmodel $interworking -o $bldpath\\$FileName.o $bldpath\\$FileName.s";
-    unlink ("$bldpath\\$FileName.s");
-    die "Error: cant create $bldpath\\$FileName.o\n" if $failed;
-    push @objectFiles, "$bldpath\\$FileName.o";
+    my $failed = system "armasm $floatingpointmodel $interworking -o $bldpath/$FileName.o $bldpath/$FileName.s";
+    unlink ("$bldpath/$FileName.s");
+    die "Error: cant create $bldpath/$FileName.o\n" if $failed;
+    push @objectFiles, "$bldpath/$FileName.o";
 }
 
 sub genLibFile ($$$$)
 {
     my ($path, $bldpath, $libFile, $dllName) = @_;
-    my $tempFileName = "$bldpath\\$compName";
-    my $viaFileName = sprintf("$bldpath\\_t%x_via_.txt", time);
+    my $tempFileName = "$bldpath/$compName";
+    my $viaFileName = sprintf("$bldpath/_t%x_via_.txt", time);
     my $keyz = keys %symbolIndexMap;
     my $failed = 0;
     my $key;
@@ -273,7 +270,7 @@ sub genLibFile ($$$$)
     open VIAFILE, ">$viaFileName" or
 		die "Error: can't create VIA fie $viaFileName\n";
 
-    print VIAFILE "${oP}create \"$path\\$libFile\"\n";
+    print VIAFILE "${oP}create \"$path/$libFile\"\n";
     my $objectFile;
     foreach $objectFile (@objectFiles) {
 		print VIAFILE "\"$objectFile\"\n";
@@ -283,24 +280,6 @@ sub genLibFile ($$$$)
     $failed = system( "armar ${oP}via $viaFileName");
     push @objectFiles, $viaFileName;
     unlink @objectFiles;
-    die "Error: can't create $path\\$libFile\n" if $failed;
+    die "Error: can't create $path/$libFile\n" if $failed;
 }
 
-__END__
-
-# Tell emacs that this is a perl script even 'though it has a .bat extension
-# Local Variables:
-# mode:perl
-# tab-width:4
-# End:
-
-:invoke
-@perl -x -S def2dll.bat %*
-
-
-
-
-
-
-
-
diff --git a/defutl.pm b/defutl.pm
index 621bdc4..448a54b 100644
--- a/defutl.pm
+++ b/defutl.pm
@@ -16,7 +16,7 @@
 # 
 #
 
-package Defutl;
+package defutl;
 
 require Exporter;
 @ISA=qw(Exporter);
diff --git a/e32env.pm b/e32env.pm
index 585f0d5..b250bf9 100644
--- a/e32env.pm
+++ b/e32env.pm
@@ -17,46 +17,35 @@
 # 
 #
 
-package E32env;
+package e32env;
 
 use vars qw(%Data);
 
 BEGIN {
 	my $epocroot = $ENV{EPOCROOT};
 	die "ERROR: Must set the EPOCROOT environment variable\n" if (!defined($epocroot));
-	$epocroot =~ s-/-\\-go;	# for those working with UNIX shells
 	$epocroot =~ s/^ +//;
 	$epocroot =~ s/ +$//;
 	$ENV{EPOCROOT} = $epocroot;
 	die "ERROR: EPOCROOT must not include a drive letter\n" if ($epocroot =~ /^.:/);
-	die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\\/);
+	die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\//);
 	die "ERROR: EPOCROOT must not be a UNC path\n" if ($epocroot =~ /^\\\\/);
-	die "ERROR: EPOCROOT must end with a backslash\n" if ($epocroot !~ /\\$/);
- 	open PIPE, "set EPOCROOT |";
- 	my $found=0;
-	while (<PIPE>) {
-		if (/^EPOCROOT=.*/) {
-			$found=1;
-			last;
-		}
-	}
-	close PIPE;
-	die "EPOCROOT environment variable must be capitalised\n" if (!$found);
+	die "ERROR: EPOCROOT must end with a backslash\n" if ($epocroot !~ /\/$/);
 	print "WARNING: EPOCROOT does not specify an existing directory\n" if (!-d $epocroot);
 
-	$epocroot=~ s-\\$--;		# chop trailing \\
+	$epocroot=~ s-\/$--;		# chop trailing /
 
-	$Data{EPOCPath} = $epocroot."\\epoc32\\";
+	$Data{EPOCPath} = $epocroot."/epoc32/";
 
-	$Data{EPOCDataPath} = $epocroot."\\epoc32\\data\\";
-	$Data{EPOCIncPath} = $epocroot."\\epoc32\\include\\";
-	$Data{BldPath} = $epocroot."\\EPOC32\\BUILD\\";
-	$Data{LinkPath} = $epocroot."\\epoc32\\release\\";
-	$Data{RelPath} = $epocroot."\\epoc32\\release\\";
-	$Data{EPOCToolsPath} = $epocroot."\\epoc32\\tools\\";
-	$Data{RomPath} = $epocroot."\\epoc32\\rom\\";
+	$Data{EPOCDataPath} = $epocroot."/epoc32/data/";
+	$Data{EPOCIncPath} = $epocroot."/epoc32/include/";
+	$Data{BldPath} = $epocroot."/epoc32/build/";
+	$Data{LinkPath} = $epocroot."/epoc32/release/";
+	$Data{RelPath} = $epocroot."/epoc32/release/";
+	$Data{EPOCToolsPath} = $epocroot."/epoc32/tools/";
+	$Data{RomPath} = $epocroot."/epoc32/rom/";
 
-	$Data{DataPath} = "z\\system\\data\\";
+	$Data{DataPath} = "z/system/data/";
 	
 	$Data{SecurePlatform} = 1;
 }
diff --git a/e32plat.pm b/e32plat.pm
index 5312dab..283f0b7 100644
--- a/e32plat.pm
+++ b/e32plat.pm
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -17,7 +18,7 @@
 # 
 #
 
-package E32Plat;
+package e32plat;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -34,10 +35,10 @@ require Exporter;
 	Plat_SupportsFeatureVariants
 );
 
-use Winutl;
-use RVCT_plat2set;
-use BPABIutl;
-use E32Variant;
+use winutl;
+use rvct_plat2set;
+use bpabiutl;
+use e32variant;
 
 my $variantABIV2Keyword = &Variant_GetMacro();
 
@@ -166,7 +167,7 @@ my %Plat=(
 		Compiler=>'VC32',
 		CPU=>'WINS',
 		MakeMod=>'Cl_win',
-		MakeCmd=>'nmake',
+		MakeCmd=>'make',
 		OS=>'WINS',
 	},
 	VC6=>{
@@ -255,7 +256,7 @@ my %Plat=(
 		ASSP=>'MARM',
 		ASSPABI=>'',
 		Generic=>1,
-		MakeMod=>'Cl_arm',
+		MakeMod=>'cl_arm',
 		Compiler=>'ARMCC',
 		DefFile=>'EABI',
 		EABI=>1,
@@ -265,7 +266,7 @@ my %Plat=(
 		ASSP=>'MARM',
 		ASSPABI=>'',
 		Generic=>1,
-		MakeMod=>'Cl_arm',
+		MakeMod=>'cl_arm',
 		Compiler=>'ARMCC',
 		DefFile=>'EABI',
 		EABI=>1,
@@ -277,7 +278,7 @@ my %Plat=(
 		ASSP=>'MARM',
 		ASSPABI=>'',
 		Generic=>1,
-		MakeMod=>'Cl_arm',
+		MakeMod=>'cl_arm',
 		Compiler=>'ARMCC',
 		DefFile=>'EABI',
 		EABI=>1,
@@ -288,7 +289,7 @@ my %Plat=(
 		ASSP=>'MARM',
 		ASSPABI=>'',
 		Generic=>1,
-		MakeMod=>'Cl_bpabi',
+		MakeMod=>'cl_bpabi',
 		DefFile=>'EABI',
 		EABI=>1,
 		SupportsFeatureVariants=>1,
@@ -376,7 +377,7 @@ sub Plat_Customizes($) {
 sub Plat_Root($) {
 	my ($plat) = @_;
 
-	my $RootName = $Plat{$plat}{'ROOTPLATNAME'};
+	my $RootName = $Plat{$plat}{'ROOTPLATNAME'}  ? $Plat{$plat}{'ROOTPLATNAME'} : "";
 
 	if ($RootName) {
 		return $RootName;
@@ -392,11 +393,12 @@ sub Init_BSFs($) {
 #	get a list of modules
 	opendir DIR, $Path;
 	my @BSFs=grep s/^([^\.].*)\.BSF$/$1/, map { uc $_ } sort readdir DIR;
+	@BSFs = sort(@BSFs);
 	closedir DIR;
 
 	my $BSF;
 	foreach $BSF (@BSFs) {
-		my $File=$Path.$BSF.'.bsf';
+		my $File=$Path. lc $BSF . '.bsf';
 #		check whether the assp is already defined
 		if (defined %{$Plat{$BSF}}) {
 			warn(
@@ -422,6 +424,7 @@ sub Init_BSFs($) {
             }
             my $custom;
             while ($custom = <FILE>) {
+			$custom =~ s/\r$//; # skip trailing cr
 					#skip blank lines and comments
 			delete $Plat{$BSF};
 					last unless ($custom =~ /^$|^\#/);
@@ -568,7 +571,15 @@ sub Plat_Init ($) { # takes path to ASSP modules
 
 #	get a list of modules
 	opendir DIR, $Path;
-	my @_ASSPs=grep s/^([^\.].*)\.ASSP$/$1/, map { uc $_ } readdir DIR;
+	my @_ASSPs;
+	@files = readdir DIR;
+	foreach (@files) {
+		if (m/^([^\.].*)\.assp$/) {
+			push @_ASSPs, uc $1;
+		}
+	}
+	# alfredh: strangely enough this does not work on linux
+	#=grep s/^([^\.].*)\.ASSP$/$1/, map { uc $_ } readdir DIR;
 	closedir DIR;
 
 	my @ASSPs;
@@ -580,7 +591,7 @@ sub Plat_Init ($) { # takes path to ASSP modules
 
 			next;
 		}
-		push @ASSPs, $_;
+		push @ASSPs, lc $_;
 	}
 
 #	open each module in turn, and add it to the array
@@ -612,6 +623,8 @@ sub Plat_Init ($) { # takes path to ASSP modules
 			if (/^\s*$/o) {
 				next;
 			}
+#			upper-case data
+			$_=uc $_; #TODOAEH
 #			get the key-value pair
 			unless (/^\s*(\w+)\s+(\w+)\s*$/o) {
 				push @Errors, "$File($.) : warning: syntax error - only key-value pairs allowed\n";
@@ -719,7 +732,7 @@ sub Plat_GetL ($$$$) { # takes Platform name, ref to plat hash, ref to bldmacroh
 
 	$PlatHash{Compiler}='GCC32' unless $PlatHash{Compiler};
 	$PlatHash{OS}='EPOC32' unless $PlatHash{OS};
-	$PlatHash{MakeMod}='Cl_gcc' unless $PlatHash{MakeMod};
+	$PlatHash{MakeMod}='cl_gcc' unless $PlatHash{MakeMod};
 	$PlatHash{MakeCmd}='make' unless $PlatHash{MakeCmd};
 	$PlatHash{CPU}='MARM' unless $PlatHash{CPU};
 	$PlatHash{Single}=0 unless $PlatHash{Single};
@@ -763,7 +776,7 @@ sub Plat_GetL ($$$$) { # takes Platform name, ref to plat hash, ref to bldmacroh
 		}
 	}
 	if ($PlatHash{Compiler} eq 'ARMCC') {
-		my ($MajVer, $MinVer) = RVCT_plat2set::get_version_list($Candidate);
+		my ($MajVer, $MinVer) = rvct_plat2set::get_version_list($Candidate);
 		push @{$PlatHash{MmpMacros}}, 'ARMCC_'.$MajVer;
 		push @{$PlatHash{MmpMacros}}, 'ARMCC_'.$MajVer.'_'.$MinVer;
 	}
@@ -863,6 +876,8 @@ sub Plat_AssocIDE ($$) {
 #	return the IDE associated with a "Real" platform if there is one
 	my ($Candidate, $AssocIDEs)=@_;
 
+	$Candidate = uc $Candidate;
+
 	unless (defined $Plat{$Candidate}) {
 		die "ERROR: Platform \"$Candidate\" not supported\n";
 	}
diff --git a/e32tpver.pm b/e32tpver.pm
index 567cb74..d3ba33d 100644
--- a/e32tpver.pm
+++ b/e32tpver.pm
@@ -15,7 +15,7 @@
 # 
 #
 
-package E32tpver;
+package e32tpver;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
diff --git a/e32variant.pm b/e32variant.pm
index 29fc4fb..c426934 100644
--- a/e32variant.pm
+++ b/e32variant.pm
@@ -13,7 +13,7 @@
 # Description:
 #
 
-package E32Variant;
+package e32variant;
 
 require Exporter;
 
@@ -21,7 +21,7 @@ require Exporter;
 
 @EXPORT = qw(Variant_GetMacroList Variant_GetMacroHRHFile Variant_GetMacro);
 
-use Pathutl;
+use pathutl;
 
 # using $FindBin::Bin to figure out the location of the epoc32\tools directory as 
 # IDE doesn't understand env{EPOCROOT}
@@ -31,7 +31,7 @@ my $PerlBinPath;	# fully qualified pathname of the directory containing this scr
 BEGIN {
 	require 5.005_03;		# check user has a version of perl that will cope
 	$PerlBinPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlBinPath =~ s/\//\\/g;	# X:\epoc32\tools
+#	$PerlBinPath =~ s/\//\//g;	# X:\epoc32\tools
 }
 
 # get epocroot if it is set
@@ -40,16 +40,16 @@ my $toolspath;
 
 #if epocroot is not set figure it out
 if(!$epocroot){
-    $epocroot = $PerlBinPath . "\\..\\..\\" ; #infer epocroot
+    $epocroot = $PerlBinPath . "/../../" ; #infer epocroot
     $toolspath = $PerlBinPath;
 }else{
-    $toolspath = $epocroot . "epoc32\\tools\\";
+    $toolspath = $epocroot . "epoc32/tools/";
 }
 
 $epocroot=~s/^(.:)//io;    # remove drive letter
 $epocroot=&Path_Strip($epocroot); # collapse
 
-my $cfgFile =  $toolspath . "variant\\variant.cfg"; # default location
+my $cfgFile =  $toolspath . "variant/variant.cfg"; # default location
 $cfgFile =~ /^(.:)/i; # match the drive
 my $MacroHRHLocation_Drive = lc($1); # save the drive 
 
@@ -60,13 +60,15 @@ sub Variant_GetMacroHRHFile{
 	while (<FILE>) {
 	    # strip comments
 	    s/^([^#]*)#.*$/$1/o;
+	    s/\r$//;
 	    # skip blank lines
 	    if (/^\s*$/o) {
 		next;
 	    }
 	    # get the hrh file
 	    if($_ =~ /\.hrh/xi){
-		$file = $_; 
+		$file = lc $_; # gnupoc has all files in lowercase
+		$file =~ s/\\/\//g;
 		last;
 	    }
 	}
@@ -76,18 +78,15 @@ sub Variant_GetMacroHRHFile{
 	$file=~s/^(.:)//io;    # remove drive letter
 	my $paths_drive = lc($1);
 
-	$file = Path_MakeEAbs($epocroot."EPOC32\\", $epocroot, $file); # assume relative to EPOCROOT
+	$file = Path_MakeEAbs($epocroot."epoc32/", $epocroot, $file); # assume relative to EPOCROOT
 
 	if($paths_drive){
-	    die "\nERROR: Variant file specified in $cfgFile is not on the same drive as \\epoc32\\\n" 
+	    die "\nERROR: Variant file specified in $cfgFile is not on the same drive as /epoc32/\n" 
 		unless ($paths_drive eq $MacroHRHLocation_Drive);
 	}
 	if(!(-e $file)) {
 	    die "\nERROR: $cfgFile specifies $file which doesn't exist!\n";
 	}
-
-	# make sure it is in dos syntax
-	$file=~ s/\//\\/g;
     }
     return $file;
 }
@@ -105,9 +104,9 @@ sub Variant_GetMacroList{
 	chop( $VariantFilePath );
 	$VariantFilePath = &Path_PrefixWithDriveAndQuote($VariantFilePath);
 	$vfile = &Path_PrefixWithDriveAndQuote($vfile);
-	my $e32Path = &Path_PrefixWithDriveAndQuote($epocroot."epoc32\\include");
+	my $e32Path = &Path_PrefixWithDriveAndQuote($epocroot."epoc32/include");
 	
-	open CPPPIPE,"cpp -I $e32Path -I $VariantFilePath -undef -dM $vfile |" or die "ERROR: Can't invoke CPP.EXE\n";
+	open CPPPIPE,"arm-none-symbianelf-cpp -I $e32Path -I $VariantFilePath -undef -dM $vfile |" or die "ERROR: Can't invoke CPP.EXE\n";
 	while(<CPPPIPE>){
 	    if($_ =~ /(\#define)(\s+)(.+)/){
 		push @macros, $3;
diff --git a/efreeze.pl b/efreeze.pl
index 924701c..66a7c19 100644
--- a/efreeze.pl
+++ b/efreeze.pl
@@ -35,9 +35,9 @@ BEGIN {
 }
 
 use lib $PerlLibPath;
-use Defutl;
-use E32tpver;
-use Pathutl;
+use defutl;
+use e32tpver;
+use pathutl;
 
 
 # THE MAIN PROGRAM SECTION
diff --git a/elf2e32 b/elf2e32
new file mode 100644
index 0000000..2720be0
--- /dev/null
+++ b/elf2e32
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# elf2e32 - bash frontend for elf2e32.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/elftran b/elftran
new file mode 100644
index 0000000..9d5dc27
--- /dev/null
+++ b/elftran
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# elftran - bash frontend for elftran.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+# Workaround for Qt createpackage.pl and patch_capabilities.pl, which call
+# $epocroot/epoc32/tools/$PGM explicitly instead of just "$PGM" using the
+# path. Try to use a proper native version, if available.
+if [ "`which $PGM`" != "$0" ] && [ -x "`which $PGM`" ]; then
+	exec $PGM "$@"
+else
+	echo "executing $PGM.exe"
+	ROOT=$EPOCROOT/epoc32/tools
+	wine $ROOT/$PGM.exe "$@"
+fi
diff --git a/epoc b/epoc
new file mode 100644
index 0000000..7f7c19a
--- /dev/null
+++ b/epoc
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# epoc - bash interface for epoc.pl, part of GnuPoc project
+#
+# (c) 2002 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+perl -S epoc.pl "$@"
diff --git a/epoc.pl b/epoc.pl
index 40e5ced..901320b 100644
--- a/epoc.pl
+++ b/epoc.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -117,8 +118,8 @@ sub launchEmulator
 
     my $epocroot = &getEpocroot;
     my $drive = &getDrive;
-    my $emu = $drive . $epocroot . "epoc32" . "\\" 
-	      . "release\\" . $win . "\\" . $type . "\\" . "epoc.exe";
+    my $emu = $drive . $epocroot . "epoc32" . "/" 
+	      . "release/" . $win . "/" . $type . "/" . "epoc.exe";
     -e $emu ||
 	die "ERROR: File \"$emu\" not found.\n\n" .
 	    "The EPOCROOT environment variable does not identify\n" .
@@ -127,7 +128,7 @@ sub launchEmulator
 		    "directory - it should have no drive qualifier and\n" .
 			"must end with a backslash.\n";
     # If the execute is successful, this never returns.
-    exec("\"" . $emu . "\"") || die "Failed to execute the emulator \"$emu\": $!";
+    exec("wine " . $emu) || die "Failed to execute the emulator \"$emu\": $!";
 }
 
 sub printHelp
@@ -147,8 +148,8 @@ sub printVersion
     my $epocroot = &getEpocroot;
     my $drive = &getDrive;
 
-    my $binfo = $drive . $epocroot . "epoc32" . "\\" 
-	        . "data" . "\\" . "BuildInfo.txt";
+    my $binfo = $drive . $epocroot . "epoc32" . "\/" 
+	        . "data" . "\/" . "buildinfo.txt";
 
     -e $binfo || die "ERROR: File \"" . $binfo . "\" does not exist.\n";
     open(IFILE, $binfo) ||
@@ -215,11 +216,9 @@ sub getEpocroot
     my $epocroot = $ENV{EPOCROOT};
     die "ERROR: Must set the EPOCROOT environment variable.\n"
 	if (!defined($epocroot));
-    $epocroot =~ s-/-\\-go;	# for those working with UNIX shells
     die "ERROR: EPOCROOT must be an absolute path, " .
-	"not containing a drive letter.\n" if ($epocroot !~ /^\\/);
+	"not containing a drive letter.\n" if ($epocroot !~ /^\//);
     die "ERROR: EPOCROOT must not be a UNC path.\n" if ($epocroot =~ /^\\\\/);
-    die "ERROR: EPOCROOT must end with a backslash.\n" if ($epocroot !~ /\\$/);
     die "ERROR: EPOCROOT must specify an existing directory.\n" 
 	if (!-d $epocroot);
     return $epocroot;
diff --git a/epocaif.pl b/epocaif.pl
index 20a3a74..fac3864 100644
--- a/epocaif.pl
+++ b/epocaif.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -26,12 +27,11 @@ my $curdrive="x";	    	# will be initialised when first needed
 BEGIN {
 	require 5.005_03;		# check user has a version of perl that will cope
 	$PerlBinPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlBinPath =~ s/\//\\/g;	# X:\epoc32\tools
 }
 use lib $PerlBinPath;
-use E32Variant;         # for variant specific macros
-use Pathutl;
-use Preprocessor;
+use e32variant;         # for variant specific macros
+use pathutl;
+use preprocessor;
 
 sub print_usage
 	{
@@ -47,9 +47,9 @@ The available options are
    -Ixxx  -- C++ preprocessor arguments
    -o	  -- output AIF file name including path
    -t	  -- tempory directory for intermediate files
-   -b	  -- list of bitmaps Eg., "-b/c8\\location\\bmp1 /c8\\location\\bmp2.."
+   -b	  -- list of bitmaps Eg., "-b/c8\/location\/bmp1 /c8\/location\/bmp2.."
    -m	  -- compiled MBM file (alternative to -b)
-   -l	  -- if specified, captures all source to \\epoc32\\localisation\\...
+   -l	  -- if specified, captures all source to \/epoc32\/localisation\/...
 
 The aif resource file is then passed through the C++ preprocessor, using any 
 specified preprocessor arguments, and then compiled with RCOMP.EXE to 
@@ -116,7 +116,7 @@ while (@ARGV)
 		next;
 		}
 
-	if ($arg =~ /^-t(.*)\\?$/)
+	if ($arg =~ /^-t(.*)\/?$/)
 		{
 		$tmpdir =$1;
 		next;
@@ -159,8 +159,8 @@ if ($errors || $sourcefile eq "")
 
 my $rss_base = basename($sourcefile);
 my ($rssfile) = split(/\./, $rss_base);	    # remove extension
-my $rpp_name = "$tmpdir\\$rssfile.rpp";
-my $outputfile="$tmpdir\\AIF.RSC";	
+my $rpp_name = "$tmpdir\/$rssfile.rpp";
+my $outputfile="$tmpdir\/aif.rsc";	
 my $headerfile=$opt_h;
 
 if ($opt_v)
@@ -184,7 +184,7 @@ if($variantMacroHRHFile){
     $cpp_spec .= " -I \"" . &Path_RltToWork($variantFilePath) . "\" -include " . &Path_RltToWork($variantMacroHRHFile) . " "; 
 }
 
-$cpp_spec .= "-I $PerlBinPath\\..\\include ";	# extra path to support shared tools
+$cpp_spec .= "-I $PerlBinPath\/..\/include ";	# extra path to support shared tools
 $cpp_spec .= "-D_UNICODE ";
 
 $cpp_spec .= quoted_path($sourcefile) ." -o ". quoted_path($rpp_name);
@@ -195,7 +195,6 @@ system($cpp_spec);
 my $cpp_status = $?;
 die "* cpp failed\n" if ($cpp_status != 0);
 
-
 #-------------------------------------------------------
 # Copy source to epoc32\localisation
 #
@@ -217,7 +216,8 @@ use lockit_info;
 #
 
 my $rcomp_spec = "rcomp -u ";
-$rcomp_spec .= "-:$tmpdir\\_dump_of_resource_ "; # causes Rcomp to dump each resource (uncompressed and unpadded) in $tmpdir\\_dump_of_resource_1, $tmpdir\\_dump_of_resource_2, etc
+#my $rcomp_spec = "wine \$EPOCROOT/epoc32/tools/rcomp.exe -u ";
+$rcomp_spec .= "-:$tmpdir\/_dump_of_resource_ "; # causes Rcomp to dump each resource (uncompressed and unpadded) in $tmpdir\/_dump_of_resource_1, $tmpdir\/_dump_of_resource_2, etc
 $rcomp_spec .= "$opt_o $opt_h -s\"$rpp_name\" -i\"$sourcefile\"";
 
 print "* $rcomp_spec\n" if ($opt_v);
@@ -238,15 +238,19 @@ unlink $rpp_name;
 
 if ($opt_b ne "")
 	{
-	print "* bmconv /q $tmpdir\\AIF.MBM $opt_b\n" if ($opt_v);
-	system("bmconv /q $tmpdir\\AIF.MBM $opt_b");
+	my $outdir = $tmpdir;
+
+	$outdir = "/.$outdir" if ($outdir =~ /^\//); # fix the case when $outdir is /home/...
+
+	print "* bmconv /q $outdir\/aif.mbm $opt_b\n" if ($opt_v);
+	system("bmconv /q $outdir\/aif.mbm $opt_b");
 	if ($? != 0)
 		{
 		print "* BMCONV failed\n";
 		exit 1;
 		}
-	print "* bmconv /q /s $tmpdir\\AIF_XIP.MBM $opt_b\n" if ($opt_v);
-	system("bmconv /q /s $tmpdir\\AIF_xip.MBM $opt_b");
+	print "* bmconv /q /s $outdir\/aif_xip.mbm $opt_b\n" if ($opt_v);
+	system("bmconv /q /s $outdir\/aif_xip.mbm $opt_b");
 	
 	if ($? != 0)
 		{
@@ -256,23 +260,23 @@ if ($opt_b ne "")
 	}
 elsif ($opt_m ne "")
 	{
-	print "* copy $opt_m $tmpdir\\AIF.MBM\n" if ($opt_v); 
-	copy($opt_m, "$tmpdir\\AIF.MBM");
+	print "* copy $opt_m $tmpdir\/aif.mbm\n" if ($opt_v); 
+	copy($opt_m, "$tmpdir\/aif.mbm");
 	# no xip file genarated 
 	$xipaif=0;
 	}
 else
 	{
 	# no bitmap specified - this is legitimate
-	unlink("$tmpdir\\AIF.MBM");
-	unlink("$tmpdir\\AIF_xip.MBM");
+	unlink("$tmpdir\/aif.mbm");
+	unlink("$tmpdir\/aif_xip.mbm");
 	}
 
 #-------------------------------------------------------
-# Get the from UID from the first four bytes of "$tmpdir\\_dump_of_resource_1"
+# Get the from UID from the first four bytes of "$tmpdir\/_dump_of_resource_1"
 #
 
-open(DUMP_OF_RESOURCE_1, "< $tmpdir\\_dump_of_resource_1") or die("* Can't open dump file\n");
+open(DUMP_OF_RESOURCE_1, "< $tmpdir\/_dump_of_resource_1") or die("* Can't open dump file\n");
 binmode(DUMP_OF_RESOURCE_1);
 my $data;
 my $numberOfBytesRead=read(DUMP_OF_RESOURCE_1, $data, 4);
@@ -287,8 +291,8 @@ close(DUMP_OF_RESOURCE_1) or die("* Can't close dump file\n");
 # Produce the AIF file from the RSC and MBM files
 #
 
-my $uidcrc = "uidcrc.exe 0x101fb032 0 ".sprintf('0x%08x', $uid)." $tmpdir\\out.aif";
-my $uidcrc_xip = "uidcrc.exe 0x101fb032 0 ".sprintf('0x%08x', $uid)." $tmpdir\\out_xip.aif";
+my $uidcrc = "uidcrc 0x101fb032 0 ".sprintf('0x%08x', $uid)." $tmpdir\/out.aif";
+my $uidcrc_xip = "uidcrc 0x101fb032 0 ".sprintf('0x%08x', $uid)." $tmpdir\/out_xip.aif";
 
 print "* $uidcrc\n" if ($opt_v);
 system($uidcrc);
@@ -309,17 +313,17 @@ if ($xipaif ne 0)
 	}
 
 
-open(OUT_AIF, ">> $tmpdir\\out.aif") or die("* Can't open temporary file\n");
+open(OUT_AIF, ">> $tmpdir\/out.aif") or die("* Can't open temporary file\n");
 binmode(OUT_AIF);
 
 if ($xipaif ne 0)
 	{
-	open(OUTXIP_AIF, ">> $tmpdir\\out_xip.aif") or die("* Can't open temporary file\n");
+	open(OUTXIP_AIF, ">> $tmpdir\/out_xip.aif") or die("* Can't open temporary file\n");
 	binmode(OUTXIP_AIF);
 	}
 
 print "* Writing length of the RSC-block\n" if ($opt_v);
-my $lengthOfRscBlock=-s("$tmpdir\\aif.rsc");
+my $lengthOfRscBlock=-s("$tmpdir\/aif.rsc");
 my $numberOfPaddingBytes=(4-($lengthOfRscBlock%4))%4;
 print(OUT_AIF pack('V', $lengthOfRscBlock));
 if ($xipaif ne 0)
@@ -327,10 +331,10 @@ if ($xipaif ne 0)
 	print(OUTXIP_AIF pack('V', $lengthOfRscBlock));
 	}
 print "* Appending the RSC-block\n" if ($opt_v);
-&appendFile(\*OUT_AIF, "$tmpdir\\aif.rsc");
+&appendFile(\*OUT_AIF, "$tmpdir\/aif.rsc");
 if ($xipaif ne 0)
 	{
-	&appendFile(\*OUTXIP_AIF, "$tmpdir\\aif.rsc");
+	&appendFile(\*OUTXIP_AIF, "$tmpdir\/aif.rsc");
 	}
 # append any necessary padding bytes so that the file-offset of the start of the MBM-block is a multiple of 4-bytes
 print(OUT_AIF ('_' x $numberOfPaddingBytes));
@@ -338,15 +342,15 @@ if ($xipaif ne 0)
 	{
 	print(OUTXIP_AIF ('_' x $numberOfPaddingBytes));
 	}
-if (-e("$tmpdir\\aif.mbm"))
+if (-e("$tmpdir\/aif.mbm"))
 	{
 	print "* Appending the MBM-block\n" if ($opt_v);
-	&appendFile(\*OUT_AIF, "$tmpdir\\aif.mbm");
+	&appendFile(\*OUT_AIF, "$tmpdir\/aif.mbm");
 	}
-if (-e("$tmpdir\\aif_xip.mbm"))
+if (-e("$tmpdir\/aif_xip.mbm"))
 	{
 	print "* Appending the XIPMBM-block\n" if ($opt_v);
-	&appendFile(\*OUTXIP_AIF, "$tmpdir\\aif_xip.mbm");
+	&appendFile(\*OUTXIP_AIF, "$tmpdir\/aif_xip.mbm");
 	}
 
 close(OUT_AIF) or die("* Can't close temporary file\n");
@@ -354,23 +358,23 @@ if ($xipaif ne 0)
 	{
 	close(OUTXIP_AIF) or die("* Can't close temporary file\n");
 	}
-print "* copy $tmpdir\\out.aif $TrgPath\n" if ($opt_v);
-copy("$tmpdir\\out.aif", "$TrgPath");
+print "* copy $tmpdir\/out.aif $TrgPath\n" if ($opt_v);
+copy("$tmpdir\/out.aif", "$TrgPath");
 if ($xipaif ne 0)
 	{
 	my $basepath = &Path_Split('Path', $TrgPath);
 	my $ext=&Path_Split('Ext',  $TrgPath);
 	my $basename = basename($TrgPath, $ext);
 	my $xip="_xip";
-	print "* copy $tmpdir\\out_xip.aif $basepath$basename$xip$ext\n" if ($opt_v);
-	copy("$tmpdir\\out_xip.aif", "$basepath$basename$xip$ext");
+	print "* copy $tmpdir\/out_xip.aif $basepath$basename$xip$ext\n" if ($opt_v);
+	copy("$tmpdir\/out_xip.aif", "$basepath$basename$xip$ext");
 	}
-unlink("$tmpdir\\_dump_of_resource_*");
-unlink("$tmpdir\\aif.rsc");
-unlink("$tmpdir\\aif.mbm");
-unlink("$tmpdir\\out.aif");
-unlink("$tmpdir\\aif_xip.mbm");
-unlink("$tmpdir\\out_xip.aif");
+unlink("$tmpdir\/_dump_of_resource_*");
+unlink("$tmpdir\/aif.rsc");
+unlink("$tmpdir\/aif.mbm");
+unlink("$tmpdir\/out.aif");
+unlink("$tmpdir\/aif_xip.mbm");
+unlink("$tmpdir\/out_xip.aif");
 exit 0;
 
 #-------------------------------------------------------
@@ -380,7 +384,7 @@ exit 0;
 sub quoted_path
     {
     my ($arg) = @_;
-    return "\"$arg\"" if ($arg !~ /^\\[^\\]/);	# not an absolute path
+    return "\"$arg\"" if ($arg !~ /^\/[^\/]/);	# not an absolute path
     if ($curdrive eq "x")
 		{
 		$curdrive="";
diff --git a/epocmbm.pl b/epocmbm.pl
index 359a929..419c67f 100644
--- a/epocmbm.pl
+++ b/epocmbm.pl
@@ -24,7 +24,7 @@ my $epocroot;
 BEGIN {
 	require 5.005_03;		# check user has a version of perl that will cope
 	$PerlBinPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlBinPath =~ s/\//\\/g;	# X:\epoc32\tools
+#	$PerlBinPath =~ s/\//\\/g;	# X:\epoc32\tools
 }
 
 use lib $PerlBinPath;
@@ -99,8 +99,12 @@ my $headerfile=$opt_h;
 if ($opt_b ne "")
 	{
 	$opt_h = "\/h\"$headerfile\"" if ($headerfile ne "");
-	print "* bmconv /q $opt_h $opt_o $opt_b\n" if ($opt_v);
-	system("bmconv /q $opt_h $opt_o $opt_b");
+
+	my $outfile = $opt_o;
+	$outfile = "/.$outfile" if ($outfile =~ /^\//); # fix the case when $outfile is /home/...
+
+	print "* bmconv /q $opt_h $outfile $opt_b\n" if ($opt_v);
+	system("bmconv /q $opt_h $outfile $opt_b");
 	if ($? != 0)
 		{
 		print "* BMCONV failed\n";
diff --git a/epocrc.pl b/epocrc.pl
index 2fa5ae1..6b8f7b1 100644
--- a/epocrc.pl
+++ b/epocrc.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -28,13 +29,12 @@ my $PerlBinPath;	# fully qualified pathname of the directory containing this scr
 BEGIN {
 	require 5.005_03;		# check user has a version of perl that will cope
 	$PerlBinPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlBinPath =~ s/\//\\/g;	# X:\epoc32\tools
 }
 use lib $PerlBinPath;
 use lockit_info;
-use E32Variant;         # for variant specific macros
-use Pathutl;
-use Preprocessor;
+use e32variant;         # for variant specific macros
+use pathutl;
+use preprocessor;
 
 sub print_usage
 	{
@@ -191,7 +191,7 @@ while (@ARGV)
 		}
 	if ($arg =~ /^-t(.*)\\?$/)
 		{
-		$tmpdir ="$1\\";
+		$tmpdir ="$1\/";
 		next;
 		}
 	if ($arg =~ /^-l(.*)$/)
diff --git a/eshell b/eshell
new file mode 100644
index 0000000..162482b
--- /dev/null
+++ b/eshell
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# eshell - bash interface for eshell.pl, part of GnuPoc project
+#
+# (c) 2002 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+perl -S eshell.pl "$@"
diff --git a/eshell.pl b/eshell.pl
index 42aad5f..1f9ccd6 100644
--- a/eshell.pl
+++ b/eshell.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -108,8 +109,8 @@ sub launchEshell
     my ($type,$win) = @_;
     $epocroot = &getEpocroot;
     $drive = &getDrive;
-    $emu = $drive . $epocroot . "epoc32" . "\\" 
-	. "release\\" . $win . "\\" . $type . "\\" . "eshell.exe";
+    $emu = $drive . $epocroot . "epoc32" . "/" 
+	. "release/" . $win . "/" . $type . "/" . "eshell.exe";
     -e $emu ||
 	die "ERROR: File \"$emu\" not found.\n\n" .
 	    "The EPOCROOT environment variable does not identify\n" .
@@ -122,7 +123,7 @@ sub launchEshell
 	$emu.=" -MConsole --";
 			
     # If the execute is successful, this never returns.
-    exec($emu) || die "Failed to execute eshell \"$emu\": $!";
+    exec("wine " . $emu) || die "Failed to execute eshell \"$emu\": $!";
 }
 
 sub printHelp
@@ -144,11 +145,9 @@ sub getEpocroot
     my $epocroot = $ENV{EPOCROOT};
     die "ERROR: Must set the EPOCROOT environment variable.\n"
 	if (!defined($epocroot));
-    $epocroot =~ s-/-\\-go;	# for those working with UNIX shells
     die "ERROR: EPOCROOT must be an absolute path, " .
-	"not containing a drive letter.\n" if ($epocroot !~ /^\\/);
     die "ERROR: EPOCROOT must not be a UNC path.\n" if ($epocroot =~ /^\\\\/);
-    die "ERROR: EPOCROOT must end with a backslash.\n" if ($epocroot !~ /\\$/);
+    die "ERROR: EPOCROOT must end with a forward slash.\n" if ($epocroot !~ /\/$/);
     die "ERROR: EPOCROOT must specify an existing directory.\n" 
 	if (!-d $epocroot);
     return $epocroot;
diff --git a/extmake b/extmake
new file mode 100644
index 0000000..e2045c1
--- /dev/null
+++ b/extmake
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+wine make "$@"
+
diff --git a/featurevariantparser.pm b/featurevariantparser.pm
index 86d878c..ec698c5 100644
--- a/featurevariantparser.pm
+++ b/featurevariantparser.pm
@@ -50,7 +50,7 @@ my $virtual;
 my $childNodeStatus;
 my $varianthrh;
 
-my $defaultDir = "$ENV{EPOCROOT}epoc32\\tools\\variant";
+my $defaultDir = "$ENV{EPOCROOT}epoc32/tools/variant";
 
 my $dir;
 my $fullpath;
diff --git a/genbldinf.pl b/genbldinf.pl
new file mode 100644
index 0000000..242f56d
--- /dev/null
+++ b/genbldinf.pl
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+#
+# genbldinf.pl - part of GnuPoc project
+#
+# Recursively generate a bld.inf file from a given subsystem
+#
+# (c) 2001 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+my $BLDINF = "bld.inf";
+
+print "OS: $^O\n";
+
+unlink $BLDINF if (-f $BLDINF);
+
+$_ = `find . -iname $BLDINF`;
+
+s/(.*bld.inf.*)/\#include "$1"/igm;
+
+if ($^O eq "MSWin32") {
+  print "win32 hack:\n";
+  s|/|\\|gm;
+  $_ = lc $_;
+}
+
+open FO, ">$BLDINF" or die "Could not create $BLDINF";
+print FO "//\n";
+print FO "// bld.inf - generated by 'genbldinf.pl' - part of GnuPoc project\n";
+print FO "//\n";
+print FO $_;
+close FO;
+
+print "creating $BLDINF with:\n";
+system ("cat $BLDINF");
diff --git a/genstubs b/genstubs
new file mode 100644
index 0000000..4fbcc15
--- /dev/null
+++ b/genstubs
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# genstubs - bash frontend for genstubs.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/genutl.pm b/genutl.pm
index 34f8b0d..fca1d37 100644
--- a/genutl.pm
+++ b/genutl.pm
@@ -15,7 +15,7 @@
 # 
 #
 
-package Genutl;
+package genutl;
 
 require Exporter;
 @ISA=qw(Exporter);
diff --git a/getexports b/getexports
new file mode 100644
index 0000000..b62f197
--- /dev/null
+++ b/getexports
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# getexports - bash frontend for getexports.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/ide_cw.pm b/ide_cw.pm
index b519944..9160298 100644
--- a/ide_cw.pm
+++ b/ide_cw.pm
@@ -1481,7 +1481,7 @@ sub PMBld() {
 		$UidText.=")\n";
 		$UidText.="#pragma data_seg()\n";
 
-		$UIDFile = $BaseTrg.'_UID_.cpp';
+		$UIDFile = $BaseTrg.'_uid_.cpp';
 		&main::CreateExtraFile("${ExtraFilesPath}$UIDFile", $UidText);
 		}
 
diff --git a/lockit_info.pm b/lockit_info.pm
index dbcdf77..c0070be 100644
--- a/lockit_info.pm
+++ b/lockit_info.pm
@@ -32,7 +32,7 @@ require Exporter;
 	Close_InfoFile
 );
 
-use Pathutl;
+use pathutl;
 my $epocroot;
 my $epocPath;
 
@@ -40,15 +40,15 @@ sub Check_Epocroot
 	{
 	$epocroot = $ENV{EPOCROOT};
 	die "ERROR: Must set the EPOCROOT environment variable\n" if (!defined($epocroot));
-	$epocroot =~ s-/-\\-go;	# for those working with UNIX shells
+#	$epocroot =~ s-/-\\-go;	# for those working with UNIX shells
 	die "ERROR: EPOCROOT must not include a drive letter\n" if ($epocroot =~ /^.:/);
-	die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\\/);
-	die "ERROR: EPOCROOT must not be a UNC path\n" if ($epocroot =~ /^\\\\/);
-	die "ERROR: EPOCROOT must end with a backslash\n" if ($epocroot !~ /\\$/);
+	die "ERROR: EPOCROOT must be an absolute path without a drive letter\n" if ($epocroot !~ /^\//);
+	die "ERROR: EPOCROOT must not be a UNC path\n" if ($epocroot =~ /^\/\//);
+	die "ERROR: EPOCROOT must end with a slash\n" if ($epocroot !~ /\/$/);
 	die "ERROR: EPOCROOT must specify an existing directory\n" if (!-d $epocroot);
 
-	$epocroot=~ s-\\$--;		# chop trailing \\
-	$epocPath = "$epocroot\\epoc32\\localisation";
+	$epocroot=~ s-\/$--;		# chop trailing /
+	$epocPath = "$epocroot\/epoc32\/localisation";
 	}
 
 
@@ -66,8 +66,8 @@ sub Lockit_SrcFile()
 	}
 	$RscTarget=Path_Split('File', $RscTarget);
 	my ($Tgtdir, $CWDir) = split(/:/, $Resrc_Options);
-	$Tgtdir =~s-^(.*)\\$-$1-o; # remove terminating backslash
-	$Tgtdir=~s-^\\--o; # remove leading backslash
+	$Tgtdir =~s-^(.*)\/$-$1-o; # remove terminating backslash
+	$Tgtdir=~s-^\/--o; # remove leading backslash
 	
 	Check_Epocroot();
 	my $FilePath;
@@ -77,13 +77,13 @@ sub Lockit_SrcFile()
 
 		# update rppfile in epoc32\localisation if -l option specified and generating resource
 			
-		copy("$RppFile", "$FilePath\\");
+		copy("$RppFile", "$FilePath/");
 	}
 	else {
 		$FilePath = Setup_LockitPath($CWDir, $ResrcFile, $FileType);
 
 		# update rppfile in epoc32\localisation if -l option specified and generating resource
-		copy("$RppFile", "$FilePath\\$ResrcFile.rpp");
+		copy("$RppFile", "$FilePath/$ResrcFile.rpp");
 	}
 
 	if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
@@ -91,7 +91,7 @@ sub Lockit_SrcFile()
 		{
 			Open_InfoFile($ResrcFile . $lang);
 
-			WriteTo_Info ( "\n\\$Tgtdir\\$RscTarget :" );
+			WriteTo_Info ( "\n/$Tgtdir/$RscTarget :" );
 
 			if($FileType =~ /RSC/i && $RppFile ne "") {
 				WriteTo_Info (
@@ -110,12 +110,12 @@ sub Lockit_SrcFile()
 				my $BmpRef;
 				my (@AifBitmaps) = split(/ /, $Bitmaps);
 				foreach $BmpRef (@AifBitmaps) {
-					$BmpRef =~ /^([^\\]+)(\\.*)$/;
+					$BmpRef =~ /^([^\/]+)(\/.*)$/;
 					my $CDepth = $1;
 					my $bmp = $2;
 					my $file_base= basename($bmp);
 					WriteTo_Info (
-						 " $CDepth\\$file_base"
+						 " $CDepth/$file_base"
 					);
 				}
 			}
@@ -128,7 +128,7 @@ sub Lockit_SrcFile()
 		{
 			Open_InfoFile($ResrcFile);
 
-			WriteTo_Info ( "\n\\$Tgtdir\\$RscTarget :" );
+			WriteTo_Info ( "\n/$Tgtdir/$RscTarget :" );
 
 			if($FileType =~ /RSC/i && $RppFile ne "") {
 				WriteTo_Info (
@@ -147,12 +147,12 @@ sub Lockit_SrcFile()
 				my $BmpRef;
 				my (@AifBitmaps) = split(/ /, $Bitmaps);
 				foreach $BmpRef (@AifBitmaps) {
-					$BmpRef =~ /^([^\\]+)(\\.*)$/;
+					$BmpRef =~ /^([^\/]+)(\/.*)$/;
 					my $CDepth = $1;
 					my $bmp = $2;
 					my $file_base= basename($bmp);
 					WriteTo_Info (
-						 " $CDepth\\$file_base"
+						 " $CDepth/$file_base"
 					);
 				}
 			}
@@ -168,7 +168,6 @@ sub Lockit_SrcFile()
 sub Copy_Files ()
 	{
 	my ($SourceName, $TargetName) = @_;
-
 	copy($SourceName, $TargetName);
 	}
 
@@ -177,9 +176,9 @@ sub Create_InfoFile ()
 	{
 	my ($CreateLockitPath, $CreateInfoFile, $Datadir) = @_;
 	if (($CreateLockitPath !~ /mbm$/i) && (!-e "$CreateLockitPath")) { mkpath($CreateLockitPath); }
-	if ( !-e "$epocPath\\group") { mkpath("$epocPath\\group"); }
-	if ( !-e "$epocPath\\group\\$CreateInfoFile.info") {	
-		open INFO,">$epocPath\\group\\$CreateInfoFile.info" or die "ERROR: Can not create file \"$CreateInfoFile\"\n"; 
+	if ( !-e "$epocPath\/group") { mkpath("$epocPath\/group"); }
+	if ( !-e "$epocPath\/group\/$CreateInfoFile.info") {	
+		open INFO,">$epocPath\/group\/$CreateInfoFile.info" or die "ERROR: Can not create file \"$CreateInfoFile\"\n"; 
 		print INFO "DATADIR: $Datadir\n";
 		close INFO;
 	}
@@ -189,7 +188,7 @@ sub Create_InfoFile ()
 sub Open_InfoFile ($)
 	{
 	my $FileToOpen = $_[0];
-	open INFO,">>$epocPath\\group\\$FileToOpen.INFO" or die "ERROR: Can not open  \"$epocPath\\group\\$FileToOpen\"\n";
+	open INFO,">>$epocPath\/group\/$FileToOpen.info" or die "ERROR: Can not open  \"$epocPath\/group\/$FileToOpen\"\n";
 	}
 
 
@@ -208,7 +207,7 @@ sub LineExists ()
 	my $LineCheck = $_[1];
 	my $exists = 0;
 
-	open INFO,"$epocPath\\group\\$FileToOpen.info" or die "ERROR: Can not open \"$FileToOpen\"\n";
+	open INFO,"$epocPath\/group\/$FileToOpen.info" or die "ERROR: Can not open \"$FileToOpen\"\n";
 		while(<INFO>) {
 			if (/$LineCheck/i) { $exists = 1; return $exists; } 
 		}
@@ -228,17 +227,17 @@ sub Setup_LockitPath
 	else {
 		($ComponentSrcPath, $Resrc, $FileType) = @_;
 	}
-	my ($temp, $CWDir) = split(/\\/, $ComponentSrcPath);
+	my ($temp, $CWDir) = split(/\//, $ComponentSrcPath);
 	my $FilePath = $epocPath;
 
 	if($FileType =~ /RSS/i) { $FileType = "rsc"; }
 	if($FileType =~ /^acl|abw|aif|a[0-9]/i) {
-		$FilePath .= "\\aif";
+		$FilePath .= "/aif";
 	}
 	
 ## change added to support cnf file generation
 	if ($FileType =~ /CNF/i) { 
-		$FilePath .= "\\cnf"; 
+		$FilePath .= "/cnf"; 
 	}
 
 	my $WorkPath = ""; 
@@ -247,13 +246,13 @@ sub Setup_LockitPath
 		$WorkPath = "$Resrc"; 
 	}
 
-	$FilePath .= "\\$WorkPath\\$FileType";
+	$FilePath .= "/$WorkPath/$FileType";
 
 	if (defined $ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} &&  ($ENV{ABLD_TOOLSMOD_COMPATIBILITY_MODE} eq 'alpha')) {
-		&Create_InfoFile("$FilePath", "$Resrc$lang", "\\$WorkPath");
+		&Create_InfoFile("$FilePath", "$Resrc$lang", "/$WorkPath");
 	}
 	else {
-		&Create_InfoFile("$FilePath", "$Resrc", "\\$WorkPath");
+		&Create_InfoFile("$FilePath", "$Resrc", "/$WorkPath");
 	}
 
 	return $FilePath;
@@ -277,16 +276,16 @@ sub Lockit_Releasables
 		($BaseResrc,$FileType) = split(/\./, $Resrc);
 		Check_Epocroot();
 	
-		$LockitInfoPath = "$epocPath\\group\\$BaseResrc$lang.info";
+		$LockitInfoPath = "$epocPath/group/$BaseResrc$lang.info";
 
 		$LockitPath = Setup_LockitPath($ComponentSrcPath, $BaseResrc, $FileType, "");
 		%Files = %$href;
 
 		if($FileType =~ /RSS|ACL|ABW|AIF|A[0-9]/i && $Bitmaps eq ""){
-			$LockitPath .= "\\$BaseResrc$lang.rpp";
+			$LockitPath .= "/$BaseResrc$lang.rpp";
 		}
 		else {
-			$LockitPath .= "\\$Bitmaps";
+			$LockitPath .= "/$Bitmaps";
 		}
 
 	}
@@ -296,13 +295,13 @@ sub Lockit_Releasables
 		$Resrc = basename($ResrcFile);
 		($BaseResrc,$FileType) = split(/\./, $Resrc);
 		Check_Epocroot();
-		$LockitInfoPath = "$epocPath\\group\\$BaseResrc.info";
+		$LockitInfoPath = "$epocPath/group/$BaseResrc.info";
 
 		$LockitPath = Setup_LockitPath($ComponentSrcPath, $BaseResrc, $FileType);
 		%Files = %$href;
 
 		if($FileType =~ /RSS|ACL|ABW|AIF|A[0-9]/i && $Bitmaps eq ""){
-			$LockitPath .= "\\$BaseResrc.rpp";
+			$LockitPath .= "/$BaseResrc.rpp";
 		}
 		else {
 			undef $LockitPath;
diff --git a/makdeps.pm b/makdeps.pm
index 606deaa..b2d5ef1 100644
--- a/makdeps.pm
+++ b/makdeps.pm
@@ -16,7 +16,7 @@
 # 
 #
 
-package Makdeps;
+package makdeps;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
@@ -36,9 +36,9 @@ require Exporter;
 	Deps_SetOSVariantFile
 );
 
-use Checkgcc;
-use Pathutl;
-use Preprocessor;
+use checkgcc;
+use pathutl;
+use preprocessor;
 
 
 my $ChopSysDecoyPath;
@@ -72,9 +72,9 @@ BEGIN {	# NB don't initialise essential items to be provided later by calling mo
 	srand();
 	my $randnum=int(rand(100));
 	if (defined $ENV{PBUILDPID}) {
-		$SysDecoyPath=&Path_WorkPath."TEMPMAK$ENV{PBUILDPID}SYSDECOY$randnum\\";
+		$SysDecoyPath=&Path_WorkPath."TEMPMAK$ENV{PBUILDPID}SYSDECOY$randnum/";
 	} else {
-		$SysDecoyPath=&Path_WorkPath."TEMPMAKSYSDECOY$randnum\\";
+		$SysDecoyPath=&Path_WorkPath."TEMPMAKSYSDECOY$randnum/";
 	}
 	$S_SysDecoyPath=quotemeta($SysDecoyPath);
 	$ChopSysDecoyPath=&Path_Chop($SysDecoyPath);
@@ -89,7 +89,7 @@ sub Deps_InitL ($@) {	# abs Generated Hdr dir, StdIncsysdir (with drive letter i
 # work and the user will have to sort it out.  If it doesn't contain files and has been left lying around
 # because someone has killed the program half-way through, then rmdir will remove it and mkdir will work OK
 	rmdir $ChopSysDecoyPath if -d $ChopSysDecoyPath;
-	mkdir $ChopSysDecoyPath,2 or die "ERROR: Can't make temp dir \"$ChopSysDecoyPath\"\nIf it already exists, please remove it\n";
+	mkdir $ChopSysDecoyPath or die "ERROR: Can't make temp dir \"$ChopSysDecoyPath\"\nIf it already exists, please remove it\n";
 }
 sub Deps_SetVerbose {
 	$Mode{'Verbose'}=1;
@@ -134,7 +134,7 @@ sub Deps_SetSysIncPaths (@) {	# takes list abs paths
 	@SysFlags=&Path_PrefixWithDriveAndQuote(@SysFlags);
 	my $Flag;
 	foreach $Flag (@SysFlags) {
-		$Flag=~s/^(.*)$/-I $1/o;
+		$Flag=~s/^(.*)$/-I $1/o if $Flag;
 	}
 }
 sub Deps_SetUserIncPaths (@) {	# takes list of abs paths
@@ -158,6 +158,7 @@ sub Deps_SetPlatMacros (@) {
 			$Flag =~ s/\\\"/\"/g ; 
 		}
 		$Flag=~s/^(.*)$/-D$1/o;
+		$Flag = uc $Flag; # force uppercase for macros
 	}
 }
 
@@ -215,6 +216,8 @@ sub Deps_GenDependsL ($@) {	# takes abs source filepath and list of Build Macros
 	$CPPCommand = "$exe -undef -M -MG -nostdinc $PrefixFileOption";
 	$CPPCommand .= " -I $VariantIncludePath" if $VariantIncludePath;
 	$CPPCommand .= " -I ".&Path_PrefixWithDriveAndQuote($ChopSrcPath)." @UserFlags -I- -I ".&Path_PrefixWithDriveAndQuote($ChopSysDecoyPath)." @SysFlags @PlatMacros @BldMacros $ProductVariantFlag ".&Path_PrefixWithDriveAndQuote($Src);
+	# Fix for Open C headers + winscw
+	$CPPCommand .= " -D__option\\\(x\\\)=0";
 
 	if ($Mode{'Verbose'}) {
 		print "$CPPCommand\n"
@@ -236,14 +239,14 @@ sub Deps_GenDependsL ($@) {	# takes abs source filepath and list of Build Macros
 		# avoid the target of the rule by requiring whitespace in front of each element
 		while (/\s(\S+)/go) {
 			my $dep = $1;
+			next if $dep eq "/stdarg.h"; # Open C header + winscw bug workaround
 			$dep =~ s/;/ /go;	# spaces were turned into semicolon, so convert back again here
-			$dep =~ s-/-\\-go;	# replace forward slashes with backward slashes
 			$dep =~ s/^.\://;
 			$dep =~ s/\s+$//; 	# remove trailing spaces
 			push @RTWDepList,$dep;
 		}
 	}
-	close CPPPIPE or die "ERROR: $exe.EXE failure\n";
+	close CPPPIPE or die "ERROR: $exe failure\n";
 
 	# drop the first dependent, which is the source file itself
 	shift @RTWDepList;
@@ -299,12 +302,12 @@ sub TestDepends (@) { # takes source list of absolute dependencies - called by G
 	my $Path;
 	my $File;
 	DEPLOOP: foreach $Dep (@DepList) { # system dependencies not found
-		$Path=&Path_Split('Path', lc $Dep);
+		$Path=&Path_Split('Path', $Dep);
 		if ($Dep=~/^$S_SysDecoyPath(.*)$/o) { # allow things like "#include <sys\stats.h>"
 # any files listed as existing in the system decoy directory will be missing system include files
 			$File=$1;
 # change any missing generated header entries so that they are thought to be in $EPOCIncPath, where they will be generated to
-			if ($File=~/\.(RSG|MBG)$/oi) {
+			if ($File=~/\.(rsg|mbg)$/oi) {
 				push @GoodList, "$EPOCIncPath$File";
 				next DEPLOOP;
 			}
@@ -332,7 +335,7 @@ sub TestDepends (@) { # takes source list of absolute dependencies - called by G
 # preprocessor lists any missing user headers as existing in the current directory,
 # and, if no userinclude paths are specified,
 # searches to path containing the source file for user headers by default
-		if ($Path eq lc &Path_WorkPath) { # possible missing user headers
+		if ($Path eq &Path_WorkPath) { # possible missing user headers
 			$File=&Path_Split('File',$Dep);
 			# does the userinclude path contain the current working directory?
 			my $LoopPath;
@@ -349,6 +352,11 @@ sub TestDepends (@) { # takes source list of absolute dependencies - called by G
 					next DEPLOOP;
 				}
 			}
+			# allow generated headers here too, since -MG doesn't behave the same in CSL GCC 3.4 as in the bundled 2.9-psion-98r2 cpp
+			if ($File=~/\.(rsg|mbg)$/oi) {
+				push @GoodList, "$EPOCIncPath$File";
+				next DEPLOOP;
+			}
 			push @BadUserList, $File;	# file not found in specified userinclude path, bad
 			next DEPLOOP;
 		}
@@ -375,7 +383,7 @@ sub TestDepends (@) { # takes source list of absolute dependencies - called by G
 		my $GenHdr=0;
 		foreach $Bad (@BadUserList) {
 			print STDERR " \"$Bad\"";
-			if ($File=~/\.(RSG|MBG)$/o) {
+			if ($File=~/\.(rsg|mbg)$/o) {
 				$GenHdr=1;
 			}
 		}
diff --git a/makedef.pl b/makedef.pl
index bf358f5..5b63865 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -37,9 +37,9 @@ BEGIN {
 }
 use lib $PerlBinPath;
 
-use Defutl;
-use E32tpver;
-use Pathutl;
+use defutl;
+use e32tpver;
+use pathutl;
 use File::Copy;
 
 my %Options;	# command line option information
@@ -246,6 +246,7 @@ sub ReadInfFileL ($$$) {
 	my %exports;	# MWLD workaround - record mangled names in case we don't see the demangled ones
 	my $Line;
 	while ($Line=<FILE>) {
+		$Line =~ s/\r$//; # strip trailing cr
 	        my $Data=0;
 			my $SymbolSize=0;
 		$LineNum++;
@@ -304,6 +305,7 @@ sub ReadInfFileL ($$$) {
 				# Currently for Linux "Unmangled Symbols" section is blank
 				<FILE>; 
 				$Line = <FILE>; 
+				$Line =~ s/\r$//; # strip trailing cr
 				$LineNum+=2;
 				if ($^O eq "MSWin32") {
 					if ($Line !~ /^\s*\d+:\s+(\S+)$/o) {
@@ -317,6 +319,7 @@ sub ReadInfFileL ($$$) {
 					$Name = $1;
 				}
 				$Line = <FILE>; 
+				$Line =~ s/\r$//; # strip trailing cr
 				$LineNum++;
 				next if ($Line !~ /^\s+(.+)$/o);
 				$Comment = $1;
diff --git a/makekeys b/makekeys
new file mode 100644
index 0000000..d16d37b
--- /dev/null
+++ b/makekeys
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# makekeys - bash frontend for makekeys.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/makesis b/makesis
new file mode 100644
index 0000000..f8bee9d
--- /dev/null
+++ b/makesis
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# makesis - bash frontend for makesis.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+# Workaround for Qt createpackage.pl and patch_capabilities.pl, which call
+# $epocroot/epoc32/tools/$PGM explicitly instead of just "$PGM" using the
+# path. Try to use a proper native version, if available.
+if [ "`which $PGM`" != "$0" ] && [ -x "`which $PGM`" ]; then
+	exec $PGM "$@"
+else
+	echo "executing $PGM.exe"
+	ROOT=$EPOCROOT/epoc32/tools
+	wine $ROOT/$PGM.exe "$@"
+fi
diff --git a/makhelp.pm b/makhelp.pm
index 7acdcf4..7331aae 100644
--- a/makhelp.pm
+++ b/makhelp.pm
@@ -14,7 +14,7 @@
 #
 
 
-package Makhelp;
+package makhelp;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
@@ -23,7 +23,7 @@ require Exporter;
 	Help_Plat
 );
 
-use E32tpver;
+use e32tpver;
 use featurevariantparser;
 # also requires main module to have loaded platform module(s) and Modload.pm and Trgtype.pm
 
@@ -36,7 +36,7 @@ sub Help_Invocation () {
 		"MAKMAKE {flags} [{MMPFilePath}MMPFileRoot] [Platform[.Feature Variant]]\n",
 		"\n",
 		"Flags: (case insensitive)\n",
-		" -D               -> create makefile in ", $E32env::Data{BldPath}, "[project]\\[platform]\\\n",
+		" -D               -> create makefile in ", $e32env::Data{BldPath}, "[project]\\[platform]\\\n",
 		" -MMP             -> information - basic mmp syntax\n",
 		" -PLAT [platform] -> information - platform-specific mmp syntax\n",
 		" -V               -> verbose mode\n",
@@ -121,7 +121,7 @@ DEBUGGABLE_UDEBONLY    [Only Debug (UDEB) executables can be debugged in a runni
 DEBUGLIBRARY           [libraries - use in addition to LIBRARY for DEBUG builds]
 
 DEFFILE                [{path}{deffile} (default -
-                          \[project]\B[platform]\[target basename].DEF)
+                          \[project]B[platform]\[target basename].DEF)
                         If the path ends in \~\ the ~ is replace by B[platform] ]
 
 DOCUMENT               [sourcepath-relative_documents]
diff --git a/makmake b/makmake
new file mode 100644
index 0000000..9199434
--- /dev/null
+++ b/makmake
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# makmake - bash frontend for makmake.pl, part of GnuPoc project
+#
+# (c) 2001-2002 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+perl -S makmake.pl "$@"
diff --git a/makmake.pl b/makmake.pl
index 816d6c5..4445af3 100644
--- a/makmake.pl
+++ b/makmake.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -36,19 +37,18 @@ BEGIN {
 	require 5.005_03;
 # establish the path to the Perl libraries: currently the same directory as this script
 	$PerlLibPath = $FindBin::Bin;	# X:/epoc32/tools
-	$PerlLibPath =~ s/\//\\/g;	# X:\epoc32\tools
-	$PerlLibPath .= "\\";
+	$PerlLibPath .= "/";
 }
 
 use lib $PerlLibPath;
-use E32env;
-use E32Plat;
-use E32Variant;
-use Genutl;
-use Modload;
-use Pathutl;
-use Trgtype;
-use CheckSource;
+use e32env;
+use e32plat;
+use e32variant;
+use genutl;
+use modload;
+use pathutl;
+use trgtype;
+use checksource;
 use featurevariantparser;
 use featurevariantmap;
 
@@ -96,7 +96,7 @@ my %FeatureVariantInfo;
 	$Options{makemakefile}='1' unless ($Options{mmp} || $Options{plat});
 
 	if ($Options{mmp} or $Options{plat}) {
-		eval { &Load_ModuleL('MAKHELP'); };
+		eval { &Load_ModuleL('makhelp'); };
 		die $@ if $@;
 	}
 
@@ -154,17 +154,17 @@ my %FeatureVariantInfo;
 	$MMPFILE=pop @ARGV;
 	die "ERROR: Can't specify MMP file on a different drive\n" if $MMPFILE=~/^\w:\\/o;
 	if ($MMPFILE!~/.MMP$/io) {
-		$MMPFILE.='.MMP';
+		$MMPFILE.='.mmp';
 	}
 	$MMPFILE=&Path_AbsToWork($MMPFILE);
 
-	eval { &Load_ModuleL('Mmp'); };
+	eval { &Load_ModuleL('mmp'); };
 	die $@ if $@;
 	if ($Options{v}) {
 		&Mmp_SetVerbose;
 	}
 	if ($Options{d}) {
-		die "ERROR: $E32env::Data{EPOCPath} does not exist\n" if (!-d $E32env::Data{EPOCPath});
+		die "ERROR: $e32env::Data{EPOCPath} does not exist\n" if (!-d $e32env::Data{EPOCPath});
 	}
 	
 	if ($Options{debug}) {
@@ -278,10 +278,10 @@ die $@ if $@;
 	# set up the makefile filepath - need to do this before loading the platform module
 	# because UID source file will be added and set up in the makefile path under WINS
 	if ($Options{d}) {
-		$MAKEFILE=join ('', $Path{Bld}, &Path_Split('Base',$MMPFILE), $TruePlat{Ext});
+		$MAKEFILE=join ('', $Path{Bld}, &Path_Split('Base',$MMPFILE), lc $TruePlat{Ext});
 	}
 	else {
-		$MAKEFILE=join "", &Path_WorkPath, &Path_Split('Base',$MMPFILE), $TruePlat{Ext};
+		$MAKEFILE=join "", &Path_WorkPath, &Path_Split('Base',$MMPFILE), lc $TruePlat{Ext};
 	}
 }
 
@@ -429,7 +429,7 @@ if ($FeatureVariantArg)
 		else
 			{
 # modified by SV start: makefile improvement 
-			my $vmap = "$E32env::Data{RelPath}".lc($Plat{Real})."\\".lc($bld)."\\".Trg()."." . $FeatureVariantInfo{NAME}.".vmap";
+			my $vmap = "$e32env::Data{RelPath}".lc($Plat{Real})."/".lc($bld)."/".&Trg()."." . $FeatureVariantInfo{NAME}.".vmap";
 # modified by SV end: makefile improvement 
 			$vmap = Path_PrefixWithDrive($vmap);
 			if(-e $vmap){
@@ -525,7 +525,7 @@ if ($FeatureVariantArg)
 # Special handling for non-default invariant makefiles without FEATUREVARIANT in the MMP file
 # In this situation the default variant makefle is just included into the variant makefile
 # modified start: makefile improvement 
-if ($TrgType{Basic} =~ /^(EXEDLL|EXE|DLL|LIB)$/ && %FeatureVariantInfo && $FeatureVariantInfo{INVARIANT})
+if ($TrgType{Basic} =~ /^(EXEDLL|EXE|DLL|LIB)$/ && %FeatureVariantInfo && defined $FeatureVariantInfo{INVARIANT} && $FeatureVariantInfo{INVARIANT})
 	{
 	$MAKEFILE =~ s/([^.]*$)/DEFAULT/;
 # modified by SV start: makefile improvement 
@@ -552,9 +552,9 @@ if ($TrgType{Basic} =~ /^(EXEDLL|EXE|DLL|LIB)$/ && %FeatureVariantInfo && $Featu
 # modified by SV start: makefile improvement 
 	elsif(%FeatureVariantInfo)
 	{
-	my $variant_info = &Path_Chop($E32env::Data{BldPath}).$Path{BldInfPath}."\\FeatureVariantInfo\\".$Plat{Real}."\\".$Plat{Real}.".".$FeatureVariantInfo{NAME}.".".&Path_Split('Base', $MMPFILE).".info";
+	my $variant_info = &Path_Chop($e32env::Data{BldPath}).$Path{BldInfPath}."/FeatureVariantInfo/".$Plat{Real}."/".$Plat{Real}.".".$FeatureVariantInfo{NAME}.".".&Path_Split('Base', $MMPFILE).".info";
 	#if mmp file does not exists
-	$variant_info = &Path_Chop($E32env::Data{BldPath}).$Path{BldInfPath}."\\FeatureVariantInfo\\".$Plat{Real}."\\".$Plat{Real}.".".$FeatureVariantInfo{NAME}.".info" if ! -e $MMPFILE;
+	$variant_info = &Path_Chop($e32env::Data{BldPath}).$Path{BldInfPath}."/FeatureVariantInfo/".$Plat{Real}."/".$Plat{Real}.".".$FeatureVariantInfo{NAME}.".info" if ! -e $MMPFILE;
 # modified by SV end: makefile improvement 
 	my $variant_key = "VARIANT_PLAT_NAME_".&Path_Split('Base', $MMPFILE);
 	my $variant_info_new = $variant_info.".tmp";
@@ -633,12 +633,12 @@ my %CurSrcSet;
     
     ## Add default system include info for TOOLS2
     if ($PlatArg eq 'TOOLS2') {    	
-    	push @SysIncPaths , "$E32env::Data{EPOCPath}include\\tools\\stlport";
+    	push @SysIncPaths , "$e32env::Data{EPOCPath}include/tools/stlport";
     }
 
 	# If the stdcpp keyword is used, or if the target type is STD* ...
 	if ($StdCpp or $TrgType{Name} eq 'STDEXE' or $TrgType{Name} eq 'STDDLL' or $TrgType{Name} eq 'STDLIB') {
-		push @SysIncPaths, $E32env::Data{EPOCPath}."include\\stdapis";
+		push @SysIncPaths, $e32env::Data{EPOCPath}."include/stdapis";
 	}
 
 	&PMStartBldList($Plat{MakeCmd}) if defined &PMStartBldList;
@@ -655,7 +655,7 @@ my %CurSrcSet;
 	# Load the Dependency Generator
 	eval { &Load_ModuleL('MAKDEPS'); };
 	die $@ if $@;
-	eval { &Deps_InitL($E32env::Data{EPOCIncPath},@StdIncPaths); };
+	eval { &Deps_InitL($e32env::Data{EPOCIncPath},@StdIncPaths); };
 	die $@ if $@;
 	if ($Options{v}) {
 		&Deps_SetVerbose;
@@ -714,7 +714,8 @@ my %CurSrcSet;
 		if ($Options{v}) {
 			print "Resource: \"$$CurResourceRef{Trg}\"\n";
 		}
-		eval { @CurDepList=&Deps_GenDependsL($$CurResourceRef{Source}, ("LANGUAGE_$$CurResourceRef{Lang}")); };
+		my $uclang = uc $$CurResourceRef{Lang};
+		eval { @CurDepList=&Deps_GenDependsL($$CurResourceRef{Source}, ("LANGUAGE_$uclang")); };
 		die $@ if $@;
 		&PMResrcBld if defined &PMResrcBld;
 		undef @CurDepList;
@@ -732,11 +733,9 @@ my %CurSrcSet;
 
 # Add tools-relative include path to sys includes, to allow for shared include\aiftool.rh
 	use FindBin;
-	$FindBin::Bin =~ /:(.*)\//;
-	my $extraIncPath = $1;
-	$extraIncPath =~ s/\//\\/g;
+	my $extraIncPath = $FindBin::Bin;
 	my @SavedResourceSysIncPaths = @ResourceSysIncPaths;
-	push @ResourceSysIncPaths, "$extraIncPath\\INCLUDE";
+	push @ResourceSysIncPaths, "$extraIncPath/include";
 	&Deps_SetSysIncPaths(@ResourceSysIncPaths);
 
 	my $LoopAifRef;
@@ -915,13 +914,13 @@ my %CurSrcSet;
 				elsif ($SpecialRomFileTypes{$TrgType{Name}}) {
 					$RomFileType=$SpecialRomFileTypes{$TrgType{Name}};
 				}
-				my $RomPath="sys\\bin\\";
+				my $RomPath="sys/bin/";
 				if ($$ref{Path}) {
 					$RomPath=$$ref{Path};
 				}
 				elsif ($TrgType{Path}) {
 					$RomPath=$TrgType{Path};
-					$RomPath=~s-z\\(.*)-$1-o;
+					$RomPath=~s-z\/(.*)-$1-oi;
 				}
 				my $RomFile=$LinkAsBase;
 				if ($$ref{File}) {
@@ -937,7 +936,7 @@ my %CurSrcSet;
 				
 				$ABIDir = '##KMAIN##' if ($KHash1{lc $TrgType{Name}});
 				$ABIDir = '##KMAIN##' if ($KHash2{lc $RomFileType});
-				my $IbyTextFrom="$RomFileType=$E32env::Data{RelPath}$ABIDir\\##BUILD##\\$Trg";
+				my $IbyTextFrom="$RomFileType=$e32env::Data{RelPath}$ABIDir/##BUILD##/$Trg";
 				my $IbyTextTo="$RomPath$RomFile";
 				my $Spaces= 60>length($IbyTextFrom) ? 60-length($IbyTextFrom) : 1; 
 				&Output("\t\@echo ", $IbyTextFrom, ' 'x$Spaces, "$IbyTextTo $RomDecorations\n");
@@ -946,7 +945,7 @@ my %CurSrcSet;
 				my $ABIDir = '##MAIN##';
 				$ABIDir = '##KMAIN##' if ($KHash1{lc $TrgType{Name}});
 				my $RomFileType='data';
-				my $RomPath="sys\\bin\\";
+				my $RomPath="sys/bin/";
 				if ($$ref{Path}) {
 					$RomPath=$$ref{Path};
 				}
@@ -956,7 +955,7 @@ my %CurSrcSet;
 				}
 				my $RomDecorations='attrib=r';
 
-				my $IbyTextFrom="$RomFileType=$E32env::Data{RelPath}$ABIDir\\##BUILD##\\$Trg";
+				my $IbyTextFrom="$RomFileType=$e32env::Data{RelPath}$ABIDir/##BUILD##/$Trg";
 				my $IbyTextTo="$RomPath$RomFile";
 				my $Spaces= 60>length($IbyTextFrom) ? 60-length($IbyTextFrom) : 1; 
 				&Output("\t\@echo ", $IbyTextFrom, ' 'x$Spaces, "$IbyTextTo $RomDecorations\n");
@@ -1026,7 +1025,7 @@ sub getEABIDef() {
     # set package to ignore warnings about missing .def file. 
     &Mmp_SetIgnoreMissingDef;
     
-    eval { &Mmp_ProcessL($E32env::Data{EPOCPath}, $MMPFILE, \%Plat, $FeatureVariantInfo{BUILD_INCLUDES}); };
+    eval { &Mmp_ProcessL($e32env::Data{EPOCPath}, $MMPFILE, \%Plat, $FeatureVariantInfo{BUILD_INCLUDES}); };
 	return $@ if $@;
 	my %EABIDef=%{&Mmp_Def};
 	
@@ -1064,7 +1063,7 @@ sub SetVarsFromMmp ($) {
 	&Mmp_SetIgnoreMissingDef;
 	}
 
-	eval { &Mmp_ProcessL($E32env::Data{EPOCPath}, $MMPFILE, \%Plat, $FeatureVariantInfo{BUILD_INCLUDES}); };
+	eval { &Mmp_ProcessL($e32env::Data{EPOCPath}, $MMPFILE, \%Plat, $FeatureVariantInfo{BUILD_INCLUDES}); };
 	return $@ if $@;
 
 	%WarningLevel=&Mmp_WarningLevel;
@@ -1144,15 +1143,14 @@ sub SetVarsFromMmp ($) {
 	undef %Path;
 
 #	set up ASSP link path - this is the path where the target looks for ASSP-specific import libraries
-        $Path{ASSPLink}="$E32env::Data{LinkPath}$Plat{ASSP}\\";
+        $Path{ASSPLink}="$e32env::Data{LinkPath}" . lc $Plat{ASSP} . "/";
 
 #	set up build path
 	my $BldInfPath=cwd;
-	$BldInfPath=~s-/-\\-go;						# separator from Perl 5.005_02+ is forward slash
 	$BldInfPath=~s/^(.:)//o;					# remove drive letter
-	$BldInfPath=~s-^(.*[^\\])$-$1\\-o;			# ensure workpath ends with a backslash
+	$BldInfPath=~s-^(.*[^\/])$-$1\/-o;			# ensure workpath ends with a slash
 	$Path{BldInfPath} = $BldInfPath;			# Remember the path to bldinf
-	$Path{Bld}=join('', &Path_Chop($E32env::Data{BldPath}), $BldInfPath, &Path_Split('Base',$MMPFILE), "\\$Plat{Real}\\");
+	$Path{Bld}=join('', &Path_Chop($e32env::Data{BldPath}), $BldInfPath, &Path_Split('Base',$MMPFILE), lc "/$Plat{Real}/");
 }
 
 sub generateX86GCCDefFile()
@@ -1202,28 +1200,28 @@ sub InitLinkPaths() {
 	my $UnderlyingABI=$ABI;
 	$UnderlyingABI=&PMUnderlyingABI($ABI) if defined &PMUnderlyingABI;
 
-	$Path{Lib}="$E32env::Data{LinkPath}";
+	$Path{Lib}="$e32env::Data{LinkPath}";
 	unless ($ASSPExports) {
-		$Path{Lib}.= lc($UnderlyingABI)."\\";
+		$Path{Lib}.= lc($UnderlyingABI)."/";
 	} 
 	else {
-		$Path{Lib}.= lc($Plat{ASSP})."\\";
+		$Path{Lib}.= lc($Plat{ASSP})."/";
 	}
 
 
 #	set up link path - this is the place where the target looks for ordinary libraries
-	$Path{Link}="$E32env::Data{LinkPath}"."$UnderlyingABI\\";
+	$Path{Link}="$e32env::Data{LinkPath}". lc "$UnderlyingABI/";
 
 #	set up stat link path - this is where the target looks for static libraries
-	$Path{StatLink}="$E32env::Data{LinkPath}";
+	$Path{StatLink}="$e32env::Data{LinkPath}";
 	if ($Plat{StatLink}) {
-			$Path{StatLink}.=lc($Plat{StatLink})."\\";
+			$Path{StatLink}.=lc($Plat{StatLink})."/";
 	} else {
 		unless ($Plat{OS} eq 'WINS') {	# WINC and WINS versions of EEXE are different
-			$Path{StatLink}.=lc($ABI)."\\"; # ARM static libraries are currently always ASSP-independent
+			$Path{StatLink}.=lc($ABI)."/"; # ARM static libraries are currently always ASSP-independent
 		}
 		else {
-			$Path{StatLink}.=lc($Plat{ASSP})."\\"; # WINC static libraries are currently always ASSP-specific
+			$Path{StatLink}.=lc($Plat{ASSP})."/"; # WINC static libraries are currently always ASSP-specific
 		}
 	}
 
@@ -1233,7 +1231,7 @@ sub InitLinkPaths() {
 		$Path{Rel}=$Path{StatLink};
 	}
 	else {
-		$Path{Rel}="$E32env::Data{RelPath}".lc($Plat{Real})."\\";
+		$Path{Rel}="$e32env::Data{RelPath}".lc($Plat{Real})."/";
 	}
 	
 }
@@ -1305,10 +1303,10 @@ sub ASSPLinkPath () {
 	my $Path=$Path{ASSPLink};
 	if ($CurBld) {
 		if ($Plat{OS} eq 'EPOC32') {
-			$Path.="UREL\\";
+			$Path.="urel/";
 		}
 		else {
-			$Path.="UDEB\\";
+			$Path.="udeb/";
 		}
 	}
 	$Path;
@@ -1367,8 +1365,8 @@ sub BldList () {
 sub BldPath () {
 	my $Path=$Path{"Bld"};
 	if ($CurBld) {
-		$Path.=$FeatureVariantInfo{$CurBld."_LABEL"}."\\" if (%FeatureVariantInfo && !$FeatureVariantInfo{INVARIANT} && $FeatureVariantInfo{$CurBld."_LABEL"});
-		$Path.="$CurBld\\";
+		$Path.=$FeatureVariantInfo{$CurBld."_LABEL"}."/" if (%FeatureVariantInfo && !$FeatureVariantInfo{INVARIANT} && $FeatureVariantInfo{$CurBld."_LABEL"});
+		$Path.= lc "$CurBld/";
 	}
 	$Path;
 }
@@ -1385,7 +1383,7 @@ sub DataLinkAddress () {
 	$DataLinkAddress;
 }
 sub DataPath () {
-	$E32env::Data{DataPath};
+	$e32env::Data{DataPath};
 }
 sub DebugLibList () {
 	@DebugLibList;
@@ -1414,22 +1412,22 @@ sub DocList () {
 	sort @DocList;
 }
 sub EPOCPath () {
-	$E32env::Data{EPOCPath};
+	$e32env::Data{EPOCPath};
 }
 sub EPOCDataPath () {
-	$E32env::Data{EPOCDataPath};
+	$e32env::Data{EPOCDataPath};
 }
 sub EPOCIncPath () {
-	$E32env::Data{EPOCIncPath};
+	$e32env::Data{EPOCIncPath};
 }
 sub EPOCRelPath () {
-	$E32env::Data{RelPath};
+	$e32env::Data{RelPath};
 }
 sub EPOCSecurePlatform () {
-	$E32env::Data{SecurePlatform};
+	$e32env::Data{SecurePlatform};
 }
 sub EPOCToolsPath () {
-	$E32env::Data{EPOCToolsPath};
+	$e32env::Data{EPOCToolsPath};
 }
 sub Exports () {
 	@{$TrgType{Exports}{$Plat{"DefFile"}}};
@@ -1457,13 +1455,13 @@ sub LibPath () {
 	my $Path=$Path{Lib};
 	if ($CurBld) {
 		if (($Plat{DefFile} eq 'EABI') || ($Plat{DefFile} eq 'x86gcc') || ($Plat{OS} eq 'TOOLS2')) {
-			$Path.="lib\\";
+			$Path.="lib/";
 		}
 		elsif ($Plat{OS} eq 'EPOC32') {
-			$Path.="urel\\";
+			$Path.="urel/";
 		}
 		else {
-			$Path.="udeb\\";
+			$Path.="udeb/";
 		}
 	}
 	$Path;
@@ -1485,13 +1483,13 @@ sub LinkPath () {
 	my $Path=$Path{Link};
 	if ($CurBld) {
 		if ($Plat{DefFile} eq 'EABI' || $Plat{DefFile} eq 'x86gcc') {
-			$Path.="LIB\\";
+			$Path.="lib/";
 		}
 		elsif ($Plat{OS} eq 'EPOC32') {
-			$Path.="UREL\\";
+			$Path.="urel/";
 		}
 		else {
-			$Path.="UDEB\\";
+			$Path.="udeb/";
 		}
 	}
 	$Path;
@@ -1548,7 +1546,7 @@ sub ProcessPriority () {
 sub RelPath () {
 	my $Path=$Path{Rel};
 	if ($CurBld) {
-		$Path .= lc($CurBld)."\\";
+		$Path .= lc($CurBld)."/";
 	}
 	$Path;
 }
@@ -1566,7 +1564,7 @@ sub	SetStdIncPaths (@) {
 	@StdIncPaths=();
 	my $Path;
 	foreach $Path (@_) {
-		$Path=~s-^(.*[^\\])$-$1\\-o if defined($Path);
+		$Path=~s-^(.*[^\/])$-$1\/-o if defined($Path);
 		push @StdIncPaths, $Path;	# only place drive letters may appear, up to modules to handle
 	}
 }
@@ -1598,7 +1596,8 @@ sub StatLibList () {
 sub StatLinkPath () {
 	my $Path=$Path{StatLink};
 	if ($CurBld) {
-		$Path.="$CurBld\\";
+		$CurBld = lc $CurBld;
+		$Path.="$CurBld\/";
 	}
 	$Path;
 }
@@ -1632,6 +1631,7 @@ sub Trg (;$) {
 	return "" if !$Trg;
 
 	my $localTrg = $Trg;	
+	return $localTrg if !defined($bld);
 	my $vinfo = $FeatureVariantInfo{$bld."_LABEL"};
 	$localTrg =~ s/(\.[^\.]+)$/\.$vinfo$1/ if ($bld && %FeatureVariantInfo && !$FeatureVariantInfo{INVARIANT} && $vinfo);
 	return $localTrg;
diff --git a/memtrace.pl b/memtrace.pl
index bf79a72..1124a5d 100644
--- a/memtrace.pl
+++ b/memtrace.pl
@@ -242,7 +242,7 @@ sub help ()
 	{
 	my $build;
 	
-	&Load_ModuleL('E32TPVER');
+	&Load_ModuleL('e32tpver');
 	print "\nmemtrace - " .
 	  "Postprocess EPOC memory usage trace (Build ", &E32tpver, ")\n";
 	&usage;
diff --git a/mifconv b/mifconv
new file mode 100644
index 0000000..1638c76
--- /dev/null
+++ b/mifconv
@@ -0,0 +1,36 @@
+#!/usr/bin/env perl
+#
+# mifconv - perl frontend for mifconv.exe, part of GnuPoc project
+#
+# Copyright (C) 2010 Thomas Zander <t.zander@nokia.com>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+# call wine mifconv.exe
+# export EPOCROOT with backslashes instead of normal slashes
+# and convert all slashes in the arguments to be backslashes, except for
+# slashes starting options.
+
+my $epocroot = $ENV{"EPOCROOT"};
+$epocroot =~ s/\\/\//g; 
+$command = "wine ". $epocroot . "/epoc32/tools/mifconv.exe";
+
+for my $arg (@ARGV) {
+    my $isOption = $arg=~/^\/[HEPTBSVFAC1-8].*/i;
+    $isOption = 0 if -e $arg; # If this is an existing file name, don't treat it as an option.
+    $arg=~s/\//\\\\/g; # replace all
+    if ($isOption) {
+        $arg=~s/^\\\\/\//; # replace first backslashes back to a slash
+    }
+    $command="$command \"$arg\"";
+}
+
+# Set EPOCROOT to a version with backslashes, for mifconv
+my $epocroot = $ENV{"EPOCROOT"};
+$epocroot=~s/\//\\/g; # replace all
+$ENV{"EPOCROOT"} = $epocroot;
+
+system ($command);
diff --git a/mmp.pm b/mmp.pm
index e4d66fd..8c20a54 100644
--- a/mmp.pm
+++ b/mmp.pm
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -15,7 +16,7 @@
 # 
 #
 
-package Mmp;
+package mmp;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -36,7 +37,7 @@ require Exporter;
 	Mmp_Capability
 	Mmp_CapabilityFlags
 	Mmp_DataLinkAddress
-	Mmp_DebugLibList 
+	Mmp_DebugLibList
 	Mmp_Def
 	Mmp_DocHash
 	Mmp_ExportUnfrozen
@@ -59,7 +60,7 @@ require Exporter;
 	Mmp_RomTargets
 	Mmp_SourceStruct 
 	Mmp_StackSize
-	Mmp_StatLibList 
+	Mmp_StatLibList
 	Mmp_SysIncPaths
 	Mmp_Trg
 	Mmp_TrgType
@@ -90,11 +91,11 @@ require Exporter;
 	Mmp_TestedMacros
 );
 
-use Genutl;
-use Prepfile;
-use Pathutl;
-use Trgtype;
-use CheckSource;
+use genutl;
+use prepfile;
+use pathutl;
+use trgtype;
+use checksource;
 use Cwd;
 
 my %ProcessPriorityNames = (
@@ -351,12 +352,10 @@ sub Mmp_ProcessL ($$$$) {
 	}
 
 	my $current = cwd;
-	$current =~ s/\//\\/g;
-	$current =~ s/^[a-zA-Z]://;
 
 	# Mimic what the current parsing routine does in terms of include paths and .mmp files
 	my @checkSourceUserIncludePaths;
-	push @checkSourceUserIncludePaths, "$ENV{EPOCROOT}epoc32\\include";
+	push @checkSourceUserIncludePaths, "$ENV{EPOCROOT}epoc32/include";
 	push @checkSourceUserIncludePaths, "\.";
 	push @checkSourceUserIncludePaths, $current;
 	my @checkSourceSystemIncludePaths = ();
@@ -391,7 +390,7 @@ sub Mmp_ProcessL ($$$$) {
 	my ($CurSrcPath, $MmpMacro, $Line);
 	$CurSrcPath=$MmpPath;
 
-#	include the .MMP file as a document
+#	include the .mmp file as a document
 	@{$DocHash{$MmpPath}}=(&Path_Split('File', $MMPFILE));
 	$CheckDoc{$MMPFILE}='zero - specified by default';
 
@@ -427,7 +426,7 @@ sub Mmp_ProcessL ($$$$) {
 		my $mainElement = $_;
 		
 		if ($PlatTxtSwitch) {
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$PlatTxtSwitch=0;
 				next LINE;
 			}
@@ -435,7 +434,7 @@ sub Mmp_ProcessL ($$$$) {
 			next LINE;
 		}
 		if ($OtherPlatSwitch) {
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$OtherPlatSwitch=0;
 				next LINE;
 			}
@@ -443,15 +442,15 @@ sub Mmp_ProcessL ($$$$) {
 		}
 		# ----------- handle body of START BITMAP ... END -------------
 		if (%CurBitMap) {
-			if (/^SOURCE$/o) {
+			if (/^SOURCE$/oi) {
 				unless (@$Line>1) {
 					push @MmpDie, "$CurFile($LineNum) : Not enough arguments for Bitmap keyword SOURCE\n";
 				}
 				my $cldepth = shift @$Line;
 				my @ClDepths = split(/,/, $cldepth);
 				foreach (@ClDepths) {
-					$_ = lc $_; # bmconv can't handle upper-case 'C's
-					unless (/^c?\d\d?a?$/o) {
+#					$_ = lc $_; # bmconv can't handle upper-case 'C's
+					unless (/^c?\d\d?a?$/io) {
 						push @MmpDie, "$CurFile($LineNum) : BITMAP color depth \"$_\" - unexpected format\n";
 					}
 				}
@@ -460,8 +459,8 @@ sub Mmp_ProcessL ($$$$) {
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "BITMAP SOURCE", $_, $LineNum, $CheckSource_PhysicalCheck, $CurBitMapSrcPath);
 					$_ = &Path_Norm($_);
 					
-					$_=lc $_;	# bmconv generates a header with case-sensitive enums
 					my $bitmap = "$CurBitMapSrcPath$_";
+					$bitmap=~s/\\/\//g;      # force to forward slash
 					push @{$CurBitMap{Source}}, { # sources must be kept in order
 						Src=>$bitmap,
 						ClDepth=>shift @ClDepths	# take next color depth from the list
@@ -472,29 +471,30 @@ sub Mmp_ProcessL ($$$$) {
 				}
 				next LINE;
 			}
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$CurBitMapSrcPath=$MmpPath;
 				my %BitMap=%CurBitMap;
 				undef %CurBitMap;
 				push @BitMapStruct, \%BitMap;
 				next LINE;
 			}
-			if (/^SOURCEPATH$/o) {
+			if (/^SOURCEPATH$/oi) {
 				unless ($CurBitMapSrcPath=shift @$Line) {
 					push @MmpDie, "$CurFile($LineNum) : No path specified with Bitmap keyword SOURCEPATH\n";
 					next LINE;
 				}
+				$CurBitMapSrcPath=~s/\\/\//g;      # force to forward slash
 				CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "BITMAP SOURCEPATH", $CurBitMapSrcPath, $LineNum, $CheckSource_PhysicalCheck);
 				$CurBitMapSrcPath = &Path_Norm($CurBitMapSrcPath);
 				
-				$CurBitMapSrcPath=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+				$CurBitMapSrcPath=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
 				$CurBitMapSrcPath=&Path_MakeAbs($CurFile,$CurBitMapSrcPath);
 				if (@$Line) {
 					push @MmpWarn, "$CurFile($LineNum) : Too many arguments for Bitmap keyword SOURCEPATH\n";
 				}
 				next LINE;
 			}
-			if (/^HEADER$/o) {
+			if (/^HEADER$/oi) {
 				if ($CurBitMap{Hdr}) {
 					push @MmpWarn, "$CurFile($LineNum) : Bitmap HEADER already specified at line $CurBitMap{Hdr}\n";
 					next LINE;
@@ -507,7 +507,7 @@ sub Mmp_ProcessL ($$$$) {
 			}
 
 
-			if (/^TARGETPATH$/o) {
+			if (/^TARGETPATH$/oi) {
 				if ($CurBitMap{TrgPath}) {
 					push @MmpWarn, "$CurFile($LineNum) : Bitmap TARGETPATH already specified\n";
 					next LINE;
@@ -516,12 +516,13 @@ sub Mmp_ProcessL ($$$$) {
 					push @MmpDie, "$CurFile($LineNum) : No path specified with Bitmap keyword TARGETPATH\n";
 					next LINE;
 				}
+				$CurBitMap{TrgPath}=~s/\\/\//g;              # force to forward slash
 				CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "BITMAP TARGETPATH", $CurBitMap{TrgPath}, $LineNum);
 				$CurBitMap{TrgPath} = &Path_Norm($CurBitMap{TrgPath});
 
-				$CurBitMap{TrgPath}=~s-^\\(.*)$-$1-o;        # remove leading backslash, if any
-				$CurBitMap{TrgPath}=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
-				$CurBitMap{TrgPath}="z\\$CurBitMap{TrgPath}";
+				$CurBitMap{TrgPath}=~s-^\/(.*)$-$1-o;        # remove leading slash, if any
+				$CurBitMap{TrgPath}=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
+				$CurBitMap{TrgPath}="z/$CurBitMap{TrgPath}";
 				if (@$Line) {
 					push @MmpWarn, "$CurFile($LineNum) : Too many arguments for Bitmap keyword TARGETPATH\n";
 				}
@@ -532,7 +533,7 @@ sub Mmp_ProcessL ($$$$) {
 		
 		# ----------- handle body of START RESOURCE ... END -------------
 		if (%CurResource) {
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$CurResource{SrcPath}=$CurSrcPath;
 				my %Resource=%CurResource;
 				undef %CurResource;
@@ -540,7 +541,7 @@ sub Mmp_ProcessL ($$$$) {
 				undef %ResourceCheckLang;
 				next LINE;
 			}
-			if (/^HEADER$/o) {
+			if (/^HEADER$/oi) {
 				if ($CurResource{Hdr}) {
 					push @MmpWarn, "$CurFile($LineNum) : Resource HEADER already specified at line $CurResource{Hdr}\n";
 					next LINE;
@@ -555,7 +556,7 @@ sub Mmp_ProcessL ($$$$) {
 				}
 				next LINE;
 			}
-			if (/^HEADERONLY$/o) {
+			if (/^HEADERONLY$/oi) {
 				if ($CurResource{Hdronly}) {
 					push @MmpWarn, "$CurFile($LineNum) : Resource HEADERONLY already specified at line $CurResource{Hdr}\n";
 					next LINE;
@@ -571,7 +572,7 @@ sub Mmp_ProcessL ($$$$) {
 				next LINE;
 			}
 
-			if (/^LANG$/o) {
+			if (/^LANG$/oi) {
 				if (@$Line) {
 					my $Candidate;
 					foreach $Candidate (@$Line) {
@@ -579,7 +580,7 @@ sub Mmp_ProcessL ($$$$) {
 							push @MmpWarn, "$CurFile($LineNum) : Duplicate Language \"$Candidate\" at line $ResourceCheckLang{$Candidate}\n";
 							next; 
 						}
-						push @{$CurResource{Lang}}, $Candidate;
+						push @{$CurResource{Lang}}, lc $Candidate;
 						$ResourceCheckLang{$Candidate}="$CurFile($LineNum)";
 					}
 					next LINE;
@@ -587,7 +588,7 @@ sub Mmp_ProcessL ($$$$) {
 				push @MmpWarn, "$CurFile($LineNum) : No Languages specified for keyword LANG\n";
 				next LINE;
 			}
-			if (/^TARGET$/o) {
+			if (/^TARGET$/oi) {
 				if ($CurResource{BaseTrg}) {
 					push @MmpWarn, "$CurFile($LineNum) : Resource TARGET already specified\n";
 					next LINE;
@@ -606,7 +607,7 @@ sub Mmp_ProcessL ($$$$) {
 				}
 				next LINE;
 			}
-			if (/^TARGETPATH$/o) {
+			if (/^TARGETPATH$/oi) {
 				if ($CurResource{TrgPath}) {
 					push @MmpWarn, "$CurFile($LineNum) : Resource TARGETPATH already specified\n";
 					next LINE;
@@ -615,18 +616,19 @@ sub Mmp_ProcessL ($$$$) {
 					push @MmpDie, "$CurFile($LineNum) : No path specified with Resource keyword TARGETPATH\n";
 					next LINE;
 				}
+				$CurResource{TrgPath}=~s/\\/\//g;              # force to forward slash
 				CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "RESOURCE TARGETPATH", $CurResource{TrgPath}, $LineNum);
 				$CurResource{TrgPath} = &Path_Norm($CurResource{TrgPath});
 				
-				$CurResource{TrgPath}=~s-^\\(.*)$-$1-o;        # remove leading backslash, if any
-				$CurResource{TrgPath}=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
-				$CurResource{TrgPath}="z\\$CurResource{TrgPath}";
+				$CurResource{TrgPath}=~s-^\/(.*)$-$1-o;        # remove leading slash, if any
+				$CurResource{TrgPath}=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
+				$CurResource{TrgPath}="z/$CurResource{TrgPath}";
 				if (@$Line) {
 					push @MmpWarn, "$CurFile($LineNum) : Too many arguments for Resource keyword TARGETPATH\n";
 				}
 				next LINE;
 			}
-			if (/^UID$/o) {
+			if (/^UID$/oi) {
 				if (@$Line) {
 					if (scalar @$Line>2) {
 						push @MmpWarn, "$CurFile($LineNum) : Can't specify more than 2 Uids\n";
@@ -646,7 +648,7 @@ sub Mmp_ProcessL ($$$$) {
 				push @MmpWarn, "$CurFile($LineNum) : No Uids specified for Resource keyword UID\n";
 				next LINE;
 			}
-			if (/^DEPENDS$/o) {
+			if (/^DEPENDS$/oi) {
 				# Note that DEPENDS lines are tolerated, but ignored - these are only relevant to build systems
 				# other than ABLD
 				next LINE;
@@ -654,7 +656,7 @@ sub Mmp_ProcessL ($$$$) {
 			
 			push @MmpWarn, "$CurFile($LineNum) : Unrecognised Resource Keyword \"$_\"\n";
 		}
-		if (/^WCHARENTRYPOINT$/o) {
+		if (/^WCHARENTRYPOINT$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
@@ -669,13 +671,13 @@ sub Mmp_ProcessL ($$$$) {
 		# ----------- handle body of START STRINGTABLE ... END -------------
 		if(%CurStringTable)
 		{	
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				my %stringtable = %CurStringTable;
 				push @StringTableStruct, \%stringtable;
 				undef %CurStringTable;
 				next LINE;
 			}
-			if (/^EXPORTPATH/o) {
+			if (/^EXPORTPATH/oi) {
 				if (scalar @$Line != 1) {
 					push @MmpDie, "$CurFile($LineNum) : Wrong number of arguments for EXPORTPATH\n";
 				} 
@@ -683,7 +685,8 @@ sub Mmp_ProcessL ($$$$) {
 					push @MmpDie, "$CurFile($LineNum) : Redefinition of EXPORTPATH\n";
 				}
 				else {
-				    my $src=shift @$Line;
+					my $src=shift @$Line;
+					$src=~s/\\/\//g;      # force to forward slash
 					$CurStringTable{ExportPath} = $src;
 
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "STRINGTABLE EXPORTPATH", $CurStringTable{ExportPath}, $LineNum);
@@ -696,7 +699,7 @@ sub Mmp_ProcessL ($$$$) {
 				}
 				next LINE;
 			}
-			if (/^HEADERONLY$/o) {
+			if (/^HEADERONLY$/oi) {
 				if ($CurStringTable{Hdronly}) {
 					push @MmpWarn, "$CurFile($LineNum) : Stringtable HEADERONLY already specified\n";
 					next LINE;
@@ -709,7 +712,7 @@ sub Mmp_ProcessL ($$$$) {
 			}
 		}
 		# ----------- handle top-level MMP file -------------------	
-		if (/^START$/) {
+		if (/^START$/i) {
 			unless ($_=uc shift @$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : No Argument specified for START block\n";
 				next LINE;
@@ -720,11 +723,12 @@ sub Mmp_ProcessL ($$$$) {
 					next LINE;
 				}
 			}
-			if ($_ eq 'BITMAP') {
+			if (uc $_ eq 'BITMAP') {
 				unless ($CurBitMap{Trg}=shift @$Line) {
 					push @MmpWarn, "$CurFile($LineNum) : No Bitmap Target specified\n";
 					$CurBitMap{Trg}='NoTargetSpecified';
 				}
+				$CurBitMap{Trg}=~s/\\/\//g;      # force to forward slash
 				if (@$Line) {
 					push @MmpWarn, "$CurFile($LineNum) : Too many arguments for START BITMAP clause\n";
 				}
@@ -733,12 +737,13 @@ sub Mmp_ProcessL ($$$$) {
 				$CurBitMap{Trg} = &Path_Norm($CurBitMap{Trg});
 				next LINE;
 			}
-			if ($_ eq 'RESOURCE') {
+			if (uc $_ eq 'RESOURCE') {
 				if (scalar @$Line != 1) {
 					push @MmpWarn, "$CurFile($LineNum) : Wrong number of arguments for START RESOURCE clause\n";
 				} 
 				else {
-				    my $src=shift @$Line;
+					my $src=shift @$Line;
+					$src=~s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "START RESOURCE", $src, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
 					$src = &Path_Norm($src);
 				    
@@ -748,16 +753,17 @@ sub Mmp_ProcessL ($$$$) {
 				
 				next LINE;
 			}
-			if ($_ eq 'STRINGTABLE') {
+			if (uc $_ eq 'STRINGTABLE') {
 				if (scalar @$Line != 1) {
 					push @MmpWarn, "$CurFile($LineNum) : Wrong number of arguments for START STRINGTABLE clause\n";
 				} 
 				else {
-				    my $Candidate = shift @$Line;
-				    CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "START STRINGTABLE", $Candidate, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
+					my $Candidate = shift @$Line;
+					$Candidate=~s/\\/\//g;      # force to forward slash
+					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, "START STRINGTABLE", $Candidate, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
 					$Candidate = &Path_Norm($Candidate);
 				    
-					$Candidate =~ s/^\\//;	# remove leading \, if any	
+					$Candidate =~ s/^\///;	# remove leading /, if any	
 					$CurStringTable{BaseTrg}=&Path_Split('Base',$Candidate);
 					my $path=&Path_Split('Path',$Candidate);
 					if($path){
@@ -775,15 +781,18 @@ sub Mmp_ProcessL ($$$$) {
 			next LINE;
 		}
 
-		if (/^AIF$/o) {
+		if (/^AIF$/oi) {
 			my ($trg, $dir, $file, $clDepth, @bitmaps)=@$Line;
 			unless ($file) { # bitmaps aren't essential
 				push @MmpDie, "$CurFile($LineNum) : Not enough arguments for keyword AIF\n";
 				next LINE;
 			}
 			my %Data;
+			$trg=~s/\\/\//g;	# force to forward slash
 			$Data{Trg} = $trg;	# Defect: may include directory
-			$dir=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+			$dir=~s/\\/\//g;	# force to forward slash
+			$file=~s/\\/\//g;	# force to forward slash
+			$dir=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
 			$Data{Source}=&Path_MakeAbs($CurFile, "$dir$file");
 			unless (-e "$Data{Source}") {
 				push @MmpWarn, "$CurFile($LineNum) : AIF source \"$Data{Source}\" not found\n";
@@ -805,7 +814,8 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			@ClDepths = (@ClDepths) x @bitmaps;	# make a sufficiently long list of color depths
 			foreach $file (@bitmaps) {
-				if ($file !~ /^\\/) {
+				$file=~s/\\/\//g;      # force to forward slash
+				if ($file !~ /^\//) {
 					$file = &Path_MakeAbs($CurFile, "$dir$file");
 				}
 				push @{$Data{BitMaps}}, { # sources must be kept in order
@@ -818,21 +828,21 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE;
 		}
-		if (/^ASSPABI$/o) {
+		if (/^ASSPABI$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$ASSPABISwitch=1;
 			next LINE;
 		}
-		if (/^ASSPEXPORTS$/o) {
+		if (/^ASSPEXPORTS$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$ASSPExports=1;
 			next LINE;
 		}
-		if (/^ASSPLIBRARY$/o) {
+		if (/^ASSPLIBRARY$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
@@ -855,7 +865,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Libraries specified for keyword ASSPLIBRARY\n";
 			next LINE;
 		}
-		if (/^CAPABILITY$/o) {
+		if (/^CAPABILITY$/oi) {
 			if (defined($Capability)) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine CAPABILITY\n";
 				next LINE;
@@ -906,7 +916,7 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE;
 		}
-		if (/^DEBUGLIBRARY$/o) {
+		if (/^DEBUGLIBRARY$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
@@ -929,7 +939,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Libraries specified for keyword DEBUGLIBRARY\n";
 			next LINE;
 		}
-		if (/^DEFFILE$/o)  {
+		if (/^DEFFILE$/oi)  {
 			if ($CheckDef) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine DEFFILE\n";
 				next LINE;
@@ -939,6 +949,7 @@ sub Mmp_ProcessL ($$$$) {
 				push @MmpWarn, "$CurFile($LineNum) : No file specified for keyword DEFFILE\n";
 				next LINE;
 			}
+			$_=~s/\\/\//g;      # force to forward slash
 
 			$Def{CheckSource_MMPEntry} = $_;		
 			$Def{CheckSource_LineNumber} = $LineNum;
@@ -959,10 +970,11 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE;
 		}
-		if (/^DOCUMENT$/o) {
+		if (/^DOCUMENT$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+					$Candidate=~s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $Candidate, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
 					$Candidate = &Path_Norm($Candidate);
 					
@@ -982,28 +994,28 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Files specified for keyword DOCUMENT\n";
 			next LINE;
 		}
-		if (/^EPOCALLOWDLLDATA$/o) {
+		if (/^EPOCALLOWDLLDATA$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$AllowDllData=1;
 			next LINE;
 		}
-		if (/^ALWAYS_BUILD_AS_ARM$/o) {
+		if (/^ALWAYS_BUILD_AS_ARM$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$BuildAsARM=1;
 			next LINE;
 		}
-		if (/^EPOCCALLDLLENTRYPOINTS$/o) {
+		if (/^EPOCCALLDLLENTRYPOINTS$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$CallDllEntryPoints=1;
 			next LINE;
 		}
-		if (/^EPOCDATALINKADDRESS$/o) {
+		if (/^EPOCDATALINKADDRESS$/oi) {
 			if (@$Line) { 
 				my $temp=&main::Genutl_AnyToHex(shift @$Line);
 				if (defined $temp) {
@@ -1015,14 +1027,14 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No data link address specified for keyword $_\n";
 			next LINE;
 		}
-		if (/^EPOCFIXEDPROCESS$/o) {
+		if (/^EPOCFIXEDPROCESS$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$FixedProcess=1;
 			next LINE;
 		}
-		if (/^EPOCHEAPSIZE$/o) {
+		if (/^EPOCHEAPSIZE$/oi) {
 			if (@$Line) {
 				my $tempMin=&main::Genutl_AnyToHex(shift @$Line);
 				if (defined $tempMin) {
@@ -1045,7 +1057,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No minimum heap size specified for keyword $_\n";
 			next LINE;
 		}
-		if (/^EPOCPROCESSPRIORITY$/o) {
+		if (/^EPOCPROCESSPRIORITY$/oi) {
 			if ($ProcessPriority) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine EPOCPROCESSPRIORITY\n";
 				next LINE;
@@ -1061,7 +1073,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Priority specified for keyword EPOCPROCESSPRIORITY\n";
 			next LINE;
 		}
-		if (/^EPOCSTACKSIZE$/o) {
+		if (/^EPOCSTACKSIZE$/oi) {
 			if (@$Line) {
 				my $temp=&main::Genutl_AnyToHex(shift @$Line);
 				if (defined $temp) {
@@ -1074,7 +1086,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No stack size specified for keyword STACKSIZE\n";
 			next LINE;
 		}
-		if (/^COMPRESSTARGET$/o) {
+		if (/^COMPRESSTARGET$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
@@ -1082,7 +1094,7 @@ sub Mmp_ProcessL ($$$$) {
             $CompressTargetMethod=NOCOMPRESSIONMETHOD; # means 'use default'
 			next LINE;
 		}
-		if (/^NOCOMPRESSTARGET$/o) {
+		if (/^NOCOMPRESSTARGET$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
@@ -1090,7 +1102,7 @@ sub Mmp_ProcessL ($$$$) {
             $CompressTargetMethod=NOCOMPRESSIONMETHOD;
 			next LINE;
 		}
-        if (/^INFLATECOMPRESSTARGET$/o) {
+		if (/^INFLATECOMPRESSTARGET$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
@@ -1098,7 +1110,7 @@ sub Mmp_ProcessL ($$$$) {
 			$CompressTargetMethod=INFLATECOMPRESSIONMETHOD;
 			next LINE;
 		}
-		if (/^BYTEPAIRCOMPRESSTARGET$/o) {
+		if (/^BYTEPAIRCOMPRESSTARGET$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
@@ -1106,14 +1118,14 @@ sub Mmp_ProcessL ($$$$) {
 			$CompressTargetMethod=BYTEPAIRCOMPRESSIONMETHOD;
 			next LINE;
 		}
-		if (/^EXPORTUNFROZEN$/o) {
+		if (/^EXPORTUNFROZEN$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$ExportUnfrozen=1;
 			next LINE;
 		}
-		if (/^FIRSTLIB$/o) {
+		if (/^FIRSTLIB$/oi) {
 			if ($FirstLib) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine FIRSTLIB\n";
 				next LINE;
@@ -1127,7 +1139,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : Nothing specified for keyword FIRSTLIB\n";
 			next LINE;
 		}
-		if (/^LANG$/o) {
+		if (/^LANG$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
@@ -1135,7 +1147,7 @@ sub Mmp_ProcessL ($$$$) {
 						push @MmpWarn, "$CurFile($LineNum) : Duplicate Language \"$Candidate\" at line $CheckLang{$Candidate}\n";
 						next; 
 					}
-					push @LangList, $Candidate;
+					push @LangList, lc $Candidate;
 					$CheckLang{$Candidate}="$CurFile($LineNum)";
 				}
 				next LINE;
@@ -1143,7 +1155,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Languages specified for keyword LANG\n";
 			next LINE;
 		}
-		if (/^LIBRARY$/o) {
+		if (/^LIBRARY$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
@@ -1167,7 +1179,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Libraries specified for keyword LIBRARY\n";
 			next LINE;
 		}
-		if (/^LINKAS$/o) {
+		if (/^LINKAS$/oi) {
 			if ($LinkAs) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine LINKAS\n";
 				next LINE;
@@ -1178,7 +1190,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No name specified for keyword LINKAS\n";
 			next LINE;
 		}
-		if (/^EXPORTLIBRARY$/o) {
+		if (/^EXPORTLIBRARY$/oi) {
 			if ($NoExportLibrary) {
 				push @MmpDie, "$CurFile($LineNum) : Can't specify both EXPORTLIBRARY and NOEXPORTLIBRARY\n";
 				next LINE;
@@ -1196,7 +1208,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No name specified for keyword EXPORTLIBRARY\n";
 			next LINE;
 		}
-		if (/^NOEXPORTLIBRARY$/o) {
+		if (/^NOEXPORTLIBRARY$/oi) {
 			if ($ExportLibrary) {
 				push @MmpDie, "$CurFile($LineNum) : Can't specify both EXPORTLIBRARY and NOEXPORTLIBRARY\n";
 				next LINE;
@@ -1217,13 +1229,13 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No library specified for keyword NEWLIB\n";
 			next LINE;
 		}
-		if (/^MACRO$/o) {
+		if (/^MACRO$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
 					if ($CheckMacro{$Candidate}) {
 						push @MmpWarn, "$CurFile($LineNum) : Duplicate Macro \"$Candidate\" at line $CheckMacro{$Candidate}\n";
-						next; 
+						next;
 					}
 					push @Macros, $Candidate;
 					$CheckMacro{$Candidate}="$CurFile($LineNum)";
@@ -1232,7 +1244,7 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE; 
 		}
-		if (/^NOSTRICTDEF$/o) {
+		if (/^NOSTRICTDEF$/oi) {
 			if ($NoStrictDef) {
 				push @MmpWarn, "$CurFile($LineNum) : NOSTRICTDEF already set\n";
 				next LINE;
@@ -1243,7 +1255,7 @@ sub Mmp_ProcessL ($$$$) {
 			$NoStrictDef=1;
 			next LINE;
 		}
-		if (/^RAMTARGET$/o) {
+		if (/^RAMTARGET$/oi) {
 			if ($CheckRamTargets) {
 				push @MmpWarn, "$CurFile($LineNum) : RAM targets already specified at line $CheckRamTargets\n";
 				next LINE;
@@ -1267,10 +1279,11 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE;
 		}
-		if (/^RESOURCE$/o) {
+		if (/^RESOURCE$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {			
+					$Candidate=~s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $Candidate, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
 					$Candidate = &Path_Norm($Candidate);
 					
@@ -1298,7 +1311,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Resources specified for keyword RESOURCE\n";
 			next LINE; 
 		}
-		if (/^ROMTARGET$/o) {
+		if (/^ROMTARGET$/oi) {
 			if ($CheckRomTargets) {
 				push @MmpWarn, "$CurFile($LineNum) : ROM targets already specified at line $CheckRomTargets\n";
 				next LINE;
@@ -1323,21 +1336,22 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE;
 		}
-		if (/^SMPSAFE$/o) {
+		if (/^SMPSAFE$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$SmpSafe = 1;
 			next LINE;
 		}
-		if (/^SOURCE$/o) {
+		if (/^SOURCE$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+					$Candidate =~ s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $Candidate, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
 					$Candidate = &Path_Norm($Candidate);
 					
-					$Candidate =~ s/^\\//;	# remove leading \, if any	
+					$Candidate =~ s/^\///;	# remove leading /, if any	
 					$CurSource{BaseTrg}=&Path_Split('Base',$Candidate);
 					my $path=&Path_Split('Path',$Candidate);
 					if($path){
@@ -1358,12 +1372,13 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Sources specified for keyword SOURCE\n";
 			next LINE; 
 		}
-		if (/^SOURCEPATH$/o) {
+		if (/^SOURCEPATH$/oi) {
 			if ($CurSrcPath=shift @$Line) {
+				$CurSrcPath=~s/\\/\//g;      # force to forward slash
 				CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $CurSrcPath, $LineNum, $CheckSource_PhysicalCheck);				
 				$CurSrcPath = &Path_Norm($CurSrcPath);
 				
-				$CurSrcPath=~s-^(.*[^\\])$-$1\\-o;	# in case no terminating backslash
+				$CurSrcPath=~s-^(.*[^\/])$-$1\/-o;	# in case no terminating slash
 				$CurSrcPath=&Path_MakeEAbs($EPOCPath,$CurFile,$CurSrcPath);
 				if (-d &Path_Chop($CurSrcPath)) {
 					next LINE;
@@ -1374,7 +1389,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpDie, "$CurFile($LineNum) : No Source Path specified for keyword SOURCEPATH\n";
 			next LINE;
 		}
-		if (/^STATICLIBRARY$/o) {
+		if (/^STATICLIBRARY$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
@@ -1394,21 +1409,21 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Libraries specified for keyword STATICLIBRARY\n";
 			next LINE;
 		}
-		if (/^STDCPP$/o) {
+		if (/^STDCPP$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$StdCpp=1;
 			next LINE;
 		}
-  		if (/^NOSTDCPP$/o) {
+  		if (/^NOSTDCPP$/oi) {
   			if (@$Line) {
   				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
   			}
   			$NoStdCpp=1;
   			next LINE;
   		}
-		if (/^STRICTDEPEND$/o) {
+		if (/^STRICTDEPEND$/oi) {
 			if ($MmpFlag{StrictDepend}) {
 				push @MmpWarn, "$CurFile($LineNum) : STRICTDEPEND already set\n";
 				next LINE;
@@ -1419,14 +1434,15 @@ sub Mmp_ProcessL ($$$$) {
 			$MmpFlag{StrictDepend}=1;
 			next LINE;
 		}
-		if (/^SYSTEMINCLUDE$/o){
+		if (/^SYSTEMINCLUDE$/oi){
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+					$Candidate=~s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $Candidate, $LineNum, $CheckSource_PhysicalCheck);
 					$Candidate = &Path_Norm($Candidate);
 					
-					$Candidate=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+					$Candidate=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
 					$Candidate=&Path_MakeEAbs($EPOCPath,$CurFile,$Candidate);
 					if ($CheckSysInc{$Candidate}) {
 						next; 
@@ -1443,10 +1459,11 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Paths specified for keyword SYSTEMINCLUDE\n";
 			next LINE;
 		}
-		if (/^SYSTEMRESOURCE$/o) {
+		if (/^SYSTEMRESOURCE$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+					$Candidate=~s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $Candidate, $LineNum, $CheckSource_PhysicalCheck, $CurSrcPath);
 					$Candidate = &Path_Norm($Candidate);
 					
@@ -1462,7 +1479,7 @@ sub Mmp_ProcessL ($$$$) {
 					$CurResource{BaseTrg}=&Path_Split('Base',$Candidate);
 					$CurResource{Source}=$source;
 					$CurResource{Hdr}="$CurFile($LineNum)";
-					$CurResource{TrgPath}="z\\system\\data\\";	# needs to match e32env.pm
+					$CurResource{TrgPath}="z/system/data/";	# needs to match e32env.pm
 					my %Resource=%CurResource;
 					undef %CurResource;
 					push @ResourceStruct, \%Resource;
@@ -1475,7 +1492,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Resources specified for keyword SYSTEMRESOURCE\n";
 			next LINE; 
 		}
-		if (/^TARGET$/o) {
+		if (/^TARGET$/oi) {
 			if ($Trg) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine TARGET\n";
 				next LINE;
@@ -1488,7 +1505,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Target specified for keyword TARGET\n";
 			next LINE;
 		}
-		if (/^TARGETPATH$/o) {
+		if (/^TARGETPATH$/oi) {
 			if ($TrgPath) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine TARGETPATH\n";
 				next LINE;
@@ -1497,19 +1514,20 @@ sub Mmp_ProcessL ($$$$) {
 				push @MmpWarn, "$CurFile($LineNum) : No Path specified for keyword TARGETPATH\n";
 				next LINE;
 			}
+			$TrgPath=~s/\\/\//g;              # force to forward slash
 
 			CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $TrgPath, $LineNum);
 			$TrgPath = &Path_Norm($TrgPath);
 			
-			$TrgPath=~s-^\\(.*)$-$1-o;
-			$TrgPath=~s-^(.*[^\\])$-$1\\-o;
-			$TrgPath="z\\$TrgPath";
+			$TrgPath=~s-^\/(.*)$-$1-o;
+			$TrgPath=~s-^(.*[^\/])$-$1\/-o;
+			$TrgPath="z/$TrgPath";
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Too many arguments for keyword TARGETPATH\n";
 			}
 			next LINE;
 		}
-		if (/^TARGETTYPE$/o) {
+		if (/^TARGETTYPE$/oi) {
 			if ($TrgType) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine TARGETTYPE\n";
 				next LINE;
@@ -1524,7 +1542,7 @@ sub Mmp_ProcessL ($$$$) {
 			}
 			next LINE;
 		}
-		if (/^UID$/o) {
+		if (/^UID$/oi) {
 			if (@$Line) {
 				foreach (@$Line) {
 					if ($#UidList>=1) {
@@ -1544,7 +1562,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Uids specified for keyword UID\n";
 			next LINE;
 		}
-		if (/^SECUREID$/o) {
+		if (/^SECUREID$/oi) {
 			if ($SecureId) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine SECUREID\n";
 				next LINE;
@@ -1563,7 +1581,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : Missing argument for keyword SECUREID\n";
 			next LINE;
 		}
-		if (/^VENDORID$/o) {
+		if (/^VENDORID$/oi) {
 			if (defined($VendorId)) {
 				push @MmpWarn, "$CurFile($LineNum) : Attempt to redefine VENDORID\n";
 				next LINE;
@@ -1582,14 +1600,15 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : Missing argument for keyword VENDORID\n";
 			next LINE;
 		}
-		if (/^USERINCLUDE$/o) {
+		if (/^USERINCLUDE$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+					$Candidate=~s/\\/\//g;      # force to forward slash
 					CheckSource_MetaData(%CheckSourceMMPMetaData, $CurFile, $mainElement, $Candidate, $LineNum, $CheckSource_PhysicalCheck);
 					$Candidate = &Path_Norm($Candidate);
 					
-					$Candidate=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+					$Candidate=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
 					$Candidate=&Path_MakeEAbs($EPOCPath,$CurFile,$Candidate);
 					if ($CheckUserInc{$Candidate}) {
 						next; 
@@ -1606,14 +1625,14 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : No Paths specified for keyword USERINCLUDE\n";
 			next LINE;
 		}
-		if (/^SRCDBG$/o) {
+		if (/^SRCDBG$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$SrcDbg=1;
 			next LINE;
 		}
-		if (/^VERSION$/o) {
+		if (/^VERSION$/oi) {
 			if (%Version) {
 				push @MmpDie, "$CurFile($LineNum) : Attempt to redefine VERSION\n";
 				next LINE;
@@ -1703,7 +1722,7 @@ sub Mmp_ProcessL ($$$$) {
 			push @MmpWarn, "$CurFile($LineNum) : ARMFPU must specify either SOFTVFP or VFPV2 as an argument\n";
 			next LINE;
 		}
-		if( /^PAGED$/o) {
+		if( /^PAGED$/oi) {
 			#revert "PAGED" keyword from code and data paged to code paged only
 			#if ($CodePagingTargetMode == PAGED or $DataPagingTargetMode == PAGED) {
 			if ($CodePagingTargetMode == PAGED) {
@@ -1719,7 +1738,7 @@ sub Mmp_ProcessL ($$$$) {
 			#$DataPagingTargetMode = PAGED;
 			next LINE;
 			}
-		if( /^UNPAGED$/o) {
+		if( /^UNPAGED$/oi) {
 			if ($CodePagingTargetMode == UNPAGED or $DataPagingTargetMode == UNPAGED) {
 				push @MmpWarn, "$CurFile($LineNum) : duplicate paging setting\n";
 			}
@@ -1730,7 +1749,7 @@ sub Mmp_ProcessL ($$$$) {
 			$DataPagingTargetMode = UNPAGED;
 			next LINE;
 			}
-		if( /^PAGEDCODE$/o) {
+		if( /^PAGEDCODE$/oi) {
 			if ($CodePagingTargetMode == PAGED) {
 				push @MmpWarn, "$CurFile($LineNum) : duplicate paging setting\n";
 			}
@@ -1740,7 +1759,7 @@ sub Mmp_ProcessL ($$$$) {
 			$CodePagingTargetMode = PAGED;
 			next LINE;
 			}
-		if( /^UNPAGEDCODE$/o) {
+		if( /^UNPAGEDCODE$/oi) {
 			if ($CodePagingTargetMode == UNPAGED) {
 				push @MmpWarn, "$CurFile($LineNum) : duplicate paging setting\n";
 			}
@@ -1750,7 +1769,7 @@ sub Mmp_ProcessL ($$$$) {
 			$CodePagingTargetMode = UNPAGED;
 			next LINE;
 			}
-		if( /^PAGEDDATA$/o) {
+		if( /^PAGEDDATA$/oi) {
 			if ($DataPagingTargetMode == PAGED) {
 				push @MmpWarn, "$CurFile($LineNum) : duplicate paging setting\n";
 			}
@@ -1760,7 +1779,7 @@ sub Mmp_ProcessL ($$$$) {
 			$DataPagingTargetMode = PAGED;
 			next LINE;
 			}
-		if( /^UNPAGEDDATA$/o) {
+		if( /^UNPAGEDDATA$/oi) {
 			if ($DataPagingTargetMode == UNPAGED) {
 				push @MmpWarn, "$CurFile($LineNum) : duplicate paging setting\n";
 			}
@@ -1770,18 +1789,18 @@ sub Mmp_ProcessL ($$$$) {
 			$DataPagingTargetMode = UNPAGED;
 			next LINE;
 			}
-		if( /^DEBUGGABLE_UDEBONLY$/o) {
+		if( /^DEBUGGABLE_UDEBONLY$/oi) {
 			$IsDebuggable = DEBUGGABLE_UDEBONLY;
 			next LINE;
 			}
-		if( /^DEBUGGABLE$/o) {
+		if( /^DEBUGGABLE$/oi) {
 			if ($IsDebuggable != DEBUGGABLE_UDEBONLY)
 			{
 				$IsDebuggable = DEBUGGABLE;
 			}
 			next LINE;
 			}
-		if( /^FEATUREVARIANT$/o) {
+		if( /^FEATUREVARIANT$/oi) {
 			push @MmpDie, "$CurFile($LineNum) : FEATUREVARIANT specified multiple times" if ($FeatureVariant);
 			$FeatureVariant = 1;
 			next LINE;
@@ -1900,7 +1919,7 @@ sub Mmp_ProcessL ($$$$) {
 	}
 
 	# check for languages
-	@LangList=('SC') unless @LangList;
+	@LangList=('sc') unless @LangList;
 
   if (&main::EPOCSecurePlatform() && !defined($Capability) &&
     (($TrgType{Basic} eq "DLL") || (uc($TrgType) eq "EXEXP")))
@@ -2090,7 +2109,7 @@ sub Mmp_ProcessL ($$$$) {
 #	Get the EPOC entrypoint static library
 	unless ($FirstLib) {
 		unless ($TrgType{FirstLib}) {
-			$FirstLib="E$TrgType{Basic}.LIB";
+			$FirstLib= lc "E$TrgType{Basic}.lib";
 		}
 		else {
 			$FirstLib=$TrgType{FirstLib};
@@ -2137,7 +2156,7 @@ sub Mmp_ProcessL ($$$$) {
 	# apply the default .DEF filename, and
 	# check as far as possible that the project is frozen
 	if (($TrgType{NeedDeffile} or $CheckDef)) {
-		unless ($Def{Path} and $Def{Path} !~ /\\\~\\$/) {
+		unless ($Def{Path} and $Def{Path} !~ /\/\~\/$/) {
 			my $augment;
 			if ($ASSPExports) {
 			    if ($$Plat_ref{DefFile} =~ /^\s*EABI\s*/i ) {
@@ -2152,10 +2171,11 @@ sub Mmp_ProcessL ($$$$) {
 					$augment = lc("B$$Plat_ref{DefFile}");
 			    }
 			}
-			if ($Def{Path} =~ /\\\~\\$/) {
-				$Def{Path} =~ s/\\\~\\$/\\$augment\\/;
+			$augment = lc $augment;
+			if ($Def{Path} =~ /\/\~\/$/) {
+				$Def{Path} =~ s/\/\~\/$/\/$augment\//;
 			} else {
-				$Def{Path}=&Path_Strip(&Path_Split('Path',$MMPFILE)."..\\$augment\\");
+				$Def{Path}=&Path_Strip(&Path_Split('Path',$MMPFILE)."../$augment/");
 			}
 		}
 		unless ($Def{Base}) {
diff --git a/modload.pm b/modload.pm
index 68b592f..0149125 100644
--- a/modload.pm
+++ b/modload.pm
@@ -16,7 +16,7 @@
 #
 
 
-package Modload;
+package modload;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -28,7 +28,7 @@ require Exporter;
 );
 
 
-use Pathutl;
+use pathutl;
 
 my %Mode=(
 	Verbose=>0
@@ -49,14 +49,14 @@ sub Load_ModuleL (@) {
 	my @ModBaseList=@_;
 	my $ModBase;
 	foreach $ModBase (@ModBaseList) {
-		$ModBase=uc $ModBase;
-		die "ERROR: Can't load \"$ModulePath$ModBase.PM\"\n" unless -e "$ModulePath$ModBase.PM";
+		$ModBase=lc $ModBase;
+		die "ERROR: Can't load \"$ModulePath$ModBase.pm\"\n" unless -e "$ModulePath$ModBase.pm";
 		if ($Mode{Verbose}) {
-			print "Loading Module: \"",$ModBase,".PM\"\n";
+			print "Loading Module: \"",$ModBase,".pm\"\n";
 		}
 		package main;
-		require $ModBase.".PM" or die "ERROR: Can't load function from \"$ModulePath$ModBase.PM\"\n";
-		my $Package=ucfirst lc $ModBase;
+		require $ModBase.".pm" or die "ERROR: Can't load function from \"$ModulePath$ModBase.pm\"\n";
+		my $Package=$ModBase;
 		$Package->import;
 	}
 }
diff --git a/output.pm b/output.pm
index 658c67d..f9eb1c6 100644
--- a/output.pm
+++ b/output.pm
@@ -15,7 +15,7 @@
 # 
 #
 
-package Output;
+package output;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
@@ -23,7 +23,6 @@ require Exporter;
 	OutText
 );
 
-
 my $Len=80;
 my $PreWrap="\\";
 my $PreWrapLen=length($PreWrap);
@@ -94,9 +93,8 @@ sub OutWrite () {
 
 sub Output (@) {
 	OutWrite if $Buf;	# output the formatted text before doing any more output
-	my $Item;
-	foreach $Item (@_) {
-		$Text.=$Item;
+	foreach (@_) {
+	  $Text .= $_ if $_;
 	}
 }
 
diff --git a/pathutl.pm b/pathutl.pm
index 1b187d8..03c27f8 100644
--- a/pathutl.pm
+++ b/pathutl.pm
@@ -17,7 +17,7 @@
 # 
 #
 
-package Pathutl;
+package pathutl;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -69,12 +69,12 @@ sub helper_MakeRlt ($@) {
 		}
 		$p="";
 		while ($upcount-->0) {
-			$p .= "..\\";
+			$p .= "..\/";
 		}
 		foreach (@plist) {
-			$p .= "$_\\";
+			$p .= "$_\/";
 		}
-		$p=".\\" if ($p eq "");		# ensure a well-formed result if path == work
+		$p=".\/" if ($p eq "");		# ensure a well-formed result if path == work
 		$p .= $filename;
 	}
 	return wantarray ? @List : $List[0];	
@@ -90,7 +90,7 @@ sub Path_RltToWork (@) {
 sub Path_MakeRltToBase ($@) {	#args: $_[0] Base $_[1]... list of (Abs FilePath/Path)
 # make a path, or list of paths, relative to a particular directory specified by the first
 # path passed into the function
-	return undef unless $_[0]=~m-(|\\$)-o;	# allow for null value passed in
+	return undef unless $_[0]=~m-(|\/$)-o;	# allow for null value passed in
 	my ($Base,@List)=@_;
 	my @BasePathList=&Path_Dirs($Base);
 	@List=&helper_MakeRlt(\@BasePathList,@List);
@@ -129,25 +129,25 @@ sub Path_Split ($$) {	#args: $_[0] 'Path' or 'Base' or 'Ext' $_[1] Abs/Rel FileP
 	
 	$Sect= ucfirst lc $Sect;
 	if ($Sect eq 'Path') {
-		if ($P=~/^(.*\\)/o) {
+		if ($P=~/^(.*\/)/o) {
 			return $1;
 		}
 		return '';
 	}
 	if ($Sect eq 'Base') {
-		if ($P=~/\\?([^\\]*?)(\.[^\\\.]*)?$/o) {
+		if ($P=~/\/?([^\/]*?)(\.[^\/\.]*)?$/o) {
 			return $1;
 		}
 		return '';
 	}
 	if ($Sect eq 'Ext') {
-		if ($P=~/(\.[^\\\.]*)$/o) {
+		if ($P=~/(\.[^\/\.]*)$/o) {
 			return $1;
 		}
 		return '';
 	}
 	if ($Sect eq 'File') {
-		if ($P=~/([^\\]*)$/o) {
+		if ($P=~/([^\/]*)$/o) {
 			return $1;
 		}
 		return '';
@@ -157,25 +157,25 @@ sub Path_Split ($$) {	#args: $_[0] 'Path' or 'Base' or 'Ext' $_[1] Abs/Rel FileP
 
 sub Path_Dirs ($) {	#args: $_[0] Abs FilePath/Path
 # return an ordered list of individual directories that make up a path
-	return undef unless $_[0]=~m-^\\-o;
+	return undef unless $_[0]=~m-^\/-o;
 	my $P=&Path_Split('Path',$_[0]);
-	return undef unless $P=~s-^(.*)\\$-$1-o;
-	$P=~s-^\\(.*)-$1-o;
-	split /\\/,$P;
+	return undef unless $P=~s-^(.*)\/$-$1-o;
+	$P=~s-^\/(.*)-$1-o;
+	split /\//,$P;
 }
 
 sub Path_StepDirs ($) { #args: $_[0] Abs FilePath/Path
 # return an ordered list of paths - starting with the directory in the root directory from the
 # path passed into the function, each subsequent path contains the next directory from the path
 # passed into the function, and the last path is the same as the path passed into the function
-	return undef unless $_[0]=~m-^\\-o;
+	return undef unless $_[0]=~m-^\/-o;
 	my $P=$_[0];
 	my @Dirs=&Path_Dirs($P);
 	my @StepDirs;
 	my $dir;
-	my $stepDir="\\";
+	my $stepDir="\/";
 	foreach $dir (@Dirs) {
-		$stepDir.="$dir\\";
+		$stepDir.="$dir\/";
 		push @StepDirs, $stepDir;
 	}
 	@StepDirs;
@@ -183,10 +183,10 @@ sub Path_StepDirs ($) { #args: $_[0] Abs FilePath/Path
 
 sub Path_Strip ($) {	#args: $_[0] Abs FilePath/Path
 # Remove excess occurrences of '..' and '.' from a path
-	return undef unless $_[0]=~m-^\\-o;
+	return undef unless $_[0]=~m-^\/-o;
 	my $P=$_[0];
-	while ($P=~s-\\\.\\-\\-go) { }
-	while ($P=~s-\\(?!\.{2}\\)[^\\]*\\\.{2}(?=\\)--go) { }
+	while ($P=~s-\/\.\/-\/-go) { }
+	while ($P=~s-\/(?!\.{2}\/)[^\/]*\/\.{2}(?=\/)--go) { }
 	$P;
 }
 
@@ -195,10 +195,10 @@ sub Path_MakePathL (@) {	#args: @_ list of Abs FilePath/Path
 	my @Paths=@_;
 	my $P;
 	foreach $P (@Paths) { 
-		return undef unless $P=~m-^\\-o;
+		return undef unless $P=~m-^\/-o;
 		$P=&Path_Split('Path',$P);
 		$P=&Path_Strip($P);
-		$P=~m-(.*)\\-o;
+		$P=~m-(.*)\/-o;
 		if (-d $1) {
 			if ($Mode{'Verbose'}) {
 				print "Existing Path: \"$P\"\n";
@@ -216,26 +216,26 @@ sub Path_MakePathL (@) {	#args: @_ list of Abs FilePath/Path
 sub Path_UpToRoot ($) {	#args: $_[0] Abs FilePath/Path
 # return the path that will lead from the directory the path passed into the function
 # specifies back up to the root directory
-	return undef unless $_[0]=~m-^\\-o;
+	return undef unless $_[0]=~m-^\/-o;
 	my $Path=$_[0];
 	my $UpP;
-	while ($Path=~m-\\-go) {
-		$UpP.="..\\";
+	while ($Path=~m-\/-go) {
+		$UpP.="..\/";
 	}
 	undef $Path;
-	$UpP=~s-^(.*)\.\.\\-$1-o;
-	$UpP=".\\" unless $UpP;
+	$UpP=~s-^(.*)\.\.\/-$1-o;
+	$UpP=".\/" unless $UpP;
 }
 
 sub Path_MakeRlt ($@) {	#args: $_[0] Start UpPath $_[1]... list of (Abs FilePath/Path)
 # make a path, or list of paths, relative to a particular directory specified by the first
 # path passed into the function which leads upwards from a particular directory
-	return undef unless $_[0]=~m-(|\\$)-o;	# allow for null value passed in
+	return undef unless $_[0]=~m-(|\/$)-o;	# allow for null value passed in
 	my ($UpPath,@List)=@_;
 	my $p;
 	foreach $p (@List) {
-		return undef unless $p=~m-^\\-o;
-		$p=~s-^\\(.*)$-$1-o;
+		return undef unless $p=~m-^\/-o;
+		$p=~s-^\/(.*)$-$1-o;
 		$p=$UpPath.$p;
 	}
 	return wantarray ? @List : $List[0];	
@@ -245,7 +245,7 @@ sub Path_MakeAbs ($@) {	#args: $_[0] Start Abs FilePath/Path $_[1]... list of (A
 # make a path, or list of paths, absolute given the directory specified by the first path
 # passed into the function which the other paths passed into the function are assumed to be
 # relative to
-	return undef unless $_[0]=~m-^\\-o;
+	return undef unless $_[0]=~m-^\/-o;
 	my ($Path,@List)=@_;
 	my $BasePath=&Path_Split("Path",$Path);
 	undef $Path;
@@ -255,15 +255,15 @@ sub Path_MakeAbs ($@) {	#args: $_[0] Start Abs FilePath/Path $_[1]... list of (A
 			$p=&Path_Strip($BasePath.$p);
 			next;
 		}
-		if ($p=~m-^[^\.\\]-o) {
+		if ($p=~m-^[^\.\/]-o) {
 			$p=&Path_Strip($BasePath.$p);
 			next;
 		}
-		if ($p=~m-^\\-o) {
+		if ($p=~m-^\/-o) {
 			$p=&Path_Strip($p);
 			next;
 		}
-		if ($p=~m-^\.\\(.*)$-o) {
+		if ($p=~m-^\.\/(.*)$-o) {
 			$p=&Path_Strip($BasePath.$1);
 			next;
 		}
@@ -273,18 +273,18 @@ sub Path_MakeAbs ($@) {	#args: $_[0] Start Abs FilePath/Path $_[1]... list of (A
 }
 
 sub Path_MakeEAbs ($@) {	#args: $_[0] Start EPOCPath Abs FilePath/Path $_[1]... list of (Abs/Rel FilePath/Path)
-# Variant of MakAbs which also maps "+\\" to "${EPOCPath}"
-	return undef unless $_[0]=~m-^\\-o;
+# Variant of MakAbs which also maps "+\/" to "${EPOCPath}"
+	return undef unless $_[0]=~m-^\/-o;
 	my ($EPOCPath,$Path,@List)=@_;
 	my $BasePath=&Path_Split("Path",$Path);
 	undef $Path;
 	my $p;
 	foreach $p (@List) {
-		if ($p=~m-^\\epoc32\\(.*)$-io) {	# change - special case for existing \\epoc32 references
+		if ($p=~m-^\/epoc32\/(.*)$-io) {	# change - special case for existing \\epoc32 references
 			$p=$EPOCPath.$1;
 			next;
 		}
-		if ($p=~m-^\s*\+\\(.*)$-o) {
+		if ($p=~m-^\s*\+\/(.*)$-o) {
 			$p=$EPOCPath.$1;
 			next;
 		}
@@ -292,14 +292,14 @@ sub Path_MakeEAbs ($@) {	#args: $_[0] Start EPOCPath Abs FilePath/Path $_[1]...
 			$p=&Path_Strip($BasePath.$p);
 			next;
 		}
-		if ($p=~m-^[^\.\\]-o) {
+		if ($p=~m-^[^\.\/]-o) {
 			$p=$BasePath.$p;
 			next;
 		}
-		if ($p=~m-^\\-o) {
+		if ($p=~m-^\/-o) {
 			next;
 		}
-		if ($p=~m-^\.\\(.*)$-o) {
+		if ($p=~m-^\.\/(.*)$-o) {
 			$p=&Path_Strip($BasePath.$1);
 			next;
 		}
@@ -309,11 +309,11 @@ sub Path_MakeEAbs ($@) {	#args: $_[0] Start EPOCPath Abs FilePath/Path $_[1]...
 }
 
 sub Path_Chop (@) {
-# remove the terminating backslash from a path, or list of paths, if there is one
+# remove the terminating slash from a path, or list of paths, if there is one
 	my @List=@_;
 	my $Path;
 	foreach $Path (@List) {
-		$Path=~s-^(.*)\\$-$1-o;
+		$Path=~s-^(.*)\/$-$1-o;
 	}
 	return wantarray ? @List : $List[0];
 }
@@ -323,7 +323,7 @@ sub Path_Quote ($) {
 	my @List=@_;
 	my $Path;
 	foreach $Path (@List) {
-		$Path=~s- -\\ -go if (defined($Path));
+		$Path=~s- -\/ -go if (defined($Path));
 	}
 	return wantarray ? @List : $List[0];
 }
@@ -331,7 +331,7 @@ sub Path_Quote ($) {
 sub Path_Norm ($) {
 # Normalise source specified paths for processing
 	my ($Path) = @_;
-	$Path =~ s/\//\\/g;
+	$Path =~ s/\\/\//g;
 	return $Path;
 }
 
@@ -357,9 +357,11 @@ sub Path_PrefixWithDriveAndQuote ($) {
 	my $Path;
 	my $Drive=$1 if (cwd =~ /^(.:)/); 
 
-	foreach $Path (@List) {
-		next if ($Path !~ /^\\/);
-		$Path=$Drive.$Path;
+	if ($Drive) {
+		foreach $Path (@List) {
+			next if ($Path !~ /^\//);
+			$Path=$Drive.$Path;
+		}
 	}
 
 	foreach $Path (@List) {
@@ -374,10 +376,10 @@ sub Path_PrefixWithDriveAndQuote ($) {
 BEGIN {
 # get the current working directory
 	$WorkPath=cwd;
-	$WorkPath=~s-/-\\-go; # separator from Perl 5.005_02+ is forward slash
+	$WorkPath=~s-/-\/-go; # separator from Perl 5.005_02+ is forward slash
 	$WorkPath=~s/^(.:)//o;    # remove drive letter
 	$Drive=$1;
-	$WorkPath=~s-^(.*[^\\])$-$1\\-o;        # ensure workpath ends with a backslash
+	$WorkPath=~s-^(.*[^\/])$-$1\/-o;        # ensure workpath ends with a backslash
 	@WorkPathList=&Path_Dirs($WorkPath);
 }
 
diff --git a/petran b/petran
new file mode 100644
index 0000000..53108ab
--- /dev/null
+++ b/petran
@@ -0,0 +1,12 @@
+#! /bin/bash
+#
+# petran - bash frontend for petran.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+wine $EPOCROOT/epoc32/tools/petran.exe "$@"
diff --git a/pfsdump b/pfsdump
new file mode 100644
index 0000000..e0f25e6
--- /dev/null
+++ b/pfsdump
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# pfsdump - bash frontend for pfsdump.exe, part of GnuPoc project
+#
+# PFS = Permanent File Store
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/prepdef.pl b/prepdef.pl
index 9dbd22b..c5423ea 100644
--- a/prepdef.pl
+++ b/prepdef.pl
@@ -33,9 +33,9 @@ BEGIN {
 }
 
 use lib $PerlLibPath;
-use Defutl;
-use E32tpver;
-use Pathutl;	
+use defutl;
+use e32tpver;
+use pathutl;	
 
 
 
diff --git a/prepfile.pm b/prepfile.pm
index e8fa082..27a095a 100644
--- a/prepfile.pm
+++ b/prepfile.pm
@@ -16,7 +16,7 @@
 #
 
 
-package Prepfile;
+package prepfile;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -25,9 +25,9 @@ require Exporter;
 	Prepfile_SetVerbose Prepfile_SetUpperCase Prepfile_ProcessL Prepfile_SetCmdOptions
 );
 
-use Checkgcc;
-use Pathutl;
-use Preprocessor;
+use checkgcc;
+use pathutl;
+use preprocessor;
 
 my %Mode=(
 	Verbose=>0,
@@ -57,11 +57,11 @@ sub Prepfile_ProcessL ($$;$@) {
 	die "\nERROR: Project File \"$FILE\" not found\n" unless -e $FILE;
 
 	my $exe = &PreprocessorToUseExe();
- 	my $cpp = "$exe.EXE $Mode{CmdOptions}-undef -nostdinc -+ ";
+ 	my $cpp = "$exe $Mode{CmdOptions}-undef -nostdinc -x c++ ";
 	my @CppCall;
  	push @CppCall, $cpp;
 
-	push @CppCall, join '',	"-I ",&Path_PrefixWithDriveAndQuote("$ENV{EPOCROOT}epoc32\\include"),
+	push @CppCall, join '',	"-I ",&Path_PrefixWithDriveAndQuote("$ENV{EPOCROOT}epoc32/include"),
 							" -I .",
 							" -I ",&Path_PrefixWithDriveAndQuote(&Path_Split('Path',$FILE));
 
@@ -79,12 +79,15 @@ sub Prepfile_ProcessL ($$;$@) {
 	}
 	# all macros made upper case and suppress user-expansion of macros for nefarious purposes
 
+	# gnupoc: platform macro
+	push @CppCall, "-D __SERIES60__=__SERIES60__";
+
 	push @CppCall, &Path_PrefixWithDriveAndQuote($FILE);
 	if ($Mode{'Verbose'}) {
 		print "@CppCall\n";
 	}
 	my $CPPPIPE;
-	open CPPPIPE,"@CppCall |" or die "ERROR: Can't invoke CPP.EXE\n";
+	open CPPPIPE,"@CppCall |" or die "ERROR: Can't invoke CPP\n";
 
 	# read the processed output
 	#--------------------------
@@ -101,20 +104,13 @@ sub Prepfile_ProcessL ($$;$@) {
 
 		my @Tmp=();
 
-	    # Process the file information lines that cpp inserts.
+		# Process the file information lines that cpp inserts.
 		# (note that we don't currently do anything with the
 		# number cpp sometimes puts out after the filename -
 		# it's something to do with inclusion nesting levels)
 		if (/^# (\d+) "(.*)"( \d+)?/o) {
 			$LineNum = scalar $1;
 			my $CurFile=$2;
-			$CurFile=~s-\\\\-\\-go;
-			$CurFile=~s-\\\/-\\-go;
-			$CurFile=~s-\/\\-\\-go;
-			$CurFile=~s-\/\/-\\-go;
-			$CurFile=~s-\/-\\-go;
-			$CurFile=~s-(.:)--go;
-
 			$CurFile=&Path_AbsToWork($CurFile);
 			@Tmp=('#', $CurFile);
 			push @{$ArrayRef}, [ @Tmp ];
@@ -127,8 +123,8 @@ sub Prepfile_ProcessL ($$;$@) {
 		# don't upper case everything until you've done this.
 		
 		foreach $Macro (@Macros) {
-			s/\/ _____$Macro /\/$Macro/g;
-			s/_____$Macro /$Macro/g;
+			#s/\/ _____$Macro /\/$Macro/g;
+			#s/_____$Macro /$Macro/g;
 			s/_____$Macro/$Macro/g;
 		}
 		if(/^macro/i)
diff --git a/preprocessor.pm b/preprocessor.pm
index 12294bd..604fe07 100644
--- a/preprocessor.pm
+++ b/preprocessor.pm
@@ -16,7 +16,7 @@
 # 
 #
 
-package Preprocessor;
+package preprocessor;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -63,7 +63,7 @@ sub PreprocessorToUseExe()
     
     if ( ($env eq "DEFAULT") )
     {
-        return "cpp";
+        return "arm-none-symbianelf-cpp";
     }
     elsif ( $env eq "MINGW_NO_CYGWIN" )
     {
@@ -98,4 +98,4 @@ sub PreprocessorToUsePath()
 }
 
 
-1;
\ No newline at end of file
+1;
diff --git a/rcomp b/rcomp
new file mode 100644
index 0000000..345a4ce
--- /dev/null
+++ b/rcomp
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# rcomp - bash frontend for rcomp.exe, part of GnuPoc project
+#
+# (c) 2001 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe "$@"
diff --git a/rvct_plat2set.pm b/rvct_plat2set.pm
index eb0d5be..b92a601 100644
--- a/rvct_plat2set.pm
+++ b/rvct_plat2set.pm
@@ -38,9 +38,9 @@
 # 
 #
 
-package RVCT_plat2set;
+package rvct_plat2set;
 
-use RVCT_ver2set;
+use rvct_ver2set;
 
 #
 # PUBLIC FUNCTIONS
@@ -100,6 +100,7 @@ sub get_version_list($)
 {
     my $tmp = _get_something(@_, 'version');
 
+    return () if !defined($tmp);
     return split(/\./, $tmp);
 }
 
@@ -230,18 +231,18 @@ sub _parse_section_data($@)
             my $vers = $2;
 
             _err_and_die("$fname: platform $plat already defined.") if $g_data{$plat};
-            _err_and_die("$fname: RVCT $vers doesn't exist.") unless RVCT_ver2set::compiler_exists($vers);
+            _err_and_die("$fname: RVCT $vers doesn't exist.") unless rvct_ver2set::compiler_exists($vers);
 
             $g_data{$plat}->{version} = $vers;
 
-            $g_data{$plat}->{bin_name} = RVCT_ver2set::get_bin_name($vers);
-            $g_data{$plat}->{bin_path} = RVCT_ver2set::get_bin_path($vers);
+            $g_data{$plat}->{bin_name} = rvct_ver2set::get_bin_name($vers);
+            $g_data{$plat}->{bin_path} = rvct_ver2set::get_bin_path($vers);
 
-            $g_data{$plat}->{inc_name} = RVCT_ver2set::get_inc_name($vers);
-            $g_data{$plat}->{inc_path} = RVCT_ver2set::get_inc_path($vers);
+            $g_data{$plat}->{inc_name} = rvct_ver2set::get_inc_name($vers);
+            $g_data{$plat}->{inc_path} = rvct_ver2set::get_inc_path($vers);
 
-            $g_data{$plat}->{lib_name} = RVCT_ver2set::get_lib_name($vers);
-            $g_data{$plat}->{lib_path} = RVCT_ver2set::get_lib_path($vers);
+            $g_data{$plat}->{lib_name} = rvct_ver2set::get_lib_name($vers);
+            $g_data{$plat}->{lib_path} = rvct_ver2set::get_lib_path($vers);
         }
         else
         {
@@ -283,6 +284,7 @@ sub _parse_section_data($@)
 
             $g_data{0}->{lib_name} = $lib;
             $g_data{0}->{lib_path} = $ENV{$lib};
+            print "Please set $bin, $inc and $lib\n" unless defined($ENV{$bin}) && defined($ENV{$inc}) && defined($ENV{$lib});
 
             last;
         }
diff --git a/rvct_ver2set.pm b/rvct_ver2set.pm
index 6710255..e98bbb0 100644
--- a/rvct_ver2set.pm
+++ b/rvct_ver2set.pm
@@ -28,7 +28,7 @@
 #
 
 
-package RVCT_ver2set;
+package rvct_ver2set;
 
 #
 # PUBLIC FUNCTIONS
diff --git a/scanlog.pl b/scanlog.pl
index 0e86a10..fa07f02 100644
--- a/scanlog.pl
+++ b/scanlog.pl
@@ -24,7 +24,7 @@ use FindBin;		# for FindBin::Bin
 # Add the directory contain this perl script into the path to find modules
 use lib $FindBin::Bin;
 
-use Scanlog;
+use scanlog;
 
 my $line;
 my $iSlurp;
diff --git a/signsis b/signsis
new file mode 100644
index 0000000..2944624
--- /dev/null
+++ b/signsis
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# signsis - bash frontend for signsis.exe, part of GnuPoc project
+#
+# (c) 2001-2006 Alfred E. Heggestad
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation.
+#
+
+PGM=`basename $0`
+# Workaround for Qt createpackage.pl and patch_capabilities.pl, which call
+# $epocroot/epoc32/tools/$PGM explicitly instead of just "$PGM" using the
+# path. Try to use a proper native version, if available.
+if [ "`which $PGM`" != "$0" ] && [ -x "`which $PGM`" ]; then
+	exec $PGM "$@"
+else
+	echo "executing $PGM.exe"
+	ROOT=$EPOCROOT/epoc32/tools
+	wine $ROOT/$PGM.exe "$@"
+fi
diff --git a/tranasm b/tranasm
new file mode 100644
index 0000000..7e3738d
--- /dev/null
+++ b/tranasm
@@ -0,0 +1,4 @@
+#!/bin/sh
+DIR=`dirname $0`
+TOOL=`basename $0`
+perl $DIR/$TOOL.pl "$@"
diff --git a/trgtype.pm b/trgtype.pm
index 969ea37..9e965a2 100644
--- a/trgtype.pm
+++ b/trgtype.pm
@@ -17,7 +17,7 @@
 # 
 #
 
-package Trgtype;
+package trgtype;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -26,7 +26,7 @@ require Exporter;
 	Trg_List
 );
 
-use Genutl;
+use genutl;
 
 my %Types=(
 	ANI=>{
@@ -95,12 +95,12 @@ my %Types=(
 		Basic=>'IMPLIB',
 	},	
 	KDLL=>{
-		FirstLib=>'EKLL.LIB',
+		FirstLib=>'ekll.lib',
 #		Kernel=>1,
 		System=>1,
 	},
 	KEXT=>{
-		FirstLib=>'EEXT.LIB',
+		FirstLib=>'eext.lib',
 #		Kernel=>1,
 		System=>1,
 	},
@@ -110,7 +110,7 @@ my %Types=(
 		System=>1,
 	},
 	LDD=>{
-		FirstLib=>'EDEV.LIB',
+		FirstLib=>'edev.lib',
 #		Kernel=>1,
 		System=>1,
 		'Exports'=>{
@@ -132,7 +132,7 @@ my %Types=(
 			WINS=>['?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z'],
 			X86=>['?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z'],
 		},
-		Path=>'System\Libs\Plugins',
+		Path=>'system/libs/plugins',
 		UID2=>'0x10009D8D',
 		Deprecated=>"Convert to PLUGIN (ECOM)",
 	},
@@ -144,7 +144,7 @@ my %Types=(
 			X86=>['?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z'],
 			x86gcc=>['_Z24ImplementationGroupProxyRi']
 		},
-		ResourcePath=>'Resource\Plugins',
+		ResourcePath=>'resource/plugins',
 		UID2=>'0x10009D8D',
 	},
 	PLUGIN3=>{
@@ -194,7 +194,7 @@ my %Types=(
 			WINS=>['?NotifierArray@@YAPAV?$CArrayPtr@VMEikSrvNotifierBase@@@@XZ'],
 			X86=>['?NotifierArray@@YAPAV?$CArrayPtr@VMEikSrvNotifierBase@@@@XZ'],
 		},
-		Path=>'System\Notifiers',
+		Path=>'system/notifiers',
 		UID2=>'0x10005522',
 		Deprecated=>"Convert to PLUGIN (ECOM)",
 	},
@@ -205,7 +205,7 @@ my %Types=(
 			WINS=>['?NotifierArray@@YAPAV?$CArrayPtr@VMEikSrvNotifierBase2@@@@XZ'],
 			X86=>['?NotifierArray@@YAPAV?$CArrayPtr@VMEikSrvNotifierBase2@@@@XZ'],
 		},
-		Path=>'System\Notifiers',
+		Path=>'system/notifiers',
 		UID2=>'0x101fdfae',
 		Deprecated=>"Convert to PLUGIN (ECOM)",
 	},
@@ -217,13 +217,13 @@ my %Types=(
 			X86=>['?NotifierArray@@YAPAV?$CArrayPtr@VMNotifierBase2@@@@XZ'],
 			x86gcc=>['_Z13NotifierArrayv']
 		},
-		Path=>'System\Notifiers',
+		Path=>'system/notifiers',
 		UID2=>'0x101fe38b',
 		# Not deprecated - the Text Window Server will have AllFiles, 
 		# so it can continue scanning for binaries
 	},
 	PDD=>{
-		FirstLib=>'EDEV.LIB',
+		FirstLib=>'edev.lib',
 #		Kernel=>1,
 		System=>1,
 		'Exports'=>{
@@ -244,7 +244,7 @@ my %Types=(
 			x86gcc=>['_Z17NewPrinterDeviceLv']
 		},
 		UID2=>'0x10003b1c',
-		ResourcePath=>'Resource\Printers',
+		ResourcePath=>'resource/printers',
 	},
 	STDDLL=>{
 		NeedDeffile=>1,
@@ -264,7 +264,7 @@ my %Types=(
 			X86=>['?VariantInitialise@@YAPAVAsic@@XZ'],
 			x86gcc=>['_Z17VariantInitialisev']
 		},
-		FirstLib=>'EVAR.LIB',
+		FirstLib=>'evar.lib',
 #		Kernel=>1,
 		System=>1,
 	},
@@ -380,9 +380,9 @@ sub Trg_GetL ($$$) {
 	}
 	else {
 		# apply terminating backslash
-		$TrgHash{Path}=~s-^(.*[^\\])$-$1\\-o;
+		$TrgHash{Path}=~s-^(.*[^\/])$-$1\/-o;
 		# apply Z drive
-		$TrgHash{Path}="Z\\$TrgHash{Path}";
+		$TrgHash{Path}="z/$TrgHash{Path}";
 	}
 
 	unless ($TrgHash{ResourcePath}) {
@@ -390,7 +390,7 @@ sub Trg_GetL ($$$) {
 	}
 	else {
 		# apply terminating backslash & Z drive
-		$TrgHash{ResourcePath}=~s-^(.*[^\\])$-Z\\$1\\-o;
+		$TrgHash{ResourcePath}=~s-^(.*[^\/])$-z\/$1\/-o;
 	}
 
 	unless ($TrgHash{UID2}) {
diff --git a/winutl.pm b/winutl.pm
index 1c7a0a3..0d71df0 100644
--- a/winutl.pm
+++ b/winutl.pm
@@ -16,7 +16,7 @@
 # 
 #
 
-package Winutl;
+package winutl;
 
 my $BaseAddress='';
 my @Win32LibList=();
@@ -48,10 +48,10 @@ require Exporter;
 	Winutl_CheckSourceMMPMetaData
 );
 
-use Genutl;
-use E32Variant;
-use CheckSource;
-use Pathutl;
+use genutl;
+use e32variant;
+use checksource;
+use pathutl;
 use Cwd;
 
 my %CheckSourceMMPMetaData;
@@ -257,7 +257,7 @@ sub Winutl_DoMmp ($$) {
 		$UidText.=")\n";
 		$UidText.="#pragma data_seg()\n";
 		unless (&main::Plat eq 'TOOLS' || &main::Plat eq 'CWTOOLS' || &main::Plat eq 'TOOLS2' ) {
-			&main::AddSrc("$MakeFilePath$BaseTrg.UID.CPP", $UidText);
+			&main::AddSrc("$MakeFilePath$BaseTrg.uid.cpp", $UidText);
 		};
 	}
 
@@ -315,7 +315,7 @@ sub Winutl_MSVCVer ($) {
 	my $platcommand=shift;
 	if(!defined $platcommand) {
 		$platcommand=0; }
-	open PIPE, "LINK.EXE 2>&1 |" or die "ERROR: Can't invoke LINK.EXE\n";
+	open PIPE, "wine LINK.EXE 2>&1 |" or die "ERROR: Can't invoke LINK.EXE\n";
 	my $DoneCheck=0;
 	while (<PIPE>) {
 		unless ($DoneCheck) {
diff --git a/wrappermakefile.pm b/wrappermakefile.pm
index ef53131..a8ceafb 100644
--- a/wrappermakefile.pm
+++ b/wrappermakefile.pm
@@ -21,7 +21,7 @@ require Exporter;
 	GenerateWrapper
 );
 
-use Output;
+use output;
 
 my (@ExtensionUsedBefore);
 my $ExtTemplatesPath="$ENV{EPOCROOT}epoc32/tools/makefile_templates/";
