diff --git a/reactos/drivers/net/dd/directory.xml b/reactos/drivers/net/dd/directory.xml
new file mode 100644
index 00000000000..44def278345
--- /dev/null
+++ b/reactos/drivers/net/dd/directory.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/reactos/drivers/net/dd/ne2000/ne2000.xml b/reactos/drivers/net/dd/ne2000/ne2000.xml
new file mode 100644
index 00000000000..3a15e153683
--- /dev/null
+++ b/reactos/drivers/net/dd/ne2000/ne2000.xml
@@ -0,0 +1,11 @@
+
+ include
+ ndis
+ ntoskrnl
+ hal
+
+ 8390.c
+ main.c
+
+ ne2000.rc
+
diff --git a/reactos/drivers/net/dd/pcnet/pcnet.xml b/reactos/drivers/net/dd/pcnet/pcnet.xml
new file mode 100644
index 00000000000..d04c745637a
--- /dev/null
+++ b/reactos/drivers/net/dd/pcnet/pcnet.xml
@@ -0,0 +1,11 @@
+
+ .
+
+
+ ndis
+ ntoskrnl
+ hal
+ pcnet.c
+ requests.c
+ pcnet.rc
+
diff --git a/reactos/drivers/net/directory.xml b/reactos/drivers/net/directory.xml
index 87b1b495e5a..1ce82d43e6c 100644
--- a/reactos/drivers/net/directory.xml
+++ b/reactos/drivers/net/directory.xml
@@ -1,3 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reactos/drivers/net/ndis/ndis.xml b/reactos/drivers/net/ndis/ndis.xml
new file mode 100644
index 00000000000..73818011307
--- /dev/null
+++ b/reactos/drivers/net/ndis/ndis.xml
@@ -0,0 +1,32 @@
+
+
+ include
+
+
+
+
+
+ ntoskrnl
+ hal
+
+ 40gone.c
+ 50gone.c
+ buffer.c
+ cl.c
+ cm.c
+ co.c
+ config.c
+ control.c
+ efilter.c
+ hardware.c
+ io.c
+ main.c
+ memory.c
+ miniport.c
+ protocol.c
+ string.c
+ stubs.c
+ time.c
+
+ ndis.rc
+
diff --git a/reactos/drivers/net/npf/npf.xml b/reactos/drivers/net/npf/npf.xml
new file mode 100644
index 00000000000..50df90d7a84
--- /dev/null
+++ b/reactos/drivers/net/npf/npf.xml
@@ -0,0 +1,28 @@
+
+ include
+ include
+
+
+
+
+ ndis
+ ntoskrnl
+ hal
+ bucket_lookup.c
+ count_packets.c
+ dump.c
+ functions.c
+ jitter.c
+ memory_t.c
+ normal_lookup.c
+ openclos.c
+ packet.c
+ read.c
+ tcp_session.c
+ time_calls.c
+ tme.c
+ win_bpf_filter.c
+ win_bpf_filter_init.c
+ write.c
+ npf.rc
+
diff --git a/reactos/drivers/net/tcpip/tcpip.xml b/reactos/drivers/net/tcpip/tcpip.xml
new file mode 100644
index 00000000000..96b675ab595
--- /dev/null
+++ b/reactos/drivers/net/tcpip/tcpip.xml
@@ -0,0 +1,40 @@
+
+
+ include
+ include
+
+
+
+ ip
+ oskittcp
+ ndis
+ rosrtl
+ pseh
+ ntoskrnl
+ hal
+
+ lan.c
+
+
+ buffer.c
+ bug.c
+ dispatch.c
+ fileobjs.c
+ iinfo.c
+ info.c
+ irp.c
+ lock.c
+ main.c
+ mockbuffer.c
+ mockbug.c
+ mocklock.c
+ mockpool.c
+ mockwait.c
+ ninfo.c
+ pool.c
+ proto.c
+ tinfo.c
+ wait.c
+
+ tcpip.rc
+
diff --git a/reactos/drivers/net/tdi/tdi.xml b/reactos/drivers/net/tdi/tdi.xml
new file mode 100644
index 00000000000..9f8be475c8c
--- /dev/null
+++ b/reactos/drivers/net/tdi/tdi.xml
@@ -0,0 +1,19 @@
+
+
+ ntoskrnl
+ hal
+
+ string.c
+ stubs.c
+
+
+ main.c
+ tdi.rc
+
+
+ dereg.c
+ handler.c
+ obsolete.c
+ stubs.c
+
+
diff --git a/reactos/drivers/net/wshtcpip/wshtcpip.xml b/reactos/drivers/net/wshtcpip/wshtcpip.xml
new file mode 100644
index 00000000000..1632a1fa4af
--- /dev/null
+++ b/reactos/drivers/net/wshtcpip/wshtcpip.xml
@@ -0,0 +1,11 @@
+
+
+ .
+
+
+ ntdll
+ kernel32
+ ws2_32
+ wshtcpip.c
+ wshtcpip.rc
+
diff --git a/reactos/lib/adns/adns.xml b/reactos/lib/adns/adns.xml
new file mode 100644
index 00000000000..784440face7
--- /dev/null
+++ b/reactos/lib/adns/adns.xml
@@ -0,0 +1,20 @@
+
+ src
+ adns_win32
+
+
+ adns_unix_calls.c
+
+
+ check.c
+ event.c
+ general.c
+ parse.c
+ poll.c
+ query.c
+ reply.c
+ setup.c
+ transmit.c
+ types.c
+
+
diff --git a/reactos/lib/directory.xml b/reactos/lib/directory.xml
index 38bbfdd125e..5be1efe057a 100644
--- a/reactos/lib/directory.xml
+++ b/reactos/lib/directory.xml
@@ -1,9 +1,18 @@
+
+
+
+
+
+
+
+
+
@@ -34,3 +43,6 @@
+
+
+
diff --git a/reactos/lib/dnsapi/dnsapi.xml b/reactos/lib/dnsapi/dnsapi.xml
new file mode 100644
index 00000000000..0818f0205bb
--- /dev/null
+++ b/reactos/lib/dnsapi/dnsapi.xml
@@ -0,0 +1,26 @@
+
+
+ include
+ src
+ adns_win32
+
+
+
+ adns
+ rosrtl
+ ntdll
+ kernel32
+ user32
+ msvcrt
+ ws2_32
+ iphlpapi
+
+ adns.c
+ context.c
+ free.c
+ names.c
+ query.c
+ stubs.c
+
+ dnsapi.rc
+
diff --git a/reactos/lib/iphlpapi/iphlpapi.xml b/reactos/lib/iphlpapi/iphlpapi.xml
new file mode 100644
index 00000000000..7b452b8e59a
--- /dev/null
+++ b/reactos/lib/iphlpapi/iphlpapi.xml
@@ -0,0 +1,27 @@
+
+ winebuild
+
+ include
+ include/wine
+
+
+
+
+
+ wine
+
+ rtl
+ ntdll
+ kernel32
+ advapi32
+ ws2_32
+ ifenum_reactos.c
+ ipstats_reactos.c
+ iphlpapi_main.c
+ media.c
+ registry.c
+ resinfo_reactos.c
+ route_reactos.c
+ iphlpapi.rc
+ iphlpapi.spec
+
diff --git a/reactos/lib/msvcrt/msvcrt.xml b/reactos/lib/msvcrt/msvcrt.xml
index 41d808e212b..6fa550b0da2 100644
--- a/reactos/lib/msvcrt/msvcrt.xml
+++ b/reactos/lib/msvcrt/msvcrt.xml
@@ -362,7 +362,6 @@
swab.c
wcstod.c
wcstol.c
- wcstom.c
wcstomb.c
wcstombs.c
wcstoul.c
diff --git a/reactos/lib/msvcrt/stdlib/wcstomb.c b/reactos/lib/msvcrt/stdlib/wcstomb.c
index c0b5d997b18..32a3a43cff0 100644
--- a/reactos/lib/msvcrt/stdlib/wcstomb.c
+++ b/reactos/lib/msvcrt/stdlib/wcstomb.c
@@ -46,32 +46,6 @@ static const unsigned char encoding_byte[] =
size_t
__wcrtomb (char *s, wchar_t wc);
-/*
- * Convert WCHAR into its multibyte character representation,
- * putting this in S and returning its length.
- *
- * Attention: this function should NEVER be intentionally used.
- * The interface is completely stupid. The state is shared between
- * all conversion functions. You should use instead the restartable
- * version `wcrtomb'.
- *
- * @implemented
- */
-int
-wctomb (char *s, wchar_t wchar)
-{
- /* If S is NULL the function has to return null or not null
- depending on the encoding having a state depending encoding or
- not. This is nonsense because any multibyte encoding has a
- state. The ISO C amendment 1 corrects this while introducing the
- restartable functions. We simply say here all encodings have a
- state. */
- if (s == NULL)
- return 1;
-
- return __wcrtomb (s, wchar);
-}
-
size_t
__wcrtomb (char *s, wchar_t wc)
diff --git a/reactos/lib/ws2_32/ws2_32.xml b/reactos/lib/ws2_32/ws2_32.xml
new file mode 100644
index 00000000000..09e54a95323
--- /dev/null
+++ b/reactos/lib/ws2_32/ws2_32.xml
@@ -0,0 +1,26 @@
+
+
+ include
+
+
+
+
+ 0x0500
+ ntdll
+ kernel32
+ user32
+ advapi32
+ dnsapi
+
+ bsd.c
+ catalog.c
+ dllmain.c
+ event.c
+ handle.c
+ ns.c
+ sndrcv.c
+ stubs.c
+ upcall.c
+
+ ws2_32.rc
+
diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp
index 48caff54abb..cf4d39dcd10 100644
--- a/reactos/tools/rbuild/backend/mingw/mingw.cpp
+++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp
@@ -166,8 +166,10 @@ MingwBackend::GenerateGlobalVariables ()
fprintf ( fMakefile, "gcc = gcc\n" );
fprintf ( fMakefile, "ld = ld\n" );
fprintf ( fMakefile, "ar = ar\n" );
- fprintf ( fMakefile, "dlltool = dlltool\n\n" );
- fprintf ( fMakefile, "windres = windres\n\n" );
+ fprintf ( fMakefile, "dlltool = dlltool\n" );
+ fprintf ( fMakefile, "windres = windres\n" );
+ fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild\n" );
+ fprintf ( fMakefile, "\n" );
GenerateGlobalCFlagsAndProperties (
"=",
ProjectNode.properties,
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
index 2507b792cda..37514373de0 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -70,6 +70,15 @@ MingwModuleHandler::GetExtension ( const string& filename ) const
return "";
}
+string
+MingwModuleHandler::GetBasename ( const string& filename ) const
+{
+ size_t index = filename.find_last_of ( '.' );
+ if (index != string::npos)
+ return filename.substr ( 0, index );
+ return "";
+}
+
string
MingwModuleHandler::ReplaceExtension ( const string& filename,
const string& newExtension ) const
@@ -80,6 +89,19 @@ MingwModuleHandler::ReplaceExtension ( const string& filename,
return filename;
}
+string
+MingwModuleHandler::GetActualSourceFilename ( const string& filename ) const
+{
+ string extension = GetExtension ( filename );
+ if ( extension == ".spec" || extension == "SPEC" )
+ {
+ string basename = GetBasename( filename );
+ return basename + ".stubs.c";
+ }
+ else
+ return filename;
+}
+
string
MingwModuleHandler::GetModuleArchiveFilename ( const Module& module ) const
{
@@ -120,6 +142,11 @@ MingwModuleHandler::GetModuleDependencies ( const Module& module ) const
const Module* dependencyModule = dependency->dependencyModule;
dependencies += dependencyModule->GetTargets ();
}
+ string definitionDependencies = GetDefinitionDependencies ( module );
+ if ( dependencies.length () > 0 && definitionDependencies.length () > 0 )
+ dependencies += " " + definitionDependencies;
+ else if ( definitionDependencies.length () > 0 )
+ dependencies = definitionDependencies;
return dependencies;
}
@@ -143,7 +170,7 @@ MingwModuleHandler::GetSourceFilenames ( const Module& module ) const
string sourceFilenames ( "" );
for ( i = 0; i < module.files.size (); i++ )
- sourceFilenames += " " + module.files[i]->name;
+ sourceFilenames += " " + GetActualSourceFilename ( module.files[i]->name );
vector ifs = module.ifs;
for ( i = 0; i < ifs.size(); i++ )
{
@@ -152,7 +179,7 @@ MingwModuleHandler::GetSourceFilenames ( const Module& module ) const
for ( j = 0; j < rIf.ifs.size(); j++ )
ifs.push_back ( rIf.ifs[j] );
for ( j = 0; j < rIf.files.size(); j++ )
- sourceFilenames += " " + rIf.files[j]->name;
+ sourceFilenames += " " + GetActualSourceFilename ( rIf.files[j]->name );
}
return sourceFilenames;
}
@@ -164,6 +191,8 @@ MingwModuleHandler::GetObjectFilename ( const string& sourceFilename ) const
string extension = GetExtension ( sourceFilename );
if ( extension == ".rc" || extension == ".RC" )
newExtension = ".coff";
+ else if ( extension == ".spec" || extension == ".SPEC" )
+ newExtension = ".stubs.o";
else
newExtension = ".o";
return FixupTargetFilename ( ReplaceExtension ( sourceFilename,
@@ -314,7 +343,7 @@ MingwModuleHandler::GenerateMacro ( const char* assignmentOperation,
}
fprintf ( fMakefile, "\n" );
}
-
+
void
MingwModuleHandler::GenerateMacros (
const char* assignmentOperation,
@@ -366,11 +395,15 @@ MingwModuleHandler::GenerateMacros (
assignmentOperation );
for ( i = 0; i < files.size(); i++ )
{
- fprintf (
- fMakefile,
- "%s%s",
- ( i%10 == 9 ? "\\\n\t" : " " ),
- GetObjectFilename(files[i]->name).c_str() );
+ string extension = GetExtension ( files[i]->name );
+ if ( extension != ".spec" && extension != ".SPEC" )
+ {
+ fprintf (
+ fMakefile,
+ "%s%s",
+ ( i%10 == 9 ? "\\\n\t" : " " ),
+ GetObjectFilename(files[i]->name).c_str() );
+ }
}
fprintf ( fMakefile, "\n" );
}
@@ -443,87 +476,155 @@ MingwModuleHandler::GenerateMacros (
module.name.c_str () );
}
-string
+void
MingwModuleHandler::GenerateGccCommand ( const Module& module,
const string& sourceFilename,
const string& cc,
const string& cflagsMacro ) const
{
string objectFilename = GetObjectFilename ( sourceFilename );
- return ssprintf ( "%s -c %s -o %s %s\n",
- cc.c_str (),
- sourceFilename.c_str (),
- objectFilename.c_str (),
- cflagsMacro.c_str () );
+ fprintf ( fMakefile,
+ "%s: %s\n",
+ objectFilename.c_str (),
+ sourceFilename.c_str () );
+ fprintf ( fMakefile,
+ "\t%s -c %s -o %s %s\n",
+ cc.c_str (),
+ sourceFilename.c_str (),
+ objectFilename.c_str (),
+ cflagsMacro.c_str () );
}
-string
+void
MingwModuleHandler::GenerateGccAssemblerCommand ( const Module& module,
const string& sourceFilename,
const string& cc,
const string& cflagsMacro ) const
{
string objectFilename = GetObjectFilename ( sourceFilename );
- return ssprintf ( "%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n",
- cc.c_str (),
- sourceFilename.c_str (),
- objectFilename.c_str (),
- cflagsMacro.c_str () );
+ fprintf ( fMakefile,
+ "%s: %s\n",
+ objectFilename.c_str (),
+ sourceFilename.c_str () );
+ fprintf ( fMakefile,
+ "\t%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n",
+ cc.c_str (),
+ sourceFilename.c_str (),
+ objectFilename.c_str (),
+ cflagsMacro.c_str () );
}
-string
+void
MingwModuleHandler::GenerateNasmCommand ( const Module& module,
const string& sourceFilename,
const string& nasmflagsMacro ) const
{
string objectFilename = GetObjectFilename ( sourceFilename );
- return ssprintf ( "%s -f win32 %s -o %s %s\n",
- "nasm",
- sourceFilename.c_str (),
- objectFilename.c_str (),
- nasmflagsMacro.c_str () );
+ fprintf ( fMakefile,
+ "%s: %s\n",
+ objectFilename.c_str (),
+ sourceFilename.c_str () );
+ fprintf ( fMakefile,
+ "\t%s -f win32 %s -o %s %s\n",
+ "nasm",
+ sourceFilename.c_str (),
+ objectFilename.c_str (),
+ nasmflagsMacro.c_str () );
}
-string
+void
MingwModuleHandler::GenerateWindresCommand ( const Module& module,
const string& sourceFilename,
const string& windresflagsMacro ) const
{
string objectFilename = GetObjectFilename ( sourceFilename );
- return ssprintf ( "%s %s -o %s ${%s}\n",
- "${windres}",
- sourceFilename.c_str (),
- objectFilename.c_str (),
- windresflagsMacro.c_str () );
+ fprintf ( fMakefile,
+ "%s: %s\n",
+ objectFilename.c_str (),
+ sourceFilename.c_str () );
+ fprintf ( fMakefile,
+ "\t%s %s -o %s ${%s}\n",
+ "${windres}",
+ sourceFilename.c_str (),
+ objectFilename.c_str (),
+ windresflagsMacro.c_str () );
}
-string
-MingwModuleHandler::GenerateCommand ( const Module& module,
- const string& sourceFilename,
- const string& cc,
- const string& cflagsMacro,
- const string& nasmflagsMacro,
- const string& windresflagsMacro ) const
+void
+MingwModuleHandler::GenerateWinebuildCommands ( const Module& module,
+ const string& sourceFilename ) const
+{
+ string basename = GetBasename ( sourceFilename );
+ fprintf ( fMakefile,
+ "%s.def: %s\n",
+ basename.c_str (),
+ sourceFilename.c_str () );
+ fprintf ( fMakefile,
+ "\t%s --def=%s -o %s.def\n",
+ "${winebuild}",
+ sourceFilename.c_str (),
+ basename.c_str () );
+
+ fprintf ( fMakefile,
+ "%s.stubs.c: %s\n",
+ basename.c_str (),
+ sourceFilename.c_str () );
+ fprintf ( fMakefile,
+ "\t%s --pedll=%s -o %s.stubs.c\n",
+ "${winebuild}",
+ sourceFilename.c_str (),
+ basename.c_str () );
+}
+
+void
+MingwModuleHandler::GenerateCommands ( const Module& module,
+ const string& sourceFilename,
+ const string& cc,
+ const string& cflagsMacro,
+ const string& nasmflagsMacro,
+ const string& windresflagsMacro ) const
{
string extension = GetExtension ( sourceFilename );
if ( extension == ".c" || extension == ".C" )
- return GenerateGccCommand ( module,
- sourceFilename,
- cc,
- cflagsMacro );
+ {
+ GenerateGccCommand ( module,
+ sourceFilename,
+ cc,
+ cflagsMacro );
+ return;
+ }
else if ( extension == ".s" || extension == ".S" )
- return GenerateGccAssemblerCommand ( module,
- sourceFilename,
- cc,
- cflagsMacro );
+ {
+ GenerateGccAssemblerCommand ( module,
+ sourceFilename,
+ cc,
+ cflagsMacro );
+ return;
+ }
else if ( extension == ".asm" || extension == ".ASM" )
- return GenerateNasmCommand ( module,
- sourceFilename,
- nasmflagsMacro );
+ {
+ GenerateNasmCommand ( module,
+ sourceFilename,
+ nasmflagsMacro );
+ return;
+ }
else if ( extension == ".rc" || extension == ".RC" )
- return GenerateWindresCommand ( module,
- sourceFilename,
- windresflagsMacro );
+ {
+ GenerateWindresCommand ( module,
+ sourceFilename,
+ windresflagsMacro );
+ return;
+ }
+ else if ( extension == ".spec" || extension == ".SPEC" )
+ {
+ GenerateWinebuildCommands ( module,
+ sourceFilename );
+ GenerateGccCommand ( module,
+ GetActualSourceFilename ( sourceFilename ),
+ cc,
+ cflagsMacro );
+ return;
+ }
throw InvalidOperationException ( __FILE__,
__LINE__,
@@ -614,19 +715,14 @@ MingwModuleHandler::GenerateObjectFileTargets ( const Module& module,
for ( i = 0; i < files.size (); i++ )
{
string sourceFilename = files[i]->name;
- string objectFilename = GetObjectFilename ( sourceFilename );
+ GenerateCommands ( module,
+ sourceFilename,
+ cc,
+ cflagsMacro,
+ nasmflagsMacro,
+ windresflagsMacro );
fprintf ( fMakefile,
- "%s: %s\n",
- objectFilename.c_str (),
- sourceFilename.c_str () );
- fprintf ( fMakefile,
- "\t%s\n",
- GenerateCommand ( module,
- sourceFilename,
- cc,
- cflagsMacro,
- nasmflagsMacro,
- windresflagsMacro ).c_str () );
+ "\n" );
}
for ( i = 0; i < ifs.size(); i++ )
@@ -937,8 +1033,10 @@ MingwModuleHandler::GenerateImportLibraryTargetIfNeeded ( const Module& module )
{
if ( module.importLibrary != NULL )
{
- fprintf ( fMakefile, "%s:\n",
- module.GetDependencyPath ().c_str () );
+ string definitionDependencies = GetDefinitionDependencies ( module );
+ fprintf ( fMakefile, "%s: %s\n",
+ module.GetDependencyPath ().c_str (),
+ definitionDependencies.c_str () );
fprintf ( fMakefile,
"\t${dlltool} --dllname %s --def %s --output-lib %s --kill-at\n\n",
@@ -948,6 +1046,44 @@ MingwModuleHandler::GenerateImportLibraryTargetIfNeeded ( const Module& module )
}
}
+string
+MingwModuleHandler::GetSpecObjectDependencies ( const string& filename ) const
+{
+ string basename = GetBasename ( filename );
+ return basename + ".def" + " " + basename + ".stubs.c";
+}
+
+string
+MingwModuleHandler::GetDefinitionDependencies ( const Module& module ) const
+{
+ string dependencies;
+ for ( size_t i = 0; i < module.files.size (); i++ )
+ {
+ File& file = *module.files[i];
+ string extension = GetExtension ( file.name );
+ if ( extension == ".spec" || extension == ".SPEC" )
+ {
+ if ( dependencies.length () > 0 )
+ dependencies += " ";
+ dependencies += GetSpecObjectDependencies ( file.name );
+ }
+ }
+ return dependencies;
+}
+
+string
+MingwModuleHandler::GetLinkingDependencies ( const Module& module ) const
+{
+ string dependencies = GetImportLibraryDependencies ( module );
+ string s = GetDefinitionDependencies ( module );
+ if ( s.length () > 0 )
+ {
+ dependencies += " ";
+ dependencies += s;
+ }
+ return dependencies;
+}
+
static MingwBuildToolModuleHandler buildtool_handler;
@@ -1141,6 +1277,7 @@ MingwKernelModeDriverModuleHandler::Process ( const Module& module )
GenerateInvocations ( module );
}
+
void
MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ( const Module& module )
{
@@ -1253,8 +1390,8 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module
static string ros_junk ( "$(ROS_TEMPORARY)" );
string target ( FixupTargetFilename ( module.GetPath () ) );
string workingDirectory = GetWorkingDirectory ( );
- string archiveFilename = GetModuleArchiveFilename ( module );
- string importLibraryDependencies = GetImportLibraryDependencies ( module );
+ string objectFilenames = GetObjectFilenames ( module );
+ string linkingDependencies = GetLinkingDependencies ( module );
GenerateImportLibraryTargetIfNeeded ( module );
@@ -1264,14 +1401,14 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module
fprintf ( fMakefile, "%s: %s %s\n",
target.c_str (),
- archiveFilename.c_str (),
- importLibraryDependencies.c_str () );
+ objectFilenames.c_str (),
+ linkingDependencies.c_str () );
string linkerParameters ( "-Wl,--subsystem,console -Wl,--entry,_DllMain@12 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -mdll" );
GenerateLinkerCommand ( module,
"${gcc}",
linkerParameters,
- archiveFilename );
+ objectFilenames );
}
else
{
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h
index 7cb54f885f3..66d76c6683b 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.h
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h
@@ -20,8 +20,10 @@ public:
protected:
std::string GetWorkingDirectory () const;
std::string GetExtension ( const std::string& filename ) const;
+ std::string GetBasename ( const std::string& filename ) const;
std::string ReplaceExtension ( const std::string& filename,
const std::string& newExtension ) const;
+ std::string GetActualSourceFilename ( const std::string& filename ) const;
std::string GetModuleArchiveFilename ( const Module& module ) const;
std::string GetImportLibraryDependencies ( const Module& module ) const;
std::string GetModuleDependencies ( const Module& module ) const;
@@ -46,6 +48,8 @@ protected:
const std::string& linkerParameters,
const std::string& objectFilenames ) const;
void GenerateImportLibraryTargetIfNeeded ( const Module& module ) const;
+ std::string GetDefinitionDependencies ( const Module& module ) const;
+ std::string GetLinkingDependencies ( const Module& module ) const;
static FILE* fMakefile;
private:
std::string ConcatenatePaths ( const std::string& path1,
@@ -79,26 +83,28 @@ private:
std::string GenerateGccIncludeParameters ( const Module& module ) const;
std::string GenerateGccParameters ( const Module& module ) const;
std::string GenerateNasmParameters ( const Module& module ) const;
- std::string GenerateGccCommand ( const Module& module,
- const std::string& sourceFilename,
- const std::string& cc,
- const std::string& cflagsMacro ) const;
- std::string GenerateGccAssemblerCommand ( const Module& module,
- const std::string& sourceFilename,
- const std::string& cc,
- const std::string& cflagsMacro ) const;
- std::string GenerateNasmCommand ( const Module& module,
- const std::string& sourceFilename,
- const std::string& nasmflagsMacro ) const;
- std::string GenerateWindresCommand ( const Module& module,
- const std::string& sourceFilename,
- const std::string& windresflagsMacro ) const;
- std::string GenerateCommand ( const Module& module,
+ void GenerateGccCommand ( const Module& module,
+ const std::string& sourceFilename,
+ const std::string& cc,
+ const std::string& cflagsMacro ) const;
+ void GenerateGccAssemblerCommand ( const Module& module,
+ const std::string& sourceFilename,
+ const std::string& cc,
+ const std::string& cflagsMacro ) const;
+ void GenerateNasmCommand ( const Module& module,
+ const std::string& sourceFilename,
+ const std::string& nasmflagsMacro ) const;
+ void GenerateWindresCommand ( const Module& module,
const std::string& sourceFilename,
- const std::string& cc,
- const std::string& cflagsMacro,
- const std::string& nasmflagsMacro,
const std::string& windresflagsMacro ) const;
+ void GenerateWinebuildCommands ( const Module& module,
+ const std::string& sourceFilename ) const;
+ void GenerateCommands ( const Module& module,
+ const std::string& sourceFilename,
+ const std::string& cc,
+ const std::string& cflagsMacro,
+ const std::string& nasmflagsMacro,
+ const std::string& windresflagsMacro ) const;
void GenerateObjectFileTargets ( const Module& module,
const std::vector& files,
const std::vector& ifs,
@@ -122,6 +128,7 @@ private:
const std::string& ar,
const std::string* clags ) const;
std::string GetPreconditionDependenciesName ( const Module& module ) const;
+ std::string GetSpecObjectDependencies ( const std::string& filename ) const;
};
diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h
index 6e04168a131..a7781d22c15 100644
--- a/reactos/tools/rbuild/rbuild.h
+++ b/reactos/tools/rbuild/rbuild.h
@@ -108,7 +108,7 @@ public:
bool HasImportLibrary () const;
std::string GetTargetName () const;
std::string GetDependencyPath () const;
- std::string GetBasePath() const;
+ std::string GetBasePath () const;
std::string GetPath () const;
std::string GetPathWithPrefix ( const std::string& prefix ) const;
std::string GetTargets () const;
diff --git a/reactos/tools/tools.xml b/reactos/tools/tools.xml
index dc4f09c58ca..a807939c9cb 100644
--- a/reactos/tools/tools.xml
+++ b/reactos/tools/tools.xml
@@ -10,3 +10,6 @@
+
+
+
diff --git a/reactos/tools/winebuild/winebuild.xml b/reactos/tools/winebuild/winebuild.xml
new file mode 100644
index 00000000000..daf86598f26
--- /dev/null
+++ b/reactos/tools/winebuild/winebuild.xml
@@ -0,0 +1,13 @@
+
+ .
+ include/wine
+
+ import.c
+ main.c
+ mkstemps.c
+ parser.c
+ res16.c
+ res32.c
+ spec32.c
+ utils.c
+