--- trunk/reactos/Makefile 2005-05-28 19:33:26 UTC (rev 15603)
+++ trunk/reactos/Makefile 2005-05-28 19:35:23 UTC (rev 15604)
@@ -147,15 +147,15 @@
EXEPOSTFIX =
SEP = /
mkdir = -$(Q)mkdir -p
- gcc = $(Q)mingw32-gcc
- gpp = $(Q)mingw32-g++
- ld = $(Q)mingw32-ld
- nm = $(Q)mingw32-nm
- objdump = $(Q)mingw32-objdump
- ar = $(Q)mingw32-ar
- objcopy = $(Q)mingw32-objcopy
- dlltool = $(Q)mingw32-dlltool
- windres = $(Q)mingw32-windres
+ gcc = $(Q)$(PREFIX)-gcc
+ gpp = $(Q)$(PREFIX)-g++
+ ld = $(Q)$(PREFIX)-ld
+ nm = $(Q)$(PREFIX)-nm
+ objdump = $(Q)$(PREFIX)-objdump
+ ar = $(Q)$(PREFIX)-ar
+ objcopy = $(Q)$(PREFIX)-objcopy
+ dlltool = $(Q)$(PREFIX)-dlltool
+ windres = $(Q)$(PREFIX)-windres
rm = $(Q)rm -f
cp = $(Q)cp
NUL = /dev/null
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-05-28 19:33:26 UTC (rev 15603)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-05-28 19:35:23 UTC (rev 15604)
@@ -227,6 +227,7 @@
outputDirectory ( new Directory ( "$(OUTPUT)" ) ),
installDirectory ( new Directory ( "$(INSTALL)" ) )
{
+ compilerPrefix = "";
}
MingwBackend::~MingwBackend()
@@ -482,6 +483,10 @@
void
MingwBackend::GenerateGlobalVariables () const
{
+ fprintf ( fMakefile,
+ "PREFIX := %s\n",
+ compilerPrefix.c_str () );
+
GenerateGlobalCFlagsAndProperties ( "=", ProjectNode.non_if_data );
GenerateProjectGccOptions ( "=", ProjectNode.non_if_data );
@@ -695,19 +700,22 @@
const string& ROS_PREFIXValue = Environment::GetVariable ( "ROS_PREFIX" );
if ( ROS_PREFIXValue.length () > 0 )
{
- compilerCommand = ROS_PREFIXValue + "-gcc";
+ compilerPrefix = ROS_PREFIXValue;
+ compilerCommand = compilerPrefix + "-gcc";
detectedCompiler = TryToDetectThisCompiler ( compilerCommand );
}
#if defined(WIN32)
if ( !detectedCompiler )
{
+ compilerPrefix = "";
compilerCommand = "gcc";
detectedCompiler = TryToDetectThisCompiler ( compilerCommand );
}
#endif
if ( !detectedCompiler )
{
- compilerCommand = "mingw32-gcc";
+ compilerPrefix = "mingw32";
+ compilerCommand = compilerPrefix + "-gcc";
detectedCompiler = TryToDetectThisCompiler ( compilerCommand );
}
if ( detectedCompiler )
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.h 2005-05-28 19:33:26 UTC (rev 15603)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.h 2005-05-28 19:35:23 UTC (rev 15604)
@@ -51,6 +51,7 @@
virtual void Process ();
std::string AddDirectoryTarget ( const std::string& directory,
Directory* directoryTree );
+ std::string compilerPrefix;
std::string compilerCommand;
bool usePipe;
Directory* intermediateDirectory;