diff -urN tools_orig/abld tools/abld
--- tools_orig/abld	1970-01-01 02:00:00.000000000 +0200
+++ tools/abld	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/abld.pl tools/abld.pl
--- tools_orig/abld.pl	2006-03-06 23:41:42.000000000 +0200
+++ tools/abld.pl	2007-04-07 01:23:49.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # ABLD.PL
 #
 # Copyright (c) 1997-2004 Symbian Ltd.  All rights reserved.
@@ -14,12 +16,11 @@
 	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 e32env;
 
 # command data structure
 my %Commands=(
@@ -67,7 +68,7 @@
 	FREEZE=>{
 		program=>1,
 		remove=>1,
-		function=>'Freezes exported functions in a .DEF file',
+		function=>'Freezes exported functions in a .def file',
 	},
 	HELP=>{
 		noplatform=>1,
@@ -76,7 +77,7 @@
 	},
 	LIBRARY=>{
 		program=>1,
-		function=>'Creates import libraries from the frozen .DEF files',
+		function=>'Creates import libraries from the frozen .def files',
 	},
 	LISTING=>{
 		build=>1,
@@ -142,10 +143,10 @@
 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";
 	}
@@ -153,12 +154,12 @@
 
 # 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.
@@ -270,12 +271,12 @@
 		}
 		else {
 			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;
 				    }
 				}
@@ -291,8 +292,8 @@
 #				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';
@@ -336,8 +337,8 @@
 #					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;
@@ -367,13 +368,13 @@
 #	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";
@@ -422,7 +423,7 @@
 	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});
@@ -444,8 +445,9 @@
 		}
 
 		foreach $Plat (@Plats) {
-			unless (-e "$PrjBldDir$Plat$Test.make") {
-				die "ABLD ERROR: \"$PrjBldDir$Plat$Test.make\" not yet created\n";
+			my $lcplat = lc $Plat;
+			unless (-e "$PrjBldDir$lcplat$Test.make") {
+				die "ABLD ERROR: \"$PrjBldDir$lcplat$Test.make\" not yet created\n";
 			}
 		}
 		undef $Plat;
@@ -457,7 +459,7 @@
 		@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}};
 			}
 		}
 	}
@@ -499,14 +501,17 @@
 
 #	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{what} or $Options{check}) {
-			push @Calls, "make -r $KeepgoingFlag -f \"${PrjBldDir}EXPORT$Test.make\" $Command$VerboseMacro$KeepgoingMacro";
+#			my $Command2 = uc $Command;
+#			my $lc_command = lc $Command;
+			my $Command2 = $Command;
+			push @Calls, "make -r $KeepgoingFlag -f \"${PrjBldDir}export$Test.make\" $Command2$VerboseMacro$KeepgoingMacro";
 		}
 		else {
-			push @Calls, "make -r -f \"${PrjBldDir}EXPORT$Test.make\" WHAT";
+			push @Calls, "make -r -f \"${PrjBldDir}export$Test.make\" WHAT";
 		}
 		@Commands=grep !/EXPORT$/o, @Commands;
 	}
@@ -549,12 +554,12 @@
 				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;
 							}
 						}
@@ -565,7 +570,8 @@
                         $AbldFlagsMacroTmp=$AbldFlagsMacro;
 					}
 
-                    push @Calls, "make -r $KeepgoingFlag -f \"$PrjBldDir$Plat$Test.make\" $Command$Program$CFG$Source$VerboseMacro$KeepgoingMacro$RemoveMacro$NoDependencyMacro$AbldFlagsMacroTmp";
+                    my $lcplat = lc $Plat;
+                    push @Calls, "make -r $KeepgoingFlag -f \"$PrjBldDir$lcplat$Test.make\" $Command$Program$CFG$Source$VerboseMacro$KeepgoingMacro$RemoveMacro$NoDependencyMacro$AbldFlagsMacroTmp";
 					next;
 				}
 				unless (${$Commands{$Command}}{what}) {
@@ -573,21 +579,22 @@
 				}
 				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$/io) {
 					$Makefile='MAKEFILE';
 				}
-				push @Calls, "make -r -f \"$PrjBldDir$Plat$Test.make\" WHAT$Makefile$Program $CFG";
+				my $lcplat = lc $Plat;
+				push @Calls, "make -r -f \"$PrjBldDir$lcplat$Test.make\" WHAT$Makefile$Program $CFG";
 			}
 		}
 	}
@@ -598,7 +605,6 @@
 	my $Call;
 	unless ($Options{what} or $Options{check}) {
 		foreach $Call (@Calls) {
-			print "  $Call\n";
 			open PIPE, "$Call |";
 			while (<PIPE>) {
 				print;
@@ -647,7 +653,7 @@
 
 	print
 		"project platforms:\n",
-		"   @Platform::Plats\n"
+		"   @platform::Plats\n"
 	;
 	exit 1;
 }
@@ -675,7 +681,7 @@
 
 	my %CommandHash=%{$Commands{$Command}};
 
-	print 'ABLD';
+	print 'abld';
 	unless ($CommandHash{notest}) {
 		print ' [test]';
 	}
diff -urN tools_orig/aiftool tools/aiftool
--- tools_orig/aiftool	1970-01-01 02:00:00.000000000 +0200
+++ tools/aiftool	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/armutl.pm tools/armutl.pm
--- tools_orig/armutl.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/armutl.pm	2007-04-07 01:23:49.000000000 +0300
@@ -6,7 +6,7 @@
 
 # this package does various ancillary things for armedg modules
 
-package Armutl;
+package armutl;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -47,7 +47,7 @@
 		return $ENV{ARMV5VER};
 	} 
 	else{
-		open ARMCCPIPE, "armcc 2>&1 |";
+		open ARMCCPIPE, "armcc 2>&1 |" or return "";
 		# Read all output from armcc into array
 		my @lines=<ARMCCPIPE>;
 		chomp @lines;
diff -urN tools_orig/bldmake tools/bldmake
--- tools_orig/bldmake	1970-01-01 02:00:00.000000000 +0200
+++ tools/bldmake	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/bldmake.pl tools/bldmake.pl
--- tools_orig/bldmake.pl	2006-06-05 18:33:00.000000000 +0300
+++ tools/bldmake.pl	2007-08-11 23:26:33.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # BLDMAKE.PL
 #
 # Copyright (c) 1997-2005 Symbian Ltd.  All rights reserved.
@@ -19,20 +21,19 @@
 	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 Armutl;
-use BPABIutl;
+use e32env;
+use e32plat;
+use modload;
+use output;
+use pathutl;
+use e32variant;
+use armutl;
+use bpabiutl;
 
 my %Options;
 my %KeepGoing;
@@ -103,7 +104,7 @@
 			);
 		}
 		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;
@@ -118,24 +119,24 @@
 	}
 
 
-#	check that the BLD.INF file exists
-#	maybe BLDMAKE should allow a path to be specified leading to the BLD.INF file
+#	check that the bld.inf file exists
+#	maybe BLDMAKE should allow a path to be specified leading to the bld.inf file
 	my $BldInfPath=&Path_WorkPath;
-	unless (-e "${BldInfPath}BLD.INF") {
-		&FatalError("Can't find \"${BldInfPath}BLD.INF\"");
+	unless (-e "${BldInfPath}bld.inf") {
+		&FatalError("Can't find \"${BldInfPath}bld.inf\"");
 	}
 
-	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
+#	Work out the name for the bld.inf module
 	my @Dirs=&Path_Dirs($BldInfPath);
 	my $Module = pop @Dirs;
 	if (lc($Module) eq 'group') {
@@ -154,18 +155,18 @@
 		exit;
 	}
 
-#	parse BLD.INF - to get the platforms and the export files
-	eval { &Load_ModuleL('PREPFILE'); };
+#	parse bld.inf - to get the platforms and the export files
+	eval { &Load_ModuleL('prepfile'); };
 	&FatalError($@) if $@;
 
 	my @RealPlats=();
 	my @Exports=();
 	my @TestExports=();
 	if ($Options{v}) {
-		print "Reading \"${BldInfPath}BLD.INF\" for platforms and exports\n";
+		print "Reading \"${BldInfPath}bld.inf\" 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;
@@ -238,7 +239,7 @@
 
 	unless ($CLPlat eq 'ALL') {
 		unless (grep /^$CLPlat$/, @Plats) {
-			&FatalError("Platform $CLPlat not supported by \"${BldInfPath}BLD.INF\"\n");
+			&FatalError("Platform $CLPlat not supported by \"${BldInfPath}bld.inf\"\n");
 		}
 		@DoPlats=($CLPlat);
 		@DoRealPlats=$Real{$CLPlat};
@@ -248,7 +249,7 @@
 	my @ExportDirs=ExportDirs(\@Exports);
 	my @TestExportDirs=ExportDirs(\@TestExports);
 
-#	parse the BLD.INF file again for each platform supported by the project
+#	parse the bld.inf file again for each platform supported by the project
 #	storing the information in a big data structure
 	my %AllPlatData;
 	my %AllPlatTestData;
@@ -256,13 +257,13 @@
 	
 	
 	if ($Options{v} and $CLPlat ne 'ALL'){
-		print "Reading \"${BldInfPath}BLD.INF\" for $CLPlat \n";
+		print "Reading \"${BldInfPath}bld.inf\" for $CLPlat \n";
 	}
 
 	foreach $Plat (@RealPlats) {
 		if ($Options{v}) {
 			if ($CLPlat eq 'ALL') {
-				print "Reading \"${BldInfPath}BLD.INF\" for $Plat\n";
+				print "Reading \"${BldInfPath}bld.inf\" for $Plat\n";
 			}
 		}
 		my (@PlatData, @PlatTestData);
@@ -291,43 +292,46 @@
 			}
 		}
 
-#		create the perl file, PLATFORM.PM, listing the platforms
+#		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);
 
 #		create the platform meta-makefiles
 		foreach my $copyofPlat (@DoPlats) {  # Do not use $_ here !!
 			if ($Options{v}) {
-				print "Creating \"$OutDir$_.MAKE\"\n";
+				my $tmp = lc $_;
+				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, '');
 		}
 		foreach (@DoPlats) {
 			if ($Options{v}) {
-				print "Creating \"$OutDir${_}TEST.MAKE\"\n";
+				my $tmp = lc $_;
+				print "Creating \"$OutDir${tmp}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');
 		}
 
 #		create the platform test batch files
@@ -341,7 +345,7 @@
 #		report any near-fatal errors
 		if (scalar keys %KeepGoing) {
 		    print STDERR
-			    "\n${BldInfPath}BLD.INF WARNING(S):\n",
+			    "\n${BldInfPath}bld.inf WARNING(S):\n",
 			    sort keys %KeepGoing
 			    ;
 		}
@@ -361,7 +365,7 @@
 
 sub Usage () {
 
-	eval { &Load_ModuleL('E32TPVER'); };
+	eval { &Load_ModuleL('e32tpver'); };
 	&FatalError($@) if $@;
 
 	print
@@ -373,7 +377,7 @@
 		"<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",
@@ -390,7 +394,7 @@
 
 	print <<ENDHERE1;
 
-BLD.INF - Syntax
+bld.inf - Syntax
 
 /* Use C++ comments if required */
 // (Curly braces denote optional arguments)
@@ -412,7 +416,7 @@
 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>}
@@ -449,7 +453,7 @@
 	my ($PlatsRef, $ExportsRef, $TestExportsRef, $BldInfPath, $EPOCIncPath, $EPOCPath, $EPOCDataPath)=@_;
 
 	my @Prj2D;
-	eval { &Prepfile_ProcessL(\@Prj2D, "${BldInfPath}BLD.INF",$variantMacroHRHFile); };
+	eval { &Prepfile_ProcessL(\@Prj2D, "${BldInfPath}bld.inf",$variantMacroHRHFile); };
 	&FatalError($@) if $@;
 	
 	my @SupportedPlats=&Plat_List();
@@ -471,10 +475,11 @@
 	my $Section=0;
 	my @PrjFileDie;
 	my $Line;
-	my $CurFile="${BldInfPath}BLD.INF";
+	my $CurFile="${BldInfPath}bld.inf";
 	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;
@@ -500,13 +505,13 @@
 			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) {
@@ -518,7 +523,7 @@
 					next CANDLOOP;
 				}
 #				expand BASEDEFAULT
-				if ($Candidate eq 'BASEDEFAULT') {
+				if ($Candidate eq 'basedefault') {
 					$DefaultPlatsUsed=1;
 					my $Default;
 					foreach $Default (@BaseDefaultPlats) {
@@ -546,7 +551,7 @@
 						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;
 				}
@@ -557,7 +562,7 @@
 				}
 #				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);
@@ -589,8 +594,9 @@
 			if (@$Line) {
 #				get the destination file if it's specified
 				$Releasable=shift @$Line;
-				$emReleasable=ucfirst $Releasable;
-				if ($emReleasable=~/^([A-Z]):(\\.*)$/)  {
+				$Releasable=~s/\\/\//g;      # force to forward slash
+				$emReleasable=$Releasable;
+				if ($emReleasable=~/^([A-Z][a-z]):(\/.*)$/)  {
 				  	$emReleasable=~s/://;
 					$Releasable=$EPOCDataPath.$emReleasable;
 				}
@@ -649,7 +655,7 @@
 	}
 	if (@PrjFileDie) {
 		print STDERR
-			"\n${BldInfPath}BLD.INF FATAL ERROR(S):\n",
+			"\n${BldInfPath}bld.inf FATAL ERROR(S):\n",
 			@PrjFileDie
 		;
 		exit 1;
@@ -698,14 +704,14 @@
 sub ParseBldInfPlat ($$$$) {
 	my ($DataRef, $TestDataRef, $Plat, $BldInfPath)=@_;
 
-#	get the platform .MMP macros
+#	get the platform .mmp macros
 	my %Plat;
 	eval { &Plat_GetL($Plat,\%Plat); };
 	&FatalError($@) if $@;
 
-#	get the raw data from the BLD.INF file
+#	get the raw data from the bld.inf file
 	my @Prj2D;
-	eval { &Prepfile_ProcessL(\@Prj2D, "${BldInfPath}BLD.INF", $variantMacroHRHFile, @{$Plat{MmpMacros}}); };
+	eval { &Prepfile_ProcessL(\@Prj2D, "${BldInfPath}bld.inf", $variantMacroHRHFile, @{$Plat{MmpMacros}}); };
 	&FatalError($@) if $@;
 	
 #	process the raw data
@@ -713,7 +719,7 @@
 	my $Section=0;
 	my @PrjFileDie;
 	my $Line;
-	my $CurFile="${BldInfPath}BLD.INF";
+	my $CurFile="${BldInfPath}bld.inf";
 	LINE: foreach $Line (@Prj2D) {
 
 		my %Data;
@@ -726,48 +732,51 @@
 		}
 		
 #		upper-case all the data here
-		foreach (@$Line) {
-			$_=uc $_;
-		}
+#		foreach (@$Line) {
+#			$_=uc $_;
+#		}
 
 		$_=shift @$Line;
 
 #		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;
 		}
 
 #		Skip section if PRJ_TESTMMPFILES and -notest option
 		next LINE if ($Options{notest} && ($Section=~/^(TESTMMPFILES)$/o)); 
 
-#		check for the sections we're interested in and get the .MMP file details
+#		check for the sections we're interested in and get the .mmp file details
 		if ($Section=~/^(MMPFILES|TESTMMPFILES)$/o) {
 
-			$Data{Ext}='.MMP';
+			$Data{Ext}='.mmp';
 
 #			check for MAKEFILE statements for custom building
-			if (/^MAKEFILE$/o) {
-				$Data{Makefile}=2;  # hack - treat MAKEFILE=>NMAKEFILE   =1;
+			if (/^MAKEFILE$/oi) {
+				$Data{Makefile}=1;
 				$_=shift @$Line;
 				$Data{Ext}=&Path_Split('Ext', $_);
 			}
-			if (/^NMAKEFILE$/o) {
+			if (/^NMAKEFILE$/oi) {
 				$Data{Makefile}=2;
 				$_=shift @$Line;
 				$Data{Ext}=&Path_Split('Ext', $_);
 			}
-			if (/^GNUMAKEFILE$/o) {
+			if (/^GNUMAKEFILE$/oi) {
 				$Data{Makefile}=1;
 				$_=shift @$Line;
 				$Data{Ext}=&Path_Split('Ext', $_);
 			}
+
+			$_=~s/\\/\//g; # convert backslash to forward slash
+
 #			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};
    
@@ -778,6 +787,8 @@
    			}
   			$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");
@@ -787,6 +798,7 @@
 #			process the file's attributes
 			if ($Section eq 'MMPFILES') {
 				foreach (@$Line) {
+				#$_ = uc $_; # alfredh: hack TODOAEH
 					if (/^TIDY$/o) {
 						$Data{Tidy}=1;
 						next;
@@ -799,11 +811,11 @@
 					  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) {
@@ -825,7 +837,7 @@
 						$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";
 				}
 			}
 
@@ -846,7 +858,7 @@
 #	exit if there are errors
 	if (@PrjFileDie) {
 		print STDERR
-			"\n\"${BldInfPath}BLD.INF\" FATAL ERROR(S):\n",
+			"\n\"${BldInfPath}bld.inf\" FATAL ERROR(S):\n",
 			@PrjFileDie
 		;
 		exit 1;
@@ -881,12 +893,14 @@
 
 
 	&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);\n",
 		"\n",
@@ -957,8 +971,8 @@
 		"1;\n"
 	);
 
-#	write the PLATFORM.PM file
-	&WriteOutFileL($BatchPath."PLATFORM.PM");
+#	write the platform.pm file
+	&WriteOutFileL($BatchPath."platform.pm");
 }
 
 sub CreatePerlBat ($) {
@@ -1029,10 +1043,9 @@
 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",
@@ -1063,7 +1076,7 @@
 	else {
 		&Output(
 			" \n",
-			"\t\@echo Nothing to do\n"
+#			"\t\@echo Nothing to do\n"
 		);
 	}
 	&Output(
@@ -1115,7 +1128,7 @@
 			my $src=&Path_Quote($$ref{Source});
 			&Output(
 				"$dst : $src\n",
-					"\tcopy \"\$?\" \"\$\@\"\n",
+					"\tcp \"\$?\" \"\$\@\"\n",
 				"\n"
 			);
 		}
@@ -1172,9 +1185,9 @@
 	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"
 		);
 	}
 	
@@ -1363,7 +1376,7 @@
 		$Test='';
 	}
 	else {
-		$Test='TEST';
+		$Test='test';
 	}
 
 	my $Ref;
@@ -1378,11 +1391,9 @@
 	} 
 
 
-	my $OutRomFile="$RomDir$RealPlat$Test.IBY";
-	my $GCCDir="gcc\\bin";
+	my $OutRomFile="$RomDir$RealPlat$Test.iby";
 	
-	my $erasedefn = "\@erase";
-	$erasedefn = "\@erase 2>>nul" if ($ENV{OS} eq "Windows_NT");
+	my $erasedefn = "\@rm -f";
 
 # The BPABI top level makefiles should include the compiler configuration files
 	if (grep /^$Plat$/i, @BPABIPlats) {
@@ -1394,18 +1405,11 @@
 		);
 	}
 
-	if ($ENV{'PATH'} !~ m/[a-zA-z]{1}:{1}.[^;]*epoc32\\gcc\\bin/i) {	
-		&Output(
-			"# set Path for custom builds using GCC - must set Path and PATH\n",
-			'Path:=',&main::Path_Drive,$E32env::Data{EPOCPath},$GCCDir,";\$(Path)\n",
-			"PATH:=\$(Path)\n"
-			);
-	}
-
 	&Output(		
-		"\n",
-		"# prevent MAKEFLAGS variable from upsetting calls to NMAKE\n",
-		"unexport MAKEFLAGS\n",
+		"#\n",
+		"#   this makefile is for GNU make\n",
+		"#   generated by GnuPoc - EPOC SDK for GNU/Linux\n",
+		"#\n",
 		"\n",
 		"ERASE = $erasedefn\n",
 		"\n",
@@ -1474,7 +1478,7 @@
 	if ($whatcount==0 and !$eDrive) {
 		&Output(
 			"\n",
-			"\t\@rem do nothing\n" 
+#			"\t\@rem do nothing\n" 
 		);
 	}
 	&Output(
@@ -1496,7 +1500,7 @@
 	else {
 		&Output(
 			"\n",
-			"\t\@echo Nothing to do\n"
+#			"\t\@echo Nothing to do\n"
 		);
 	}
 	&Output(
@@ -1565,8 +1569,8 @@
 
 #		standard commands
 		unless ($$Ref{Makefile}) {
-			my $MakefilePath=join('', &Path_Chop($E32MakePath), $BldInfPath, $$Ref{Base}, "\\", $RealPlat, "\\");
-			my $RealMakefile="-f \"$MakefilePath$$Ref{Base}.$RealPlat\"";
+			my $MakefilePath=join('', &Path_Chop($E32MakePath), $BldInfPath, $$Ref{Base}, "/", lc $RealPlat, "/");
+			my $RealMakefile="-f \"$MakefilePath$$Ref{Base}." . lc $RealPlat . "\"";
 			my $MakefileBase="$MakefilePath$$Ref{Base}";		
 
 			if($Plat eq 'VS6' || $Plat eq 'VS2003')
@@ -1592,7 +1596,7 @@
 			}
 			if ($RealPlat=~/^(WINS|WINSCW|WINC)$/o) {
 				&Output(
-					" \\\n\t\"$MakefileBase.UID.CPP\""	# BUG: actually uses $BaseTrg, not mmp file name
+					" \\\n\t\"$MakefileBase.uid.cpp\""	# BUG: actually uses $BaseTrg, not mmp file name
 				);
 			}
 			
@@ -1626,7 +1630,7 @@
 				    "\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)) {
@@ -1687,14 +1691,27 @@
 			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";
+			}
+			my $makefile = "$$Ref{Base}$$Ref{Ext}";
+			my $to_root = &Path_Chop(&Path_UpToRoot($$Ref{Path}));
+			my $epocbld = join('', &Path_Chop(&Path_UpToRoot($$Ref{Path})), &Path_Chop($E32MakePath), $BldInfPath, $$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{BuildAsARM}) {
 			  $MakefileCall.=" BUILD_AS_ARM=1";
 			}			  
@@ -1771,8 +1788,9 @@
 		}
 
 	}
-	
-	&WriteOutFileL("$BatchPath$Plat$Test.MAKE");
+
+	$Plat = lc $Plat;
+	&WriteOutFileL("$BatchPath$Plat$Test.make");
 }
 
 sub CreatePlatBatches ($$$) {
diff -urN tools_orig/bmconv tools/bmconv
--- tools_orig/bmconv	1970-01-01 02:00:00.000000000 +0200
+++ tools/bmconv	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/bpabiutl.pm tools/bpabiutl.pm
--- tools_orig/bpabiutl.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/bpabiutl.pm	2007-04-07 01:23:49.000000000 +0300
@@ -6,7 +6,7 @@
 
 # This package  does various ancillary things for BPABI (Base Platform ABI) platforms
 
-package BPABIutl;
+package bpabiutl;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -22,17 +22,17 @@
 
 # Identify the BPABI platforms to be supported based on the compiler configuration files
 # present in the location specified by the environment variable "SYMBIAN_COMPILATION_CONFIG_DIR"
-# and in the directory $EPOCROOT\epoc32\tools\compilation_config
+# and in the directory $EPOCROOT/epoc32/tools/compilation_config
 
 	my @CompilerConfigPath;
 
 	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;
@@ -48,9 +48,9 @@
 # with the suffix '.mk' removed
 			$Plat =~ s/\.mk//;
 			unless (grep /$Plat$/i, @BPABIPlats) {
-				$Plat = uc $Plat;
-				push @BPABIPlats, $Plat;
-				$ConfigPath{$Plat} = "$ConfigDir\\$Plat.mk";
+				$Plat = lc $Plat;
+				push @BPABIPlats, uc $Plat;
+				$ConfigPath{$Plat} = "$ConfigDir/$Plat.mk";
 			}
 		}
 	}
@@ -66,7 +66,8 @@
 	    # Running for first time so initialise ConfigPath
 	    BPABIutl_Plat_List();
 	}
-	return "$ConfigPath{$plat}";
+	my $lc_plat = lc $plat;
+	return "$ConfigPath{$lc_plat}";
 }
 
 # routine to extract a set of variables from the compilation configuration
@@ -76,7 +77,7 @@
 {
     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 -urN tools_orig/checkgcc.pm tools/checkgcc.pm
--- tools_orig/checkgcc.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/checkgcc.pm	2007-04-07 01:23:49.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # CHECKGCC.PM
 #
 # Copyright (c) 1997-2004 Symbian Ltd.  All rights reserved.
@@ -6,25 +8,24 @@
 
 # module for checking gcc is set up correctly
 
-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 @Paths=split ';', $ENV{Path};
+ 	# die if CPP (or whatever) in a dodgy place in the 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\\BIN\\$/i) {
+		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\\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"
 				;
diff -urN tools_orig/cl_bpabi.pm tools/cl_bpabi.pm
--- tools_orig/cl_bpabi.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/cl_bpabi.pm	2007-04-07 01:23:49.000000000 +0300
@@ -4,7 +4,7 @@
 #
 
 # This package contains routines to handle Base Platform ABI (BPABI) Platforms.
-package Cl_bpabi;
+package cl_bpabi;
 
 my $commonOptions;
 my $thumbOptions;
@@ -62,8 +62,8 @@
 use Cwd;
 
 # Armutl package does various ancillary things for armedg modules
-use Armutl;
-use BPABIutl;
+use armutl;
+use bpabiutl;
 
 # This is the RVCT Version information required by Armutl package
 my $RVCTMajorVersion;
@@ -76,14 +76,14 @@
 
 # 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;
 
 sub PMHelp_Mmp {
 	my $Plat=&main::Plat;
@@ -113,7 +113,7 @@
 	@ToolChainLibList = &GetLibList;
 	$TargetRT = &IsTargetRT;
 	my @AsmFileList = &GetToolChainAsmFileList;
-	foreach (@AsmFileList) { $AsmFiles{ucfirst lc $_} = 1; }
+	foreach (@AsmFileList) { $AsmFiles{$_} = 1; }
 }
 
 my $preinclude;
@@ -131,13 +131,13 @@
 	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__";
 	
 	my $myStatLinkPath;
-	$myStatLinkPath = "$E32env::Data{LinkPath}";
-	$myStatLinkPath .= "ARMV5";
+	$myStatLinkPath = "$e32env::Data{LinkPath}";
+	$myStatLinkPath .= lc "ARMV5";
 	&main::SetStatLinkPath($myStatLinkPath);
 
 	my $VariantFile=&ChangeSlash(&main::VariantFile);
@@ -182,23 +182,6 @@
 	&main::Output("\n", "include $config_file\n", "\n");
 	&Generic_Header(1,$Makecmd);	# define standard things using relative paths
 		 
-	if ($Makecmd eq "nmake") {
-		&main::Output(
-			"\n",
-			"PATH=",&main::Path_Drive,$EPOCPath,"gcc\\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\\bin;\$(Path)\n",
-			"PATH:=\$(Path)\n",
-			"\n"
-		);
-	}
-
 	if ($BasicTrgType=~/^(DLL|EXE)/o) 
 	{
 
@@ -218,11 +201,10 @@
 		# Incase of GCCE, the following paths should be provided to the linker
 
 		my $gccinstallpath = &GCCInstallPath;
-		$gccinstallpath .= "\\\.\.";
 			&main::Output(
 				"ifndef CC_INSTALL_PATH\n",
- 				"\tCC_INSTALL_PATH=",$gccinstallpath,"\n",
-				"\tSTATIC_LIBS = \$(STATIC_LIBS_PATH)\"\$(CC_INSTALL_PATH)\\arm-none-symbianelf\\lib\" \$(STATIC_LIBS_PATH)\"\$(CC_INSTALL_PATH)\\lib\\gcc\\arm-none-symbianelf\\3.4.3\"",
+ 				"    CC_INSTALL_PATH=",$gccinstallpath,"\n",
+				"    STATIC_LIBS = \$(STATIC_LIBS_PATH)\"\$(CC_INSTALL_PATH)/arm-none-symbianelf/lib\" \$(STATIC_LIBS_PATH)\"\$(CC_INSTALL_PATH)/lib/gcc/arm-none-symbianelf/3.4.3\"",
 				"\nendif\n"
 			);
 
@@ -232,11 +214,11 @@
 		# when the MAP option is supplied
 		&main::Output(
 			"ifdef LINKER_SYMBOLS_MAP_OPTION\n",
-			"\tUREL_MAP_FILE=\"\$(EPOCTRGUREL)\\$Trg.map\"\n",
-			"\tUDEB_MAP_FILE=\"\$(EPOCTRGUDEB)\\$Trg.map\"\n",
+			"    UREL_MAP_FILE=\"\$(EPOCTRGUREL)/$Trg.map\"\n",
+			"    UDEB_MAP_FILE=\"\$(EPOCTRGUDEB)/$Trg.map\"\n",
 			"else\n",
-			"\tUREL_MAP_FILE=\n",
-			"\tUDEB_MAP_FILE=\n",
+			"    UREL_MAP_FILE=\n",
+			"    UDEB_MAP_FILE=\n",
 			"endif\n\n"
 		);
 
@@ -437,7 +419,7 @@
 		if ($BasicTrgType !~ /IMPLIB/io) {
 			&main::Output (
 				" \\\n\t",
-				&Generic_Quote("\$(EPOCTRG$_)\\$Trg")
+				&Generic_Quote("\$(EPOCTRG$_)/$Trg")
 			);
 		}
 
@@ -472,7 +454,7 @@
 		unless (&main::ExportUnfrozen) {
 			if (-e $DefFile) { # effectively "if project frozen ..."
 				&main::Output(
-					" ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.dso"), "\n"
+					" ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.dso"), "\n"
 				);
 			}
 			else {
@@ -485,32 +467,34 @@
 		} 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\n",
 			"\n",
-			&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), " : ",
+			&Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), " : ",
 			&Generic_Quote($DefFile), "\n",
-				"\tcopy ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
-				"\telf2e32 --definput=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" --dso=",
-				&Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"),
+				"\tcp ", &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"
 			);
 		}
 	}
@@ -546,7 +530,7 @@
 	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",
@@ -554,11 +538,11 @@
 	);
 	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"
 			);
 		}
 	}
@@ -682,19 +666,19 @@
 	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")
 		);
 	}
-        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList);
+        PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)/\$_\"\)", @StatLibList);
         my @ImportLibList = ImportLibraryList(@LibList);
-		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @ImportLibList);
+		PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @ImportLibList);
         
         my $StaticRTLib = "usrt2_2" ;
         # use ksrt for system code and for user ARM code
         $StaticRTLib = "ksrt2_2" 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)) {
@@ -704,7 +688,7 @@
 			foreach (@RTLibList) {
 				&main::Output(
 					" \\\n\t",
-					&Generic_Quote("\$(EPOCLIB)\\LIB\\$_")
+					&Generic_Quote("\$(EPOCLIB)/lib/$_")
 				) unless ($_ =~ /$TargLib/i);
 			}
 	    }
@@ -737,7 +721,7 @@
 
 	        &main::Output(
 		        " \\\n\t",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o")
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o")
 		      );
 
 		    $objectFiles .= &main::BldPath.$BaseSrc.".o\n";
@@ -748,7 +732,7 @@
 	);
 
            &main::Output(
-		     &Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"),
+		     &Generic_Quote("\$(EPOCTRG$Bld)/$Trg"),
 		     " : \$(OBJECTS$Bld)"
 		);
 
@@ -759,7 +743,7 @@
 	}
 #	if ($BasicTrgType=~/^(EXE|DLL)$/o) {
 #		&main::Output(
-#			" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$FirstLib")
+#			" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$FirstLib")
 #		);
 #	}
 #	&main::Output(
@@ -769,7 +753,7 @@
 	my $IsCustomDll = IsCustomDllUseCase($Trg);
 	if($BasicTrgType=~/^DLL$/o && $IsCustomDll eq 1)
 	{
-		&main::Output( "\t\$(EPOCBLD$Bld)\\$ExportLibrary.exp " );
+		&main::Output( "\t\$(EPOCBLD$Bld)/$ExportLibrary.exp " );
 	}
 
     &main::Output("\n");
@@ -778,7 +762,7 @@
 #       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"
 		);	
 		}
 
@@ -843,7 +827,7 @@
 	            }
 
 	            &main::Output(
-					" \$(EPOCSTATLINK$Bld)\\$FirstLib",
+					" \$(EPOCSTATLINK$Bld)/$FirstLib",
 					"$ObjFile",
 					" \\\n"
 				);
@@ -855,14 +839,14 @@
 			    }
 				
 			    &main::Output(
-				" \$(EPOCSTATLINK$Bld)\\$FirstLib",
+				" \$(EPOCSTATLINK$Bld)/$FirstLib",
 				"$ObjFile",
 				" \\\n"	
 					);
 			}
 
 	        &main::Output(
-		        "\t\t\$(OUTPUT_OPTION) \"\$(EPOCBLD$Bld)\\$Trg\" \\\n",
+		        "\t\t\$(OUTPUT_OPTION) \"\$(EPOCBLD$Bld)/$Trg\" \\\n",
 #				"\t\t\$(OBJECTS$Bld) \\\n"
 			);
 		
@@ -877,7 +861,7 @@
 
 			if($BasicTrgType=~/^DLL$/o && $IsCustomDll eq 1)
 			{
-				&main::Output( "\t\t\$(EPOCBLD$Bld)\\$ExportLibrary.exp \\\n" );
+				&main::Output( "\t\t\$(EPOCBLD$Bld)/$ExportLibrary.exp \\\n" );
 			}
 
 	        &main::Output(
@@ -887,12 +871,12 @@
 
 	        if ($Bld=~/^U?DEB$/o) {
 	               &main::Output(
-			       "\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$BaseTrg.sym\"\n"
+			       "\tcp \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$BaseTrg.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",
 			);
 		}
 				
@@ -995,16 +979,18 @@
 		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\""
 					);
 			}
+			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 ');
@@ -1012,13 +998,13 @@
 			}
 		#the input elf file - as the last arg
 		&main::Output(
-			" --elfinput=","\"\$(EPOCBLD$Bld)\\$Trg\"",
+			" --elfinput=","\"\$(EPOCBLD$Bld)/$Trg\"",
 			" --linkas=$LinkAs"
 			);
 
 		&main::Output(
 #		" --uncompressed",
- 		" --libpath=", "\"\$(EPOCLIB)\\LIB\""
+ 		" --libpath=", "\"\$(EPOCLIB)/lib/\""
  		);
 
 		if($BasicTrgType=~/^DLL/ && $TrgType!~/^DLL/){
@@ -1044,7 +1030,7 @@
 	        &main::Output(
 			"\t\$(ARCHIVER) ",
 				" \$(ARCHIVER_CREATE_OPTION) ",
-				" \$(EPOCSTATLINK$Bld)\\$Trg \$(OBJECTS$Bld)\n"
+				" \$(EPOCSTATLINK$Bld)/$Trg \$(OBJECTS$Bld)\n"
 			);
          }
 
@@ -1054,20 +1040,20 @@
 
 	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) {
 		    &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); 
 
@@ -1077,17 +1063,17 @@
 	if($BasicTrgType=~/^DLL$/o && $IsCustomDll eq 1)
 	{
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), ": $DefFile\n");
+			&Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), ": $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)\\$ExportLibrary.s \n",
-		"\t$theAssembler \\\n\t\t \$(OUTPUT_OPTION) \$(EPOCBLD$Bld)\\$ExportLibrary.exp  \$(EPOCBLD)\\$ExportLibrary.s\n\n"	    
+		"\telf2e32  \\\n\t\t--definput=$theDefFile \\\n\t\t--dump=a \\\n\t\t--output=\$(EPOCBLD)/$ExportLibrary.s \n",
+		"\t$theAssembler \\\n\t\t \$(OUTPUT_OPTION) \$(EPOCBLD$Bld)/$ExportLibrary.exp  \$(EPOCBLD)/$ExportLibrary.s\n\n"	    
 	    );
 		&main::Output(
-			"\t-\$(ERASE) \"\$(EPOCBLD)\\$ExportLibrary.s\"\n\n"
+			"\t-\$(ERASE) \"\$(EPOCBLD)/$ExportLibrary.s\"\n\n"
 		);
 	}
 
@@ -1218,16 +1204,16 @@
 		if ($tranasm)
 		{
 			&main::Output(
-				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " ",
+				&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " ",
 			) if $cia;
 		}
 
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$_)\\$BaseObj.cpp"), " ",
+			&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(
@@ -1276,17 +1262,17 @@
 	if ($tranasm)
 	{
 		&main::Output(
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " ",
+			&Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " ",
 		) if $cia;
 	}
 
 	&main::Output(
-		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.cpp"), " ",
+		&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"), " :",
 	);
 
 	my $prefix_file=getConfigVariable('PREFIXFILE');
@@ -1317,7 +1303,7 @@
 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="";
@@ -1344,7 +1330,7 @@
 	my $ABI=&main::ABI;
 	my $BaseSrc=&main::BaseSrc;
 	my $Bld=&main::Bld;
-	my $Src=ucfirst lc &main::Src;
+	my $Src=&main::Src;
 	my $SrcPath=&main::SrcPath;
 	my $Ext = &main::Path_Split('Ext', $Src);
 	my $LangOptions = &SelectLangOptions($Ext);
@@ -1359,10 +1345,10 @@
 	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\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n",
+			"\t\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n",
 			"\n"
 			);
 # rule to translate the preprocessed source
@@ -1370,59 +1356,59 @@
 			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",
-#			"\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)\\$BaseSrc.pre\n",
+				"\t\$(TRANASM) \$(TRANASM_FLAGS) \$(TRANASM_OUTPUT_OPTION)\$\@ \$(TRANASM_INPUT_OPTION)\$(EPOCBLD$Bld)/$BaseSrc.pre\n",
+#			"\ttranasm.bat -n -s -o=\$\@ \$(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) -E $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) $RTWSrcPath\\$Src \$(OUTPUT_OPTION) \$\@ \n",
+			"\t\$(CC$Bld) -E $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) $RTWSrcPath/$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\_.$ABI.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(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)"," $RTWSrcPath \$(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) -E $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) $RTWSrcPath\\$Src \$(OUTPUT_OPTION) \$\@ \n",
+			"\t\$(CC$Bld) -E $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) $RTWSrcPath/$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\_.$ABI.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(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)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\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)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $RTWSrcPath\\$Src\n",
+			"\t\$(CC$Bld) $lfboption $LangOptions ", "\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $RTWSrcPath/$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.$ABI.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)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $RTWSrcPath\\$Src \n",
+			"\t\$(CC$Bld) $LangOptions ","\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $RTWSrcPath/$Src \n",
 			"\n"
 			);
 	}
@@ -1434,7 +1420,7 @@
 	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 = &main::SelectLangOptions($Ext);
@@ -1453,12 +1439,12 @@
 # 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");
@@ -1473,21 +1459,21 @@
 		}
 		&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.bat -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) -E $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) $RTWSrcPath\\$Src \$(OUTPUT_OPTION) \$\@ \n",
+			"\t\$(CC$Bld) -E $preinclude $LangOptions ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) $RTWSrcPath/$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\_.$ABI.lst"),
 			"\n",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ",
-			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n",
-			"\t\$(CC$Bld) $LangOptions ", "\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(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)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n",
 			"\n"
 			);
 	} else {
@@ -1499,7 +1485,7 @@
 #                      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 = ");
@@ -1519,12 +1505,12 @@
 		}
 #		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.$ABI.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)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $RTWSrcPath\\$Src \n",
+			"\t\$(CC$Bld) $LangOptions ","\$(ASSEMBLER_LISTING_OPTION) ","\$(INCLUDE_OPTION)"," $RTWSrcPath \$(INCDIR) \$(OUTPUT_OPTION) \$\@ $RTWSrcPath/$Src \n",
 			"\n"
 			);
 	}
@@ -1663,14 +1649,13 @@
 	while(<PIPE>)
 	{
 		$gccInstallPath = $_;
-		$gccInstallPath =~ s/\//\\/g;
 	}
 	close PIPE;
 
 #	Extract the path till the occurence of bin directory.
-	my @Installpath = split(/\\\.\./, $gccInstallPath);
+	my @Installpath = split(/\/lib\/gcc/, $gccInstallPath);
 
-	return @Installpath[0];
+	return $Installpath[0];
 }
 
 my %BSF_keywords = (
@@ -1762,7 +1747,7 @@
 	if($Plat eq "GCCE")
 	{
 		my $gcc_install_path=GCCInstallPath;
-		return "$gcc_install_path\\..\\lib\\gcc\\arm-none-symbianelf\\3.4.3\\include";
+		return "$gcc_install_path/lib/gcc/arm-none-symbianelf/3.4.3/include";
 	}
 	else
 	{
diff -urN tools_orig/cl_codewarrior.pm tools/cl_codewarrior.pm
--- tools_orig/cl_codewarrior.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/cl_codewarrior.pm	2007-04-07 01:23:49.000000000 +0300
@@ -4,7 +4,7 @@
 #
 
 
-package Cl_codewarrior;
+package cl_codewarrior;
 
 # declare variables global for module
 my @Win32LibList=();
@@ -40,9 +40,9 @@
 	PMEndSrcList
 );
 
-use Winutl;
+use winutl;
 use cl_generic;
-use E32Variant;
+use e32variant;
 
 sub RoundUp1k($) {
 	# Accept C hexadecimal number (0xNNN).  Convert argument to Kb
@@ -141,7 +141,7 @@
 	my $TrgDir="";
 	my $AifTrgDir="";
 	if (&Generic_Definition("TRGDIR") ne "") {
-		$TrgDir="\$(TRGDIR)\\";
+		$TrgDir="\$(TRGDIR)/";
 		$AifTrgDir=$TrgDir;
 	}
 
@@ -172,7 +172,7 @@
 			" \\\n -i \"$_\""
 		);
 	}
-	use Pathutl;
+	use pathutl;
 	if($VariantFile){
 	    my $variantFilePath = Path_Split('Path',$VariantFile);
 	    $VariantFile  = Path_Split('FILE',$VariantFile);
@@ -234,7 +234,7 @@
 
 	foreach (@BldList) {
 		&main::Output(
-			"CW$_ = $MWCC"
+			"CW$_ = wine $MWCC"
 		);
 		if (/DEB$/o) {
 			&main::Output(
@@ -277,12 +277,12 @@
 		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")
 				);
 			}
 		}
@@ -309,7 +309,7 @@
 
 		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",
@@ -320,7 +320,7 @@
 
 		my $ResourceRef;
 		foreach $ResourceRef (@$ResourceStructRef) {
-			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
@@ -331,7 +331,7 @@
 
 		my $AifRef;
 		foreach $AifRef (@$AifStructRef) {
-			my $file="\$(EPOCTRG$_)\\$AifTrgDir$$AifRef{Trg}";
+			my $file="\$(EPOCTRG$_)/$AifTrgDir$$AifRef{Trg}";
 			&Generic_MakeWorkFile($makework,$file);
 			&main::Output(
 				" \\\n",
@@ -368,26 +368,26 @@
 			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"
 			);
 		}
@@ -400,7 +400,7 @@
 	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"
 		);
 	}
 	&main::Output(
@@ -409,13 +409,13 @@
 	);
 	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;
 }
@@ -443,7 +443,7 @@
 	my $TrgPath=&main::TrgPath;
 	my $TrgType=&main::TrgType;
 
-	$uidfile = "$BaseTrg.UID";
+	$uidfile = "$BaseTrg.uid";
 
 	if ($Bld =~ /DEB/) {
 		@LibList=&main::DebugLibList;
@@ -456,12 +456,12 @@
 	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
 	#-------------
@@ -481,15 +481,15 @@
 				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) {
-				push @releaseables,"\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}";
+				push @releaseables,"\$(EPOCTRG$Bld)/$$ResourceRef{Trg}";
 			}
 			my $AifRef;
 			foreach $AifRef (@$AifStructRef) {
@@ -497,7 +497,7 @@
 			}
 		}
 		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?
@@ -543,7 +543,7 @@
 		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"
@@ -559,12 +559,12 @@
 	);
 	foreach (@StatLibList) {
 		&main::Output(
-			" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_")
+			" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$_")
 		);
 	}
 	foreach (@LibList) {
 		&main::Output(
-			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)\\$_")
+			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)/$_")
 		);
 	}
 	&main::Output(
@@ -586,14 +586,14 @@
 		$BaseSrc.='_' if (lc($Ext) eq '.cia');
    		&main::Output(
 			" \\\n",
-			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o")
+			"\t", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o")
    		);
    	}
 	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) {
@@ -601,7 +601,7 @@
 		# CodeWarrior IDE projects.
 		&main::Output(
 			" \\\n",
-			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg"."_UID_.o")
+			"\t", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseTrg"."_uid_.o")
 		);
 	}
 	&main::Output(
@@ -623,14 +623,14 @@
 # tools hack
 		unless (&main::Plat eq 'TOOLS') {
 			&main::OutFormat(
-				" \"\$(EPOCSTATLINK$Bld)\\$FirstLib\""
+				" \"\$(EPOCSTATLINK$Bld)/$FirstLib\""
 			);
 		}
 # tools hack end
 	}
 	foreach my $lib (@Win32LibList) {
-		 my $win32lib = $lib;    # take a copy, to avoid updating contents of Win32LibList!
-		$win32lib = "-l$win32lib" unless ($win32lib =~ /\\/);
+		my $win32lib = $lib;    # take a copy, to avoid updating contents of Win32LibList!
+		$win32lib = "-l$win32lib" unless ($win32lib =~ /\//);
 		&main::OutFormat(
 			" ",lc $win32lib
 		);
@@ -699,11 +699,11 @@
 		}
 		&main::Output(
 			"STAGE1_LINK_FLAGS$Bld= \$(COMMON_LINK_FLAGS$Bld) \$(LIBS$Bld) \\\n\t",
-			" -o \"\$(EPOCBLD$Bld)\\$Trg\"", 
+			" -o \"\$(EPOCBLD$Bld)/$Trg\"", 
 			' -export dllexport',
 			" $Include",
 			' -nocompactimportlib', 
-			" -implib \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"",
+			" -implib \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\"",
 			" -addcommand \"out:$Trg\" -warnings off",
 			"\n",
 		);
@@ -725,11 +725,11 @@
 	}
 	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"
 			);
 		}
@@ -761,7 +761,7 @@
 # tools hack
 		unless (&main::Plat eq 'TOOLS') {
 			&main::Output(
-				" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$FirstLib")
+				" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$FirstLib")
 			);
 		}
 	}
@@ -774,21 +774,21 @@
 #	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",
-			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$Trg\"\n",
+			"\twine $MWLD \$(STAGE1_LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
+			"\t\$(ERASE) \"\$(EPOCBLD$Bld)/$Trg\"\n",
 		);
 
 #		Generate an export info file
 		my $show_options = "names,verbose";
 		$show_options = "names,unmangled,verbose" if ($MWLD eq "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" );
@@ -809,15 +809,15 @@
 			$Ordinal++;
 		}
 		&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"
 		);
 	}
 
 #	Perform the final link step
 	&main::Output(
-		"\t$MWLD "
+		"\twine $MWLD "
 	);
 	if ($BasicTrgType=~/^LIB$/o) {
 		&main::Output(
@@ -839,7 +839,7 @@
 		&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(),
 		);
@@ -869,7 +869,7 @@
 
 	my $ChopTrgPath="";
 	if ($$BitMapRef{TrgPath}) {
-		$ChopTrgPath.="\\$$BitMapRef{TrgPath}";
+		$ChopTrgPath.="/$$BitMapRef{TrgPath}";
 		chop $ChopTrgPath;
 	}
 
@@ -878,7 +878,7 @@
 	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"
@@ -897,7 +897,7 @@
 
 	foreach my $Bld (@BldList) {
 		&main::Output(
-			&Generic_Quote("\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}"), " : ", 
+			&Generic_Quote("\$(EPOCTRG$Bld)/$$ResourceRef{Trg}"), " : ", 
 			&Generic_Quote("$$ResourceRef{GenericTrg}"), "\n",
 			"\t", &Generic_CopyAction(),
 			"\n"
@@ -914,7 +914,7 @@
 	my $AifRef=&main::AifRef;
 	my $TrgDir="";
 	if (&Generic_Definition("TRGDIR") ne "") {
-		$TrgDir="\\\$(TRGDIR)";
+		$TrgDir="/\$(TRGDIR)";
 	}
 
 	my @BldList=&main::BldList;
@@ -922,7 +922,7 @@
 	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"
@@ -944,13 +944,13 @@
 	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(
@@ -971,12 +971,12 @@
 	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(
@@ -991,7 +991,7 @@
 
 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;
@@ -1001,25 +1001,25 @@
 
 	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\"\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"
 		);
@@ -1046,7 +1046,7 @@
 		".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"
 	);
@@ -1075,7 +1075,7 @@
 		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 -urN tools_orig/cl_generic.pm tools/cl_generic.pm
--- tools_orig/cl_generic.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/cl_generic.pm	2007-04-07 01:23:49.000000000 +0300
@@ -38,10 +38,10 @@
 	
 	$MakefileType=($makefileType eq "nmake")? 0:1;
 
-	my $LibSubDir="UDEB";
+	my $LibSubDir="udeb";
 #regression hack
 	if (&main::PlatOS eq 'EPOC32') {
-		$LibSubDir="UREL";
+		$LibSubDir="urel";
 	}
 #regression hack end
 
@@ -86,10 +86,15 @@
 	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",
@@ -117,15 +122,16 @@
 	
 	my @BldList=&main::BldList;
 	foreach (@BldList) {
+		my $Bld2 = lc $_;
 		&main::Output(
 			"\n"
 		);
-		Generic_Define("EPOCBLD$_", "\$(EPOCBLD)\\$_");
-		Generic_Define("EPOCTRG$_", "\$(EPOCTRG)\\$_");
-		Generic_Define("EPOCLIB$_", "\$(EPOCLIB)\\$LibSubDir");
-		Generic_Define("EPOCLINK$_", "\$(EPOCLINK)\\$LibSubDir");
-		Generic_Define("EPOCSTATLINK$_", "\$(EPOCSTATLINK)\\$_");
-		Generic_Define("EPOCASSPLINK$_", "\$(EPOCASSPLINK)\\$LibSubDir");
+		Generic_Define("EPOCBLD$_", "\$(EPOCBLD)\/$Bld2");
+		Generic_Define("EPOCTRG$_", "\$(EPOCTRG)\/$Bld2");
+		Generic_Define("EPOCLIB$_", "\$(EPOCLIB)\/$LibSubDir");
+		Generic_Define("EPOCLINK$_", "\$(EPOCLINK)\/$LibSubDir");
+		Generic_Define("EPOCSTATLINK$_", "\$(EPOCSTATLINK)\/$Bld2");
+		Generic_Define("EPOCASSPLINK$_", "\$(EPOCASSPLINK)\/$LibSubDir");
 	}
 	
 	my $gccxml;
@@ -308,7 +314,7 @@
 		&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 
@@ -422,8 +428,8 @@
 	foreach $AifRef (@$AifStructRef) {
 # regression hack - 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");
@@ -431,7 +437,7 @@
 		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;
@@ -446,13 +452,13 @@
 	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;
 		}
@@ -461,12 +467,12 @@
 	my $ResourceStructRef=&main::ResourceStructRef;
 	my $ResourceRef;
 	foreach $ResourceRef (@$ResourceStructRef) {
-		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;
 		}
@@ -571,7 +577,7 @@
 
 	my $RTWSrcPath;
 	
-	my $ResrcHdr=join '', &main::EPOCIncPath(), $BaseResrc, '.RSG';
+	my $ResrcHdr=join '', &main::EPOCIncPath(), $BaseResrc, '.rsg';
 	my $RTWResrcHdr;
 	my $PlatName=&main::PlatName;
 
@@ -607,8 +613,8 @@
 	my $HeaderOption = "";
 	my $HeaderCopyCmd = "";
 	if ($$ResourceRef{Hdr}) {
-		$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";
 	}
 	
 	my $Uidsref=$$ResourceRef{Uids};
@@ -644,8 +650,9 @@
 			" -I \"$_\""
 		);
 	}
+	my $uclang = uc $$ResourceRef{Lang};
 	&main::Output(
-		" -DLANGUAGE_$$ResourceRef{Lang} -u \"$$ResourceRef{Source}\" ",
+		" -DLANGUAGE_$uclang -u \"$$ResourceRef{Source}\" ",
 		" $Uidsarg ",
 		"-o\$\@ $HeaderOption -t\"$SavedBldPath\"  -l\"$EPOCDataDir:$WorkPath\"\n",
 		$HeaderCopyCmd,
diff -urN tools_orig/cl_tools.pm tools/cl_tools.pm
--- tools_orig/cl_tools.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/cl_tools.pm	2007-04-07 01:23:49.000000000 +0300
@@ -243,7 +243,7 @@
 		"\n",
 		"CLEANLIBRARY :\n"
 	);
-	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}UDEB");
+	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}udeb");
 
 	&Generic_Releaseables;
 }
diff -urN tools_orig/cnvtool.pl tools/cnvtool.pl
--- tools_orig/cnvtool.pl	2006-04-19 17:15:56.000000000 +0300
+++ tools/cnvtool.pl	2007-04-07 01:23:49.000000000 +0300
@@ -734,7 +734,7 @@
 		$fileName=$1;
 		}
 	print($fileHandle "// $fileName\n//\n// Copyright (c) ".(1900+(gmtime(time))[5])." Symbian Ltd.  All rights reserved.\n//\n\n");
-	print($fileHandle "#include <E32STD.H>\n#include <CONVDATA.H>\n#include <CONVGENERATEDCPP.H>\n\n#define ARRAY_LENGTH(aArray) (sizeof(aArray)/sizeof((aArray)\[0\]))\n\n#pragma warning (disable: 4049) // compiler limit : terminating line number emission\n\n");
+	print($fileHandle "#include <e32std.h>\n#include <convdata.h>\n#include <convgeneratedcpp.h>\n\n#define ARRAY_LENGTH(aArray) (sizeof(aArray)/sizeof((aArray)\[0\]))\n\n#pragma warning (disable: 4049) // compiler limit : terminating line number emission\n\n");
 	if (!$omitReplacementForUnconvertibleUnicodeCharacters)
 		{
 		print($fileHandle "_LIT8(KLit8ReplacementForUnconvertibleUnicodeCharacters, \"".&hexadecimalify($replacementForUnconvertibleUnicodeCharacters)."\");\n\n");
diff -urN tools_orig/compilation_config/armv5_abiv2.mk tools/compilation_config/armv5_abiv2.mk
--- tools_orig/compilation_config/armv5_abiv2.mk	2005-12-16 19:04:40.000000000 +0200
+++ tools/compilation_config/armv5_abiv2.mk	2007-04-07 01:23:49.000000000 +0300
@@ -139,7 +139,7 @@
 #---------------------
 
 # Prefix Header File passed to the preprocessor
-PREFIXFILE=$(EPOCROOT)EPOC32\INCLUDE\RVCT2_2\RVCT2_2.h
+PREFIXFILE=$(EPOCROOT)epoc32/include/rvct2_2/rvct2_2.h
 
 # For .cpp Source files
 CPP_LANG_OPTION=--cpp
@@ -179,7 +179,7 @@
 
 # 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\RVCT2_2\RVCT2_2.h
+PREINCLUDE_OPTION=--preinclude $(EPOCROOT)epoc32/include/rvct2_2/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.
diff -urN tools_orig/compilation_config/gcce.mk tools/compilation_config/gcce.mk
--- tools_orig/compilation_config/gcce.mk	2006-02-07 23:23:00.000000000 +0200
+++ tools/compilation_config/gcce.mk	2007-04-07 01:23:49.000000000 +0300
@@ -140,7 +140,7 @@
 #---------------------
 
 # 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++
@@ -180,14 +180,14 @@
 
 # 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
 
 # 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.
 HEADER_FILES_CONTROL_OPTION=-nostdinc
 
 # Path to pick the header files from the Compiler installation directory
-COMPILER_INCLUDE_PATH=$(CC_INSTALL_PATH)\lib\gcc\arm-none-symbianelf\3.4.3\include
+COMPILER_INCLUDE_PATH=$(CC_INSTALL_PATH)/lib/gcc/arm-none-symbianelf/3.4.3/include
 
 #---------------------
 # Release Mode Options
diff -urN tools_orig/defutl.pm tools/defutl.pm
--- tools_orig/defutl.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/defutl.pm	2007-04-07 01:23:49.000000000 +0300
@@ -8,7 +8,7 @@
 # General Def file utilities
 #---------------------------
 
-package Defutl;
+package defutl;
 
 require Exporter;
 @ISA=qw(Exporter);
diff -urN tools_orig/e32env.pm tools/e32env.pm
--- tools_orig/e32env.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/e32env.pm	2007-04-07 01:23:49.000000000 +0300
@@ -6,7 +6,7 @@
 # Contains information for makmake and associated e32tools perl programs
 # within the Epoc32 Environment
 
-package E32env;
+package e32env;
 
 
 use vars qw(%Data);
@@ -14,39 +14,28 @@
 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
 	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 slash\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{EPOCDataPath} = $epocroot."/epoc32/data/";
+	$Data{EPOCIncPath} = $epocroot."/epoc32/include/";
+	$Data{BldPath} = $epocroot."/epoc32/build/";
 #regression hack
-#	$Data{LinkPath} = $epocroot."\\EPOC32\\LIBRARY\\";
-	$Data{LinkPath} = $epocroot."\\EPOC32\\RELEASE\\";
+#	$Data{LinkPath} = $epocroot."/epoc32/library/";
+	$Data{LinkPath} = $epocroot."/epoc32/release/";
 #regression hack end
-	$Data{RelPath} = $epocroot."\\EPOC32\\RELEASE\\";
-	$Data{EPOCToolsPath} = $epocroot."\\EPOC32\\TOOLS\\";
-	$Data{RomPath} = $epocroot."\\EPOC32\\ROM\\";
+	$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 -urN tools_orig/e32plat.pm tools/e32plat.pm
--- tools_orig/e32plat.pm	2006-05-30 13:32:20.000000000 +0300
+++ tools/e32plat.pm	2007-04-07 01:23:49.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # E32PLAT.PM
 #
 # Copyright (c) 1997-2005 Symbian Ltd.  All rights reserved.
@@ -9,7 +11,7 @@
 #
 # all data is uppercase
 
-package E32Plat;
+package e32plat;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -24,9 +26,9 @@
 	Plat_Customizes
 );
 
-use Winutl;
-use Armutl;
-use BPABIutl;
+use winutl;
+use armutl;
+use bpabiutl;
 
 my %Mode=(
 	Verbose=>0
@@ -40,7 +42,8 @@
 my %BldLists=(
 	EPOC32=>['UREL','UDEB'],
 	WINS=>['UDEB','UREL'],
-	TOOLS=>['DEB','REL']
+	TOOLS=>['DEB','REL'],
+	linux=>['UDEB','UREL']
 );
 
 my %BldMacros=(
@@ -134,7 +137,7 @@
 		Compiler=>'VC32',
 		CPU=>'WINS',
 		MakeMod=>'Cl_win',
-		MakeCmd=>'nmake',
+		MakeCmd=>'make',
 		OS=>'WINS',
 	},
 	VC6=>{
@@ -274,7 +277,7 @@
 
 	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(
@@ -300,6 +303,7 @@
             }
             my $custom;
             while ($custom = <FILE>) {
+                	$custom =~ s/\r$//; # skip trailing cr
                 	#skip blank lines and comments
 			delete $Plat{$BSF};
                 	last unless ($custom =~ /^$|^\#/);
@@ -354,7 +358,15 @@
 
 #	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;
@@ -366,7 +378,7 @@
 
 			next;
 		}
-		push @ASSPs, $_;
+		push @ASSPs, lc $_;
 	}
 
 #	open each module in turn, and add it to the array
@@ -398,6 +410,8 @@
 			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";
@@ -446,7 +460,8 @@
 
 sub Plat_GetL ($$$) { # takes Platform name, ref to plat hash, ref to bldmacrohash
 	my ($Candidate,$PlatHash_ref,$BldMacrosHash_ref)=@_;
-	$Candidate=uc $Candidate;
+
+	$Candidate = uc $Candidate;
 
 # is platform in our list?
 	unless (defined $Plat{$Candidate}) {
@@ -492,7 +507,7 @@
 		$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};
@@ -601,6 +616,8 @@
 #	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 -urN tools_orig/e32tpver.pm tools/e32tpver.pm
--- tools_orig/e32tpver.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/e32tpver.pm	2007-04-07 01:23:49.000000000 +0300
@@ -6,7 +6,7 @@
 
 # Returns the version number for E32TOOLP - update for each release
 
-package E32tpver;
+package e32tpver;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
diff -urN tools_orig/e32variant.pm tools/e32variant.pm
--- tools_orig/e32variant.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/e32variant.pm	2007-04-07 01:23:49.000000000 +0300
@@ -2,7 +2,7 @@
 #
 # Copyright (c) 2004 Symbian Ltd.  All rights reserved.
 #
-package E32Variant;
+package e32variant;
 
 require Exporter;
 
@@ -10,7 +10,7 @@
 
 @EXPORT = qw(Variant_GetMacroList Variant_GetMacroHRHFile);
 
-use Pathutl;
+use pathutl;
 
 # using $FindBin::Bin to figure out the location of the epoc32\tools directory as 
 # IDE doesn't understand env{EPOCROOT}
@@ -20,7 +20,7 @@
 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
@@ -29,16 +29,16 @@
 
 #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 
 
@@ -49,13 +49,15 @@
 	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;
 	    }
 	}
@@ -65,18 +67,15 @@
 	$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;
 }
@@ -87,9 +86,9 @@
 
     my @macros = ();
     my $vfile = Variant_GetMacroHRHFile();
-    
+
     if($vfile)
-    {   
+    {
 	$vfile = &Path_RltToWork($vfile);
 	open CPPPIPE,"cpp -undef -dM $vfile |" or die "ERROR: Can't invoke CPP.EXE\n";
 	while(<CPPPIPE>){
diff -urN tools_orig/efreeze.pl tools/efreeze.pl
--- tools_orig/efreeze.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/efreeze.pl	2007-04-07 01:23:49.000000000 +0300
@@ -19,14 +19,13 @@
 	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 E32tpver;
-use Pathutl;
+use defutl;
+use e32tpver;
+use pathutl;
 
 
 # THE MAIN PROGRAM SECTION
diff -urN tools_orig/elf2e32 tools/elf2e32
--- tools_orig/elf2e32	1970-01-01 02:00:00.000000000 +0200
+++ tools/elf2e32	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/epoc tools/epoc
--- tools_orig/epoc	1970-01-01 02:00:00.000000000 +0200
+++ tools/epoc	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/epoc.pl tools/epoc.pl
--- tools_orig/epoc.pl	2004-08-24 22:42:18.000000000 +0300
+++ tools/epoc.pl	2007-04-07 01:23:49.000000000 +0300
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 #
 # Launcher for the Symbian Emulator, including
 # functionality to read the $ENV{EPOCROOT}epoc32\data\BuildInfo.txt
@@ -107,8 +108,8 @@
 
     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" .
@@ -117,7 +118,7 @@
 		    "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
@@ -137,8 +138,8 @@
     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) ||
@@ -205,11 +206,9 @@
     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 -urN tools_orig/epocaif.pl tools/epocaif.pl
--- tools_orig/epocaif.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/epocaif.pl	2007-08-11 01:53:24.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # epocaif.pl
 #
 # Copyright (c) Symbian Software Ltd 2001  2004.  All rights reserved.
@@ -18,12 +20,11 @@
 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
 	{
@@ -39,9 +40,9 @@
    -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 
@@ -108,7 +109,7 @@
 		next;
 		}
 
-	if ($arg =~ /^-t(.*)\\?$/)
+	if ($arg =~ /^-t(.*)\/?$/)
 		{
 		$tmpdir =$1;
 		next;
@@ -151,8 +152,8 @@
 
 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)
@@ -176,7 +177,7 @@
     $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);
@@ -187,7 +188,6 @@
 my $cpp_status = $?;
 die "* cpp failed\n" if ($cpp_status != 0);
 
-
 #-------------------------------------------------------
 # Copy source to epoc32\localisation
 #
@@ -209,7 +209,8 @@
 #
 
 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);
@@ -230,15 +231,19 @@
 
 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)
 		{
@@ -248,23 +253,23 @@
 	}
 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);
@@ -279,8 +284,8 @@
 # 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);
@@ -301,17 +306,17 @@
 	}
 
 
-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)
@@ -319,10 +324,10 @@
 	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));
@@ -330,15 +335,15 @@
 	{
 	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");
@@ -346,23 +351,23 @@
 	{
 	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;
 
 #-------------------------------------------------------
@@ -372,7 +377,7 @@
 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 -urN tools_orig/epocmbm.pl tools/epocmbm.pl
--- tools_orig/epocmbm.pl	2006-03-06 23:41:42.000000000 +0200
+++ tools/epocmbm.pl	2007-04-07 01:23:49.000000000 +0300
@@ -14,7 +14,7 @@
 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;
@@ -89,8 +89,12 @@
 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 -urN tools_orig/epocrc.pl tools/epocrc.pl
--- tools_orig/epocrc.pl	2006-03-06 23:41:42.000000000 +0200
+++ tools/epocrc.pl	2007-08-12 00:11:19.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # epocrc.pl
 #
 # Copyright (c) 2000-2005 Symbian Ltd.  All rights reserved.
@@ -17,13 +19,12 @@
 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
 	{
@@ -169,7 +170,7 @@
 		}
 	if ($arg =~ /^-t(.*)\\?$/)
 		{
-		$tmpdir ="$1\\";
+		$tmpdir ="$1\/";
 		next;
 		}
 	if ($arg =~ /^-l(.*)$/)
diff -urN tools_orig/eshell tools/eshell
--- tools_orig/eshell	1970-01-01 02:00:00.000000000 +0200
+++ tools/eshell	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/eshell.pl tools/eshell.pl
--- tools_orig/eshell.pl	2006-06-05 18:33:00.000000000 +0300
+++ tools/eshell.pl	2007-04-07 01:23:49.000000000 +0300
@@ -1,3 +1,4 @@
+#!/usr/bin/perl -w
 #
 # Eshell Launcher
 #
@@ -98,8 +99,8 @@
     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" .
@@ -109,7 +110,7 @@
 			"must end with a backslash.\n";
 			
     # 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
@@ -131,11 +132,9 @@
     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 -urN tools_orig/extmake tools/extmake
--- tools_orig/extmake	1970-01-01 02:00:00.000000000 +0200
+++ tools/extmake	2007-08-11 23:24:21.000000000 +0300
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+wine make $*
+
diff -urN tools_orig/fixupsym.pl tools/fixupsym.pl
--- tools_orig/fixupsym.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/fixupsym.pl	2007-04-07 01:23:49.000000000 +0300
@@ -406,7 +406,7 @@
   {
 	my $build;
 	
-	&Load_ModuleL('E32TPVER');
+	&Load_ModuleL('e32tpver');
 	print "\nfixupsym - " .
 	  "Fix up executables with locations taken from a ROM image (Build ",
 	  &E32tpver, ")\n";
diff -urN tools_orig/genbldinf.pl tools/genbldinf.pl
--- tools_orig/genbldinf.pl	1970-01-01 02:00:00.000000000 +0200
+++ tools/genbldinf.pl	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/genutl.pm tools/genutl.pm
--- tools_orig/genutl.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/genutl.pm	2007-04-07 01:23:49.000000000 +0300
@@ -6,7 +6,7 @@
 
 # Contains utility subroutines for MAKMAKE and associated scripts
 
-package Genutl;
+package genutl;
 
 require Exporter;
 @ISA=qw(Exporter);
diff -urN tools_orig/hpsym.pl tools/hpsym.pl
--- tools_orig/hpsym.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/hpsym.pl	2007-04-07 01:23:49.000000000 +0300
@@ -161,7 +161,7 @@
   {
 	my $build;
 
-	&Load_ModuleL('E32TPVER');
+	&Load_ModuleL('e32tpver');
 	print "\nhpsym - Produce symbolic info in \"HP GPA Symbol File Format\"" .
 	  " suitable for use\n        with a HP logic analyser (Build ",
 	  &E32tpver, ")\n";
diff -urN tools_orig/ide_cw.pm tools/ide_cw.pm
--- tools_orig/ide_cw.pm	2006-05-30 13:32:18.000000000 +0300
+++ tools/ide_cw.pm	2007-04-07 01:23:49.000000000 +0300
@@ -1261,7 +1261,7 @@
 		$UidText.=")\n";
 		$UidText.="#pragma data_seg()\n";
 
-		$UIDFile = $BaseTrg.'_UID_.cpp';
+		$UIDFile = $BaseTrg.'_uid_.cpp';
 		&main::CreateExtraFile("${ExtraFilesPath}$UIDFile", $UidText);
 		}
 
diff -urN tools_orig/lockit_info.pm tools/lockit_info.pm
--- tools_orig/lockit_info.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/lockit_info.pm	2007-04-07 01:23:49.000000000 +0300
@@ -22,7 +22,7 @@
 	Close_InfoFile
 );
 
-use Pathutl;
+use pathutl;
 my $epocroot;
 my $epocPath;
 
@@ -30,15 +30,15 @@
 	{
 	$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";
 	}
 
 
@@ -48,14 +48,14 @@
 	my ($ResrcFile, $RppFile,$Resrc_Options, $FileType, $Bitmaps, $RscTarget)= @_;
 	$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 = 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");
 
 	# update bitmaps in epoc32\localisation if -l option and bitmaps specified
 	if ($CWDir && ($Bitmaps ne ""))
@@ -67,12 +67,12 @@
 
 		my (@AifBitmaps) = split(/ /, $Bitmaps);
 		foreach $BmpRef (@AifBitmaps) {
-			$BmpRef =~ /^([^\\]+)(\\.*)$/;
+			$BmpRef =~ m|^(/[^\/]+)(\/.*)$|i;
 			my $CDepth = $1;
 			my $bmp = $2;
 			Copy_Files($bmp, $FilePath);
 			my $file_base= basename($bmp);
-			chmod (0666,"$FilePath\\$file_base");
+			chmod (0666,"$FilePath\/$file_base");
 		}
 	}
 
@@ -80,17 +80,17 @@
 	{
 		Open_InfoFile($ResrcFile);
 
-		WriteTo_Info ( "\n\\$Tgtdir\\$RscTarget :" );
+		WriteTo_Info ( "\n/$Tgtdir/$RscTarget :" );
 
 		if($FileType =~ /RSC/i && $RppFile ne "") {
 			WriteTo_Info (
-				 " $ResrcFile.RPP"
+				 " $ResrcFile.rpp"
 			)
 		}
 
 		elsif ($RppFile ne "") {
 			WriteTo_Info (
-				 " $ResrcFile.TEXT $ResrcFile.STRUCT"
+				 " $ResrcFile.text $ResrcFile.struct"
 			)
 		}
 
@@ -99,12 +99,12 @@
 			my $BmpRef;
 			my (@AifBitmaps) = split(/ /, $Bitmaps);
 			foreach $BmpRef (@AifBitmaps) {
-				$BmpRef =~ /^([^\\]+)(\\.*)$/;
+				$BmpRef =~ m|^(/[^\/]+)(\/.*)$|i;
 				my $CDepth = $1;
 				my $bmp = $2;
 				my $file_base= basename($bmp);
 				WriteTo_Info (
-					 " $CDepth\\$file_base"
+					 " $CDepth\/$file_base"
 				);
 			}
 		}
@@ -118,7 +118,6 @@
 sub Copy_Files ()
 	{
 	my ($SourceName, $TargetName) = @_;
-
 	copy($SourceName, $TargetName);
 	}
 
@@ -127,9 +126,9 @@
 	{
 	my ($CreateLockitPath, $CreateInfoFile, $Datadir) = @_;
 	if ( !-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;
 	}
@@ -139,7 +138,7 @@
 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";
 	}
 
 
@@ -158,7 +157,7 @@
 	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; } 
 		}
@@ -171,28 +170,29 @@
 sub Setup_LockitPath
 	{
 	my ($ComponentSrcPath, $Resrc, $FileType) = @_;
-	my ($temp, $CWDir) = split(/\\/, $ComponentSrcPath);
+	my ($temp, $CWDir) = split(/\//, $ComponentSrcPath);
 	my $FilePath = $epocPath;
 
 	if($FileType =~ /RSS/i) { $FileType = "rsc"; }
+	if($FileType =~ /RSC/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 = ""; 
+	my $WorkPath = "";
 
 	if($Resrc !~ /^$CWDir$/i) {
-		$WorkPath = "$Resrc"; 
+		$WorkPath = "$Resrc";
 	}
 
-	$FilePath .= "\\$WorkPath\\$FileType";
+	$FilePath .= "\/$WorkPath\/$FileType";
 
-	&Create_InfoFile("$FilePath", "$Resrc", "\\$WorkPath");
+	&Create_InfoFile("$FilePath", "$Resrc", "\/$WorkPath");
 
 	return $FilePath;
 	}
@@ -206,19 +206,19 @@
 	my $Resrc = basename($ResrcFile);
 	my ($BaseResrc,$FileType) = split(/\./, $Resrc);
 	Check_Epocroot();
-	my $LockitInfoPath = uc("$epocPath\\GROUP\\$BaseResrc.INFO");
+	my $LockitInfoPath = "$epocPath/group/$BaseResrc.info";
 
 	my $LockitPath = Setup_LockitPath($ComponentSrcPath, $BaseResrc, $FileType);
 	my %Files = %$href;
 
-	$Bitmaps = uc($Bitmaps);
+#	$Bitmaps = uc($Bitmaps);
 	if($FileType =~ /RSS|ACL|ABW|AIF|A[0-9]/i && $Bitmaps eq ""){
-		$LockitPath .= "\\$BaseResrc.RPP";
+		$LockitPath .= "/$BaseResrc.rpp";
 	}
 	else {
-		$LockitPath .= "\\$Bitmaps";
+		$LockitPath .= "/$Bitmaps";
 	}
-	$LockitPath = uc($LockitPath);
+#	$LockitPath = uc($LockitPath);
 	$Files{$LockitPath} =1;
 	$Files{$LockitInfoPath} =1;
 	return %Files;
diff -urN tools_orig/makdeps.pm tools/makdeps.pm
--- tools_orig/makdeps.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/makdeps.pm	2007-04-07 01:23:49.000000000 +0300
@@ -7,7 +7,7 @@
 # Module which wraps the dependency information provided the preprocessor when invoked with certain switches
 # so that dependency information rather than preprocessing information is produced.
 
-package Makdeps;
+package makdeps;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
@@ -23,9 +23,9 @@
 	Deps_SetPrefixFile
 );
 
-use Checkgcc;
-use Pathutl;
-use Preprocessor;
+use checkgcc;
+use pathutl;
+use preprocessor;
 
 
 my $ChopSysDecoyPath;
@@ -58,7 +58,7 @@
 	# Use random number to ensure DecoyPath is unique (ish)
 	srand();
 	my $randnum=int(rand(100));
-	$SysDecoyPath=&Path_WorkPath."TEMPMAKSYSDECOY$randnum\\";	
+	$SysDecoyPath=&Path_WorkPath."TEMPMAKSYSDECOY$randnum/";
 	$S_SysDecoyPath=quotemeta($SysDecoyPath);
 	$ChopSysDecoyPath=&Path_Chop($SysDecoyPath);
 }
@@ -72,7 +72,7 @@
 # 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;
@@ -96,7 +96,7 @@
 	@SysFlags=&Path_Chop(&Path_RltToWork(@SysPaths)); # newer gcc doesn't like trailing backslash
 	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
@@ -116,6 +116,7 @@
 	my $Flag;
 	foreach $Flag (@PlatMacros) {
 		$Flag=~s/^(.*)$/-D$1/o;
+		$Flag = uc $Flag; # force uppercase for macros
 	}
 }
 
@@ -185,12 +186,11 @@
 		while (/\s(\S+)/go) {
 			my $dep = $1;
 			$dep =~ s/;/ /go;	# spaces were turned into semicolon, so convert back again here
-			$dep =~ s-/-\\-go;	# replace forward slashes with backward slashes
 			$dep =~ s/^.\://;
 			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;
@@ -246,12 +246,12 @@
 	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;
 			}
@@ -296,6 +296,11 @@
 					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;
 		}
@@ -322,7 +327,7 @@
 		my $GenHdr=0;
 		foreach $Bad (@BadUserList) {
 			print STDERR " \"$Bad\"";
-			if ($File=~/\.(RSG|MBG)$/o) {
+			if ($File=~/\.(rsg|mbg)$/o) {
 				$GenHdr=1;
 			}
 		}
diff -urN tools_orig/makedef.pl tools/makedef.pl
--- tools_orig/makedef.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/makedef.pl	2007-04-07 01:23:49.000000000 +0300
@@ -21,13 +21,12 @@
 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 Defutl;
-use E32tpver;
-use Pathutl;
+use defutl;
+use e32tpver;
+use pathutl;
 use File::Copy;
 
 my %Options;	# command line option information
@@ -221,6 +220,7 @@
 	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
 		$LineNum++;
 		if ($InfType == 0) {
 			if ($Line =~ /\*\*\* ARCHIVE SYMBOL TABLE.* \*\*\*/o) {
@@ -261,6 +261,7 @@
 			if ($Line =~ /\*\*\* Unmangled Symbols \*\*\*/o) {
 				<FILE>; 
 				$Line = <FILE>; 
+				$Line =~ s/\r$//; # strip trailing cr
 				$LineNum+=2;
 				if ($Line !~ /^\s*\d+:\s+(\S+)$/o) {
 				    print STDERR "MAKEDEF WARNING: unknown inf file format\n";
@@ -272,6 +273,7 @@
 					$Name = $1;
 				}
 				$Line = <FILE>; 
+				$Line =~ s/\r$//; # strip trailing cr
 				$LineNum++;
 				next if ($Line !~ /^\s+(.+)$/o);
 				$Comment = $1;
diff -urN tools_orig/makekeys tools/makekeys
--- tools_orig/makekeys	1970-01-01 02:00:00.000000000 +0200
+++ tools/makekeys	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/makesis tools/makesis
--- tools_orig/makesis	1970-01-01 02:00:00.000000000 +0200
+++ tools/makesis	2007-04-07 01:23:49.000000000 +0300
@@ -0,0 +1,15 @@
+#!/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`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe $*
diff -urN tools_orig/makhelp.pm tools/makhelp.pm
--- tools_orig/makhelp.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/makhelp.pm	2007-04-07 01:23:49.000000000 +0300
@@ -4,7 +4,7 @@
 #
 
 
-package Makhelp;
+package makhelp;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
@@ -14,7 +14,7 @@
 );
 
 
-use E32tpver;
+use e32tpver;
 # also requires main module to have loaded platform module(s) and Modload.pm and Trgtype.pm
 
 sub Help_Invocation () {
@@ -26,7 +26,7 @@
 		"MAKMAKE {flags} [{MMPFilePath}MMPFileRoot] [Platform]\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",
@@ -87,7 +87,7 @@
 ASSPLIBRARY            [ASSP_libraries]
 CAPABILITY             [NONE | list of {-}CAPABILITY_NAME]
 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]
 EPOCALLOWDLLDATA
diff -urN tools_orig/makmake tools/makmake
--- tools_orig/makmake	1970-01-01 02:00:00.000000000 +0200
+++ tools/makmake	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/makmake.pl tools/makmake.pl
--- tools_orig/makmake.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/makmake.pl	2007-04-07 01:23:49.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # MAKMAKE.PL
 #
 # Copyright (c) 1997-2005 Symbian Software Ltd.  All rights reserved.
@@ -20,18 +22,17 @@
 	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 e32env;
+use e32plat;
+use e32variant;
+use genutl;
+use modload;
+use pathutl;
+use trgtype;
 
 # THE MAIN PROGRAM SECTION
 ##########################
@@ -60,7 +61,7 @@
 	$Options{makemakefile}='1' unless ($Options{mmp} || $Options{plat});
 
 	if ($Options{mmp} or $Options{plat}) {
-		eval { &Load_ModuleL('MAKHELP'); };
+		eval { &Load_ModuleL('makhelp'); };
 		die $@ if $@;
 	}
 
@@ -110,7 +111,7 @@
 	$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);
 
@@ -120,7 +121,7 @@
 		&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});
 	}
 }
 
@@ -180,10 +181,10 @@
 	# 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};
 	}
 }
 
@@ -287,7 +288,7 @@
 	# 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;
@@ -341,7 +342,8 @@
 		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;
@@ -359,11 +361,9 @@
 
 # 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 @SavedSysIncPaths = @SysIncPaths;
-	push @SysIncPaths, "$extraIncPath\\INCLUDE";
+	push @SysIncPaths, "$extraIncPath\/include";
 	&Deps_SetSysIncPaths(@SysIncPaths);
 
 	my $LoopAifRef;
@@ -503,16 +503,16 @@
 				}
 #				$RomFileType='primary[MAGIC]' if $Trg eq 'EKERN.EXE';
 #				$RomFileType='secondary[MAGIC]' if $Trg eq 'EFILE.EXE';
-				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;
 				}
 #				elsif ($TrgType{Name} =~ /EXE(|XP)/o) {
-#					$RomPath="Test\\";
+#					$RomPath="Test/";
 #				}
 				my $RomFile=$LinkAsBase;
 				if ($$ref{File}) {
@@ -527,7 +527,7 @@
 				}
 				$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");
@@ -537,7 +537,7 @@
 				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};
 				}
@@ -546,7 +546,7 @@
 					$RomFile=$$ref{File};
 				}
 				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");
@@ -617,7 +617,7 @@
     # set package to ignore warnings about missing .def file. 
     &Mmp_SetIgnoreMissingDef;
     
-    eval { &Mmp_ProcessL($E32env::Data{EPOCPath}, $MMPFILE, \%Plat); };
+    eval { &Mmp_ProcessL($e32env::Data{EPOCPath}, $MMPFILE, \%Plat); };
 	return $@ if $@;
 	my %EABIDef=%{&Mmp_Def};
 	
@@ -655,7 +655,7 @@
 	&Mmp_SetIgnoreMissingDef;
 	}
 
-	eval { &Mmp_ProcessL($E32env::Data{EPOCPath}, $MMPFILE, \%Plat); };
+	eval { &Mmp_ProcessL($e32env::Data{EPOCPath}, $MMPFILE, \%Plat); };
 	return $@ if $@;
 
 	%WarningLevel=&Mmp_WarningLevel;
@@ -725,14 +725,13 @@
 	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
-	$Path{Bld}=join('', &Path_Chop($E32env::Data{BldPath}), $BldInfPath, &Path_Split('Base',$MMPFILE), "\\$Plat{Real}\\");
+	$BldInfPath=~s-^(.*[^\/])$-$1\/-o;			# ensure workpath ends with a backslash
+	$Path{Bld}=join('', &Path_Chop($e32env::Data{BldPath}), $BldInfPath, &Path_Split('Base',$MMPFILE), "/", lc $Plat{Real}, "/");
 
 }
 
@@ -745,30 +744,30 @@
 	my $UnderlyingABI=$ABI;
 	$UnderlyingABI=&PMUnderlyingABI($ABI) if defined &PMUnderlyingABI;
 
-	$Path{Lib}="$E32env::Data{LinkPath}";
+	$Path{Lib}="$e32env::Data{LinkPath}";
 	unless ($ASSPExports) {
-		$Path{Lib}.="$UnderlyingABI\\";
+		$Path{Lib}.= lc "$UnderlyingABI/";
 	} 
 	else {
-		$Path{Lib}.="$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}";
 	unless ($Plat{OS} eq 'WINS') {	# WINC and WINS versions of EEXE are different
-		$Path{StatLink}.="$ABI\\"; # ARM static libraries are currently always ASSP-independent
+		$Path{StatLink}.= lc "$ABI/"; # ARM static libraries are currently always ASSP-independent
 	}
 	else {
-		$Path{StatLink}.="$Plat{ASSP}\\"; # WINC static libraries are currently always ASSP-specific
+		$Path{StatLink}.= lc "$Plat{ASSP}/"; # WINC static libraries are currently always ASSP-specific
 	}
 
 #	set up release path
 	unless ($TrgType{Basic} eq 'LIB') {
-		$Path{Rel}="$E32env::Data{RelPath}$Plat{Real}\\";
+		$Path{Rel}="$e32env::Data{RelPath}" . lc $Plat{Real} . "/";
 	}
 	else {
 		$Path{Rel}=$Path{StatLink}; # static libraries can't #define the __SINGLE__ macro
@@ -840,10 +839,10 @@
 	if ($CurBld) {
 #regression hack
 		if ($Plat{OS} eq 'EPOC32') {
-			$Path.="UREL\\";
+			$Path.="urel/";
 		}
 		else {
-			$Path.="UDEB\\";
+			$Path.="udeb/";
 		}
 #regression hack end
 	}
@@ -903,7 +902,8 @@
 sub BldPath () {
 	my $Path=$Path{"Bld"};
 	if ($CurBld) {
-		$Path.="$CurBld\\";
+		$CurBld = lc $CurBld;
+		$Path.="$CurBld\/";
 	}
 	$Path;
 }
@@ -920,7 +920,7 @@
 	$DataLinkAddress;
 }
 sub DataPath () {
-	$E32env::Data{DataPath};
+	$e32env::Data{DataPath};
 }
 sub DebugLibList () {
 	@DebugLibList;
@@ -949,22 +949,22 @@
 	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"}}};
@@ -993,13 +993,13 @@
 	if ($CurBld) {
 #regression hack
 		if ($Plat{DefFile} eq 'EABI') {
-			$Path.="LIB\\";
+			$Path.="lib/";
 		}
 		elsif ($Plat{OS} eq 'EPOC32') {
-			$Path.="UREL\\";
+			$Path.="urel/";
 		}
 		else {
-			$Path.="UDEB\\";
+			$Path.="udeb/";
 		}
 #regression hack end
 	}
@@ -1023,13 +1023,13 @@
 	if ($CurBld) {
 #regression hack
 		if ($Plat{DefFile} eq 'EABI') {
-			$Path.="LIB\\";
+			$Path.="lib/";
 		}
 		elsif ($Plat{OS} eq 'EPOC32') {
-			$Path.="UREL\\";
+			$Path.="urel/";
 		}
 		else {
-			$Path.="UDEB\\";
+			$Path.="udeb/";
 		}
 #regression hack end
 	}
@@ -1082,7 +1082,8 @@
 sub RelPath () {
 	my $Path=$Path{Rel};
 	if ($CurBld) {
-		$Path.="$CurBld\\";
+		$CurBld = lc $CurBld;
+		$Path.="$CurBld\/";
 	}
 	$Path;
 }
@@ -1100,7 +1101,7 @@
 	@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
 	}
 }
@@ -1127,7 +1128,7 @@
 sub StatLinkPath () {
 	my $Path=$Path{StatLink};
 	if ($CurBld) {
-		$Path.="$CurBld\\";
+		$Path.= lc "$CurBld/";
 	}
 	$Path;
 }
diff -urN tools_orig/maksym.pl tools/maksym.pl
--- tools_orig/maksym.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/maksym.pl	2007-04-07 01:23:49.000000000 +0300
@@ -322,7 +322,7 @@
 {
     my $build;
 
-    &Load_ModuleL('E32TPVER');
+    &Load_ModuleL('e32tpver');
     print "\nmaksym - Produce symbolic information given a ROM image (Build ",
 	&E32tpver, ")\n";
     &usage;
diff -urN tools_orig/memtrace.pl tools/memtrace.pl
--- tools_orig/memtrace.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/memtrace.pl	2007-04-07 01:23:49.000000000 +0300
@@ -237,7 +237,7 @@
 	{
 	my $build;
 	
-	&Load_ModuleL('E32TPVER');
+	&Load_ModuleL('e32tpver');
 	print "\nmemtrace - " .
 	  "Postprocess EPOC memory usage trace (Build ", &E32tpver, ")\n";
 	&usage;
diff -urN tools_orig/mifconv tools/mifconv
--- tools_orig/mifconv	1970-01-01 02:00:00.000000000 +0200
+++ tools/mifconv	2007-04-07 01:23:49.000000000 +0300
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# mifconv - bash frontend for mifconv.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 -urN tools_orig/mmp.pm tools/mmp.pm
--- tools_orig/mmp.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/mmp.pm	2007-09-14 20:29:13.000000000 +0300
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+#
 # MMP.PM
 #
 # Copyright (c) Symbian Software Ltd 1997-2005.  All rights reserved.
@@ -6,7 +8,7 @@
 
 # Processes an mmp file and sets up subroutines to return the data
 
-package Mmp;
+package mmp;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -27,7 +29,7 @@
 	Mmp_Capability
 	Mmp_CapabilityFlags
 	Mmp_DataLinkAddress
-	Mmp_DebugLibList 
+	Mmp_DebugLibList
 	Mmp_Def
 	Mmp_DocHash
 	Mmp_ExportUnfrozen
@@ -48,7 +50,7 @@
 	Mmp_RomTargets
 	Mmp_SourceStruct 
 	Mmp_StackSize
-	Mmp_StatLibList 
+	Mmp_StatLibList
 	Mmp_SysIncPaths
 	Mmp_Trg
 	Mmp_TrgType
@@ -69,10 +71,10 @@
 );
 
 
-use Genutl;
-use Prepfile;
-use Pathutl;
-use Trgtype;
+use genutl;
+use prepfile;
+use pathutl;
+use trgtype;
 
 my %ProcessPriorityNames = (
 	LOW=>'Low',
@@ -303,7 +305,7 @@
 	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';
 
@@ -318,7 +320,7 @@
 		}
 		$_=uc $_;
 		if ($PlatTxtSwitch) {
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$PlatTxtSwitch=0;
 				next LINE;
 			}
@@ -326,7 +328,7 @@
 			next LINE;
 		}
 		if ($OtherPlatSwitch) {
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$OtherPlatSwitch=0;
 				next LINE;
 			}
@@ -334,22 +336,22 @@
 		}
 		# ----------- 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?$/o) {
+#					$_ = lc $_; # bmconv can't handle upper-case 'C's
+					unless (/^c?\d\d?$/io) {
 						push @MmpDie, "$CurFile($LineNum) : BITMAP color depth \"$_\" - unexpected format\n";
 					}
 				}
 				@ClDepths = (@ClDepths) x @$Line;	# make a sufficiently long list of color depths
 				foreach (@$Line) {
-					$_=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
@@ -360,26 +362,27 @@
 				}
 				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-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+				$CurBitMapSrcPath=~s/\\/\//g;      # force to forward slash
+				$CurBitMapSrcPath=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a backslash
 				$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;
@@ -392,7 +395,7 @@
 			}
 
 
-			if (/^TARGETPATH$/o) {
+			if (/^TARGETPATH$/oi) {
 				if ($CurBitMap{TrgPath}) {
 					push @MmpWarn, "$CurFile($LineNum) : Bitmap TARGETPATH already specified\n";
 					next LINE;
@@ -401,9 +404,10 @@
 					push @MmpDie, "$CurFile($LineNum) : No path specified with Bitmap keyword TARGETPATH\n";
 					next LINE;
 				}
-				$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/\\/\//g;              # force to forward slash
+				$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}";
 				if (@$Line) {
 					push @MmpWarn, "$CurFile($LineNum) : Too many arguments for Bitmap keyword TARGETPATH\n";
 				}
@@ -414,7 +418,7 @@
 		
 		# ----------- handle body of START RESOURCE ... END -------------
 		if (%CurResource) {
-			if (/^END$/o) {
+			if (/^END$/oi) {
 				$CurResource{SrcPath}=$CurSrcPath;
 				my %Resource=%CurResource;
 				undef %CurResource;
@@ -422,7 +426,7 @@
 				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;
@@ -433,7 +437,7 @@
 				}
 				next LINE;
 			}
-			if (/^LANG$/o) {
+			if (/^LANG$/oi) {
 				if (@$Line) {
 					my $Candidate;
 					foreach $Candidate (@$Line) {
@@ -441,7 +445,7 @@
 							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;
@@ -449,7 +453,7 @@
 				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;
@@ -465,7 +469,7 @@
 				}
 				next LINE;
 			}
-			if (/^TARGETPATH$/o) {
+			if (/^TARGETPATH$/oi) {
 				if ($CurResource{TrgPath}) {
 					push @MmpWarn, "$CurFile($LineNum) : Resource TARGETPATH already specified\n";
 					next LINE;
@@ -474,15 +478,16 @@
 					push @MmpDie, "$CurFile($LineNum) : No path specified with Resource keyword TARGETPATH\n";
 					next LINE;
 				}
-				$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/\\/\//g;              # force to forward slash
+				$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";
@@ -507,7 +512,7 @@
 		}
 		
 		# ----------- 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;
@@ -518,22 +523,24 @@
 					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";
 				}
 				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
 					$CurResource{Source}="$CurSrcPath$src";
 				}
 				next LINE;
@@ -542,15 +549,18 @@
 			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;	# BUG: 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";
@@ -572,7 +582,8 @@
 			}
 			@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
@@ -585,21 +596,21 @@
 			}
 			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) {
@@ -618,7 +629,7 @@
 			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;
@@ -669,7 +680,7 @@
 			}
 			next LINE;
 		}
-		if (/^DEBUGLIBRARY$/o) {
+		if (/^DEBUGLIBRARY$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
@@ -688,7 +699,7 @@
 			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;
@@ -698,6 +709,7 @@
 				push @MmpWarn, "$CurFile($LineNum) : No file specified for keyword DEFFILE\n";
 				next LINE;
 			}
+			$_=~s/\\/\//g;      # force to forward slash
 			$Def{Base}=&Path_Split('Base',$_);
 			$Def{Ext}=&Path_Split('Ext',$_);
 			$Def{Path}=&Path_Split('Path',$_);
@@ -709,10 +721,11 @@
 			}
 			next LINE;
 		}
-		if (/^DOCUMENT$/o) {
+		if (/^DOCUMENT$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+ 					$Candidate=~s/\\/\//g;      # force to forward slash
 					if ($CheckDoc{"$CurSrcPath$Candidate"}) {
 						push @MmpWarn, "$CurFile($LineNum) : Duplicate Document \"$CurSrcPath$Candidate\" at line ", $CheckDoc{"$CurSrcPath$Candidate"}, "\n";
 						next; 
@@ -728,28 +741,28 @@
 			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) {
@@ -761,14 +774,14 @@
 			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) {
@@ -791,7 +804,7 @@
 			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;
@@ -807,7 +820,7 @@
 			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) {
@@ -820,28 +833,28 @@
 			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";
 			}
 			$CompressTarget=0;
 			next LINE;
 		}
-		if (/^NOCOMPRESSTARGET$/o) {
+		if (/^NOCOMPRESSTARGET$/oi) {
 			if (@$Line) {
 				push @MmpWarn, "$CurFile($LineNum) : Keyword $_ takes no arguments\n";
 			}
 			$CompressTarget=1;
 			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;
@@ -852,7 +865,7 @@
 			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) {
@@ -860,7 +873,7 @@
 						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;
@@ -868,7 +881,7 @@
 			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) {
@@ -888,7 +901,7 @@
 			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;
@@ -899,7 +912,7 @@
 			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;
@@ -914,7 +927,7 @@
 			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;
@@ -922,13 +935,13 @@
 			$NoExportLibrary = 1;
 			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)";
@@ -937,7 +950,7 @@
 			}
 			next LINE; 
 		}
-		if (/^NOSTRICTDEF$/o) {
+		if (/^NOSTRICTDEF$/oi) {
 			if ($NoStrictDef) {
 				push @MmpWarn, "$CurFile($LineNum) : NOSTRICTDEF already set\n";
 				next LINE;
@@ -948,7 +961,7 @@
 			$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;
@@ -972,10 +985,11 @@
 			}
 			next LINE;
 		}
-		if (/^RESOURCE$/o) {
+		if (/^RESOURCE$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
+ 					$Candidate=~s/\\/\//g;      # force to forward slash
 					if ($CheckResrc{$Candidate}) {
 						push @MmpDie, "$CurFile($LineNum) : Duplicate Resource $Candidate at line $CheckResrc{$Candidate}\n";
 						next;
@@ -998,7 +1012,7 @@
 			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;
@@ -1023,11 +1037,11 @@
 			}
 			next LINE;
 		}
-		if (/^SOURCE$/o) {
+		if (/^SOURCE$/oi) {
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
-					$Candidate =~ s/^\\//;	# remove leading \, if any	
+					$Candidate =~ s/\\/\//g;      # force to forward slash
 					$CurSource{BaseTrg}=&Path_Split('Base',$Candidate);
 					my $path=&Path_Split('Path',$Candidate);
 					if($path){
@@ -1048,9 +1062,10 @@
 			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-^(.*[^\\])$-$1\\-o;	# in case no terminating backslash
+ 				$CurSrcPath=~s/\\/\//g;      # force to forward slash
+				$CurSrcPath=~s-^(.*[^\/])$-$1\/-o;	# in case no terminating slash
 				$CurSrcPath=&Path_MakeEAbs($EPOCPath,$CurFile,$CurSrcPath);
 				if (-d &Path_Chop($CurSrcPath)) {
 					next LINE;
@@ -1061,7 +1076,7 @@
 			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) {
@@ -1077,7 +1092,7 @@
 			push @MmpWarn, "$CurFile($LineNum) : No Libraries specified for keyword STATICLIBRARY\n";
 			next LINE;
 		}
-		if (/^STRICTDEPEND$/o) {
+		if (/^STRICTDEPEND$/oi) {
 			if ($MmpFlag{StrictDepend}) {
 				push @MmpWarn, "$CurFile($LineNum) : STRICTDEPEND already set\n";
 				next LINE;
@@ -1088,11 +1103,12 @@
 			$MmpFlag{StrictDepend}=1;
 			next LINE;
 		}
-		if (/^SYSTEMINCLUDE$/o){
+		if (/^SYSTEMINCLUDE$/oi){
 			if (@$Line) {
 				my $Candidate;
 				foreach $Candidate (@$Line) {
-					$Candidate=~s-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+ 					$Candidate=~s/\\/\//g;      # force to forward slash
+					$Candidate=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
 					$Candidate=&Path_MakeEAbs($EPOCPath,$CurFile,$Candidate);
 					if ($CheckSysInc{$Candidate}) {
 						push @MmpWarn, "$CurFile($LineNum) : Duplicate SYSTEMINCLUDE path $Candidate at line $CheckSysInc{$Candidate}\n";
@@ -1110,10 +1126,11 @@
 			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
 					if ($CheckSysResrc{$Candidate}) {
 						push @MmpDie, "$CurFile($LineNum) : Duplicate Resource \"$Candidate\" at line $CheckSysResrc{$Candidate}\n";
 						next; 
@@ -1126,7 +1143,7 @@
 					$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;
@@ -1139,7 +1156,7 @@
 			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;
@@ -1150,7 +1167,7 @@
 			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;
@@ -1159,15 +1176,16 @@
 				push @MmpWarn, "$CurFile($LineNum) : No Path specified for keyword TARGETPATH\n";
 				next LINE;
 			}
-			$TrgPath=~s-^\\(.*)$-$1-o;
-			$TrgPath=~s-^(.*[^\\])$-$1\\-o;
-			$TrgPath="Z\\$TrgPath";
+			$TrgPath=~s/\\/\//g;              # force to forward slash
+			$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;
@@ -1182,7 +1200,7 @@
 			}
 			next LINE;
 		}
-		if (/^UID$/o) {
+		if (/^UID$/oi) {
 			if (@$Line) {
 				foreach (@$Line) {
 					if ($#UidList>=1) {
@@ -1202,7 +1220,7 @@
 			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;
@@ -1221,7 +1239,7 @@
 			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;
@@ -1240,11 +1258,12 @@
 			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-^(.*[^\\])$-$1\\-o;   # ensure path ends with a backslash
+ 					$Candidate=~s/\\/\//g;      # force to forward slash
+					$Candidate=~s-^(.*[^\/])$-$1\/-o;   # ensure path ends with a slash
 					$Candidate=&Path_MakeEAbs($EPOCPath,$CurFile,$Candidate);
 					if ($CheckUserInc{$Candidate}) {
 						push @MmpWarn, "$CurFile($LineNum) : Duplicate USERINCLUDE path \"$Candidate\" at line $CheckUserInc{$Candidate}\n";
@@ -1262,14 +1281,14 @@
 			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;
@@ -1431,7 +1450,7 @@
 	}
 
 	# check for languages
-	@LangList=('SC') unless @LangList;
+	@LangList=('sc') unless @LangList;
 
   if (&main::EPOCSecurePlatform() && !defined($Capability) &&
     (($TrgType{Basic} eq "DLL") || (uc($TrgType) eq "EXEXP")))
@@ -1482,7 +1501,7 @@
 		foreach my $lang (@list) {
 			my %newResourceRef = %{$ResourceRef};
 			$newResourceRef{Lang} = $lang;
-			$newResourceRef{Trg} = "$base.R$lang";
+			$newResourceRef{Trg} = "$base.r$lang";
 			push @PerLanguageResourceStruct, \%newResourceRef;
 		}
 	}
@@ -1619,7 +1638,7 @@
 #	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};
@@ -1667,7 +1686,7 @@
 	# 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 ) {
@@ -1682,17 +1701,18 @@
 					$augment = "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}) {
 			$Def{Base} = &Path_Split('Base',$LinkAsBase);
 		}
 		unless ($Def{Ext}) {
-			$Def{Ext}='.DEF';
+			$Def{Ext}='.def';
 		}
 #		now that we've dumped narrow, treat the 'U' basename suffix as part of the frozen
 #		.DEF file basename.  Once we've dumped the suffix we won't have to store the extension
@@ -1700,7 +1720,7 @@
 		if (!$emulator && $Version{explicit}) {
 			$Def{Base} .= &Genutl_VersionToFileAugment(%Version);
 		} elsif (!$NoStrictDef) {
-			$Def{Base}.='U';
+			$Def{Base}.='u';
 		}
 
 #		check deffile exists, 
diff -urN tools_orig/modload.pm tools/modload.pm
--- tools_orig/modload.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/modload.pm	2007-04-07 01:23:49.000000000 +0300
@@ -7,7 +7,7 @@
 # Runtime module-loading routine for loading e32tools modules into 'main' module
 
 
-package Modload;
+package modload;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -19,7 +19,7 @@
 );
 
 
-use Pathutl;
+use pathutl;
 
 my %Mode=(
 	Verbose=>0
@@ -40,14 +40,14 @@
 	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 -urN tools_orig/output.pm tools/output.pm
--- tools_orig/output.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/output.pm	2007-04-07 01:23:49.000000000 +0300
@@ -6,7 +6,7 @@
 
 # Text formatting module
 
-package Output;
+package output;
 require Exporter;
 @ISA=qw(Exporter);
 @EXPORT=qw(
@@ -15,7 +15,6 @@
 );
 
 
-
 my $Len=80;
 my $PreWrap="\\";
 my $PreWrapLen=length($PreWrap);
@@ -86,9 +85,8 @@
 
 sub Output (@) {
 	OutWrite if $Buf;	# output the formatted text before doing any more output
-	my $Item;
-	foreach $Item (@_) {
-		$Text.=$Item;
+	foreach (@_) {
+	  $Text .= $_ if $_;
 	}
 }
 
diff -urN tools_orig/pathutl.pm tools/pathutl.pm
--- tools_orig/pathutl.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/pathutl.pm	2007-04-07 01:23:49.000000000 +0300
@@ -9,7 +9,7 @@
 #	Distinguish paths from filepaths by assuming paths end with "\"
 #	therefore ensure this is the case for all paths coming into programs using this module
 
-package Pathutl;
+package pathutl;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -61,12 +61,12 @@
 		}
 		$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];	
@@ -82,7 +82,7 @@
 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);
@@ -118,25 +118,25 @@
 	my ($Sect,$P)=@_;
 	$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 '';
@@ -146,25 +146,25 @@
 
 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;
@@ -172,10 +172,10 @@
 
 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;
 }
 
@@ -184,10 +184,10 @@
 	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";
@@ -205,26 +205,26 @@
 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];	
@@ -234,7 +234,7 @@
 # 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;
@@ -244,14 +244,14 @@
 			$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;
 		}
@@ -261,20 +261,20 @@
 }
 
 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) {
 #regression hack
-		if ($p=~m-^\\epoc32\\(.*)$-io) {	# hack - special case for existing \\epoc32 references
+		if ($p=~m-^\/epoc32\/(.*)$-io) {	# hack - special case for existing \/epoc32 references
 			$p=$EPOCPath.$1;
 			next;
 		}
 #regression hack end
-		if ($p=~m-\+\\(.*)$-o) {
+		if ($p=~m-\+\/(.*)$-o) {
 			$p=$EPOCPath.$1;
 			next;
 		}
@@ -282,14 +282,14 @@
 			$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;
 		}
@@ -299,11 +299,11 @@
 }
 
 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];
 }
@@ -313,7 +313,7 @@
 	my @List=@_;
 	my $Path;
 	foreach $Path (@List) {
-		$Path=~s- -\\ -go if (defined($Path));
+		$Path=~s- -\/ -go if (defined($Path));
 	}
 	return wantarray ? @List : $List[0];
 }
@@ -322,10 +322,10 @@
 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 -urN tools_orig/petran tools/petran
--- tools_orig/petran	1970-01-01 02:00:00.000000000 +0200
+++ tools/petran	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/pfsdump tools/pfsdump
--- tools_orig/pfsdump	1970-01-01 02:00:00.000000000 +0200
+++ tools/pfsdump	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/prepdef.pl tools/prepdef.pl
--- tools_orig/prepdef.pl	2006-03-06 23:41:44.000000000 +0200
+++ tools/prepdef.pl	2007-04-07 01:23:49.000000000 +0300
@@ -14,14 +14,13 @@
 	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 E32tpver;
-use Pathutl;
+use defutl;
+use e32tpver;
+use pathutl;
 
 
 # THE MAIN PROGRAM SECTION
diff -urN tools_orig/prepfile.pm tools/prepfile.pm
--- tools_orig/prepfile.pm	2006-03-06 23:41:42.000000000 +0200
+++ tools/prepfile.pm	2007-04-07 01:23:49.000000000 +0300
@@ -7,7 +7,7 @@
 # module for preprocessing makmake-style project files
 
 
-package Prepfile;
+package prepfile;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -17,9 +17,9 @@
 );
 
 
-use Checkgcc;
-use Pathutl;
-use Preprocessor;
+use checkgcc;
+use pathutl;
+use preprocessor;
 
 my %Mode=(
 	Verbose=>0,
@@ -43,11 +43,11 @@
 	die "\nERROR: Project File \"$FILE\" not found\n" unless -e $FILE;
 
 	my $exe = &PreprocessorToUseExe();
- 	my $cpp = "$exe.EXE -undef -nostdinc -+ ";
+ 	my $cpp = "$exe -undef -nostdinc -x c++ ";
 	my @CppCall;
  	push @CppCall, $cpp;
 
-	push @CppCall, join '',	"-I ",&Path_RltToWork("$ENV{EPOCROOT}epoc32\\include"),
+	push @CppCall, join '',	"-I ",&Path_RltToWork("$ENV{EPOCROOT}epoc32/include"),
 							" -I .",
 							" -I ",&Path_Split('Path',&Path_RltToWork($FILE));
 
@@ -65,12 +65,15 @@
 	}
 	# all macros made upper case and suppress user-expansion of macros for nefarious purposes
 
+	# gnupoc: platform macro
+	push @CppCall, "-D __SERIES60__=__SERIES60__";
+
 	push @CppCall, join '',"\"",&Path_RltToWork($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
 	#--------------------------
@@ -87,17 +90,13 @@
 
 		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=&Path_AbsToWork($CurFile);
 			@Tmp=('#', $CurFile);
 			push @{$ArrayRef}, [ @Tmp ];
diff -urN tools_orig/preprocessor.pm tools/preprocessor.pm
--- tools_orig/preprocessor.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/preprocessor.pm	2007-04-07 01:23:49.000000000 +0300
@@ -7,7 +7,7 @@
 # Used to allow us to access and manipulate other pre processors
 #
 
-package Preprocessor;
+package preprocessor;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -54,7 +54,7 @@
     
     if ( ($env eq "DEFAULT") )
     {
-        return "cpp";
+        return "arm-none-symbianelf-cpp";
     }
     elsif ( $env eq "MINGW_NO_CYGWIN" )
     {
@@ -89,4 +89,4 @@
 }
 
 
-1;
\ No newline at end of file
+1;
diff -urN tools_orig/rcomp tools/rcomp
--- tools_orig/rcomp	1970-01-01 02:00:00.000000000 +0200
+++ tools/rcomp	2007-04-07 01:23:49.000000000 +0300
@@ -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 -urN tools_orig/setupcomms tools/setupcomms
--- tools_orig/setupcomms	1970-01-01 02:00:00.000000000 +0200
+++ tools/setupcomms	2007-04-07 01:23:49.000000000 +0300
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# setupcomms - bash interface for setupcomms.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 setupcomms.pl "$@"
diff -urN tools_orig/signsis tools/signsis
--- tools_orig/signsis	1970-01-01 02:00:00.000000000 +0200
+++ tools/signsis	2007-04-07 01:23:49.000000000 +0300
@@ -0,0 +1,15 @@
+#!/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`
+echo "executing $PGM.exe"
+ROOT=$EPOCROOT/epoc32/tools
+wine $ROOT/$PGM.exe $*
diff -urN tools_orig/trgtype.pm tools/trgtype.pm
--- tools_orig/trgtype.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/trgtype.pm	2007-04-07 01:23:49.000000000 +0300
@@ -10,7 +10,7 @@
 # Look at the existing types for an appropriate example
 #
 
-package Trgtype;
+package trgtype;
 
 require Exporter;
 @ISA=qw(Exporter);
@@ -19,7 +19,7 @@
 	Trg_List
 );
 
-use Genutl;
+use genutl;
 
 my %Types=(
 	ANI=>{
@@ -86,12 +86,12 @@
 		Basic=>'IMPLIB',
 	},	
 	KDLL=>{
-		FirstLib=>'EKLL.LIB',
+		FirstLib=>'ekll.lib',
 #		Kernel=>1,
 		System=>1,
 	},
 	KEXT=>{
-		FirstLib=>'EEXT.LIB',
+		FirstLib=>'eext.lib',
 #		Kernel=>1,
 		System=>1,
 	},
@@ -101,7 +101,7 @@
 		System=>1,
 	},
 	LDD=>{
-		FirstLib=>'EDEV.LIB',
+		FirstLib=>'edev.lib',
 #		Kernel=>1,
 		System=>1,
 		'Exports'=>{
@@ -122,7 +122,7 @@
 			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)",
 	},
@@ -133,7 +133,7 @@
 			WINS=>['?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z'],
 			X86=>['?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z'],
 		},
-		ResourcePath=>'Resource\Plugins',
+		ResourcePath=>'resource/plugins',
 		UID2=>'0x10009D8D',
 	},
 	MDA=>{
@@ -172,7 +172,7 @@
 			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)",
 	},
@@ -183,7 +183,7 @@
 			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)",
 	},
@@ -194,13 +194,13 @@
 			WINS=>['?NotifierArray@@YAPAV?$CArrayPtr@VMNotifierBase2@@@@XZ'],
 			X86=>['?NotifierArray@@YAPAV?$CArrayPtr@VMNotifierBase2@@@@XZ'],
 		},
-		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'=>{
@@ -219,7 +219,7 @@
 			X86=>['?NewPrinterDeviceL@@YAPAVCPrinterDevice@@XZ'],
 		},
 		UID2=>'0x10003b1c',
-		ResourcePath=>'Resource\Printers',
+		ResourcePath=>'resource/printers',
 	},
 	VAR=>{
 		'Exports'=>{
@@ -227,7 +227,7 @@
 			EABI=>['_Z17VariantInitialisev'],
 			X86=>['?VariantInitialise@@YAPAVAsic@@XZ'],
 		},
-		FirstLib=>'EVAR.LIB',
+		FirstLib=>'evar.lib',
 #		Kernel=>1,
 		System=>1,
 	},
@@ -323,7 +323,7 @@
 		# apply terminating backslash
 		$TrgHash{Path}=~s-^(.*[^\\])$-$1\\-o;
 		# apply Z drive
-		$TrgHash{Path}="Z\\$TrgHash{Path}";
+		$TrgHash{Path}="z/$TrgHash{Path}";
 	}
 
 	unless ($TrgHash{ResourcePath}) {
@@ -331,7 +331,7 @@
 	}
 	else {
 		# apply terminating backslash & Z drive
-		$TrgHash{ResourcePath}=~s-^(.*[^\\])$-Z\\$1\\-o;
+		$TrgHash{ResourcePath}=~s-^(.*[^\/])$-z\/$1\/-o;
 	}
 
 	unless ($TrgHash{UID2}) {
diff -urN tools_orig/winutl.pm tools/winutl.pm
--- tools_orig/winutl.pm	2006-03-06 23:41:44.000000000 +0200
+++ tools/winutl.pm	2007-04-07 01:23:49.000000000 +0300
@@ -7,7 +7,7 @@
 
 # this package does various ancillary things for windows modules
 
-package Winutl;
+package winutl;
 
 my $BaseAddress='';
 my @Win32LibList=();
@@ -37,8 +37,8 @@
 	Winutl_MSVCSubVer
 );
 
-use Genutl;
-use E32Variant;
+use genutl;
+use e32variant;
 
 sub Winutl_Help_Mmp {
 # provide the help text for START <windows platforms> END blocks
@@ -208,7 +208,7 @@
 		$UidText.="#pragma data_seg()\n";
 # tools hack
 		unless (&main::Plat eq 'TOOLS' || &main::Plat eq 'CWTOOLS') {
-			&main::AddSrc("$MakeFilePath$BaseTrg.UID.CPP", $UidText);
+			&main::AddSrc("$MakeFilePath$BaseTrg.uid.cpp", $UidText);
 		};
 # tools hack end
 	}
@@ -264,7 +264,7 @@
 }
 
 sub Winutl_MSVCVer () {
-	open PIPE, "LINK.EXE |" or die "ERROR: Can't invoke LINK.EXE\n";
+	open PIPE, "wine LINK.EXE |" or die "ERROR: Can't invoke LINK.EXE\n";
 	my $DoneCheck=0;
 	while (<PIPE>) {
 		unless ($DoneCheck) {
