--- /dev/null
+<directory name="ne2000">\r
+ <xi:include href="ne2000/ne2000.xml" />\r
+</directory>\r
+<directory name="pcnet">\r
+ <xi:include href="pcnet/pcnet.xml" />\r
+</directory>\r
--- /dev/null
+<module name="ne2000" type="kernelmodedriver">\r
+ <include base="ne2000">include</include>\r
+ <library>ndis</library>\r
+ <library>ntoskrnl</library>\r
+ <library>hal</library>\r
+ <directory name="ne2000">\r
+ <file>8390.c</file>\r
+ <file>main.c</file>\r
+ </directory>\r
+ <file>ne2000.rc</file>\r
+</module>\r
--- /dev/null
+<module name="pcnet" type="kernelmodedriver">\r
+ <include base="pcnet">.</include>\r
+ <define name="NDIS50_MINIPORT" />\r
+ <define name="__USE_W32API" />\r
+ <library>ndis</library>\r
+ <library>ntoskrnl</library>\r
+ <library>hal</library>\r
+ <file>pcnet.c</file>\r
+ <file>requests.c</file>\r
+ <file>pcnet.rc</file>\r
+</module>\r
<directory name="afd">\r
<xi:include href="afd/afd.xml" />\r
</directory>\r
+<directory name="dd">\r
+ <xi:include href="dd/directory.xml" />\r
+</directory>\r
+<directory name="ndis">\r
+ <xi:include href="ndis/ndis.xml" />\r
+</directory>\r
+<directory name="npf">\r
+ <xi:include href="npf/npf.xml" />\r
+</directory>\r
+<directory name="tcpip">\r
+ <xi:include href="tcpip/tcpip.xml" />\r
+</directory>\r
+<directory name="tdi">\r
+ <xi:include href="tdi/tdi.xml" />\r
+</directory>\r
+<directory name="wshtcpip">\r
+ <xi:include href="wshtcpip/wshtcpip.xml" />\r
+</directory>\r
--- /dev/null
+<module name="ndis" type="kernelmodedriver">\r
+ <importlibrary definition="ndis.def"></importlibrary>\r
+ <include base="ndis">include</include>\r
+ <define name="NDIS_WRAPPER" />\r
+ <define name="NDIS50" />\r
+ <define name="NDIS50_MINIPORT" />\r
+ <define name="BINARY_COMPATIBLE" />\r
+ <define name="__USE_W32API" />\r
+ <library>ntoskrnl</library>\r
+ <library>hal</library>\r
+ <directory name="ndis">\r
+ <file>40gone.c</file>\r
+ <file>50gone.c</file>\r
+ <file>buffer.c</file>\r
+ <file>cl.c</file>\r
+ <file>cm.c</file>\r
+ <file>co.c</file>\r
+ <file>config.c</file>\r
+ <file>control.c</file>\r
+ <file>efilter.c</file>\r
+ <file>hardware.c</file>\r
+ <file>io.c</file>\r
+ <file>main.c</file>\r
+ <file>memory.c</file>\r
+ <file>miniport.c</file>\r
+ <file>protocol.c</file>\r
+ <file>string.c</file>\r
+ <file>stubs.c</file>\r
+ <file>time.c</file>\r
+ </directory>\r
+ <file>ndis.rc</file>\r
+</module>\r
--- /dev/null
+<module name="npf" type="kernelmodedriver">\r
+ <include base="npf">include</include>\r
+ <include base="ntoskrnl">include</include>\r
+ <define name="WIN_NT_DRIVER" />\r
+ <define name="KQPC_TS" />\r
+ <define name="USE_KLOCKS" />\r
+ <define name="BINARY_COMPATIBLE" />\r
+ <library>ndis</library>\r
+ <library>ntoskrnl</library>\r
+ <library>hal</library>\r
+ <file>bucket_lookup.c</file>\r
+ <file>count_packets.c</file>\r
+ <file>dump.c</file>\r
+ <file>functions.c</file>\r
+ <file>jitter.c</file>\r
+ <file>memory_t.c</file>\r
+ <file>normal_lookup.c</file>\r
+ <file>openclos.c</file>\r
+ <file>packet.c</file>\r
+ <file>read.c</file>\r
+ <file>tcp_session.c</file>\r
+ <file>time_calls.c</file>\r
+ <file>tme.c</file>\r
+ <file>win_bpf_filter.c</file>\r
+ <file>win_bpf_filter_init.c</file>\r
+ <file>write.c</file>\r
+ <file>npf.rc</file>\r
+</module>\r
--- /dev/null
+<module name="tcpip" type="kernelmodedriver">\r
+ <importlibrary definition="tcpip.def"></importlibrary>\r
+ <include base="tcpip">include</include>\r
+ <include base="oskittcp">include</include>\r
+ <define name="_SEH_NO_NATIVE_NLG" />\r
+ <define name="NDIS40" />\r
+ <define name="__USE_W32API" />\r
+ <library>ip</library>\r
+ <library>oskittcp</library>\r
+ <library>ndis</library>\r
+ <library>rosrtl</library>\r
+ <library>pseh</library>\r
+ <library>ntoskrnl</library>\r
+ <library>hal</library>\r
+ <directory name="datalink">\r
+ <file>lan.c</file>\r
+ </directory>\r
+ <directory name="tcpip">\r
+ <file>buffer.c</file>\r
+ <file>bug.c</file>\r
+ <file>dispatch.c</file>\r
+ <file>fileobjs.c</file>\r
+ <file>iinfo.c</file>\r
+ <file>info.c</file>\r
+ <file>irp.c</file>\r
+ <file>lock.c</file>\r
+ <file>main.c</file>\r
+ <file>mockbuffer.c</file>\r
+ <file>mockbug.c</file>\r
+ <file>mocklock.c</file>\r
+ <file>mockpool.c</file>\r
+ <file>mockwait.c</file>\r
+ <file>ninfo.c</file>\r
+ <file>pool.c</file>\r
+ <file>proto.c</file>\r
+ <file>tinfo.c</file>\r
+ <file>wait.c</file>\r
+ </directory>\r
+ <file>tcpip.rc</file>\r
+</module>\r
--- /dev/null
+<module name="tdi" type="kernelmodedriver">\r
+ <importlibrary definition="misc/tdi.def"></importlibrary>\r
+ <library>ntoskrnl</library>\r
+ <library>hal</library>\r
+ <directory name="cte">\r
+ <file>string.c</file>\r
+ <file>stubs.c</file>\r
+ </directory>\r
+ <directory name="misc">\r
+ <file>main.c</file>\r
+ <file>tdi.rc</file>\r
+ </directory>\r
+ <directory name="tdi">\r
+ <file>dereg.c</file>\r
+ <file>handler.c</file>\r
+ <file>obsolete.c</file>\r
+ <file>stubs.c</file>\r
+ </directory>\r
+</module>\r
--- /dev/null
+<module name="wshtcpip" type="win32dll">\r
+ <importlibrary definition="wshtcpip.def"></importlibrary>\r
+ <include base="wshtcpip">.</include>\r
+ <define name="UNICODE" />\r
+ <define name="__USE_W32API" />\r
+ <library>ntdll</library>\r
+ <library>kernel32</library>\r
+ <library>ws2_32</library>\r
+ <file>wshtcpip.c</file>\r
+ <file>wshtcpip.rc</file>\r
+</module>\r
--- /dev/null
+<module name="adns" type="staticlibrary">\r
+ <include base="adns">src</include>\r
+ <include base="adns">adns_win32</include>\r
+ <define name="ADNS_JGAA_WIN32" />\r
+ <directory name="adns_win32">\r
+ <file>adns_unix_calls.c</file>\r
+ </directory>\r
+ <directory name="src">\r
+ <file>check.c</file>\r
+ <file>event.c</file>\r
+ <file>general.c</file>\r
+ <file>parse.c</file>\r
+ <file>poll.c</file>\r
+ <file>query.c</file>\r
+ <file>reply.c</file>\r
+ <file>setup.c</file>\r
+ <file>transmit.c</file>\r
+ <file>types.c</file>\r
+ </directory>\r
+</module>\r
+<directory name="adns">\r
+ <xi:include href="adns/adns.xml" />\r
+</directory>\r
<directory name="advapi32">\r
<xi:include href="advapi32/advapi32.xml" />\r
</directory>\r
+<directory name="dnsapi">\r
+ <xi:include href="dnsapi/dnsapi.xml" />\r
+</directory>\r
<directory name="gdi32">\r
<xi:include href="gdi32/gdi32.xml" />\r
</directory>\r
+<directory name="iphlpapi">\r
+ <xi:include href="iphlpapi/iphlpapi.xml" />\r
+</directory>\r
<directory name="kernel32">\r
<xi:include href="kernel32/kernel32.xml" />\r
</directory>\r
<directory name="user32">\r
<xi:include href="user32/user32.xml" />\r
</directory>\r
+<directory name="ws2_32">\r
+ <xi:include href="ws2_32/ws2_32.xml" />\r
+</directory>\r
--- /dev/null
+<module name="dnsapi" type="win32dll">\r
+ <importlibrary definition="dnsapi.def" />\r
+ <include base="dnsapi">include</include>\r
+ <include base="adns">src</include>\r
+ <include base="adns">adns_win32</include>\r
+ <define name="_DISABLE_TIDENTS" />\r
+ <define name="ADNS_JGAA_WIN32" />\r
+ <define name="__USE_W32API" />\r
+ <library>adns</library>\r
+ <library>rosrtl</library>\r
+ <library>ntdll</library>\r
+ <library>kernel32</library>\r
+ <library>user32</library>\r
+ <library>msvcrt</library>\r
+ <library>ws2_32</library>\r
+ <library>iphlpapi</library>\r
+ <directory name="dnsapi">\r
+ <file>adns.c</file>\r
+ <file>context.c</file>\r
+ <file>free.c</file>\r
+ <file>names.c</file>\r
+ <file>query.c</file>\r
+ <file>stubs.c</file>\r
+ </directory>\r
+ <file>dnsapi.rc</file>\r
+</module>\r
--- /dev/null
+<module name="iphlpapi" type="win32dll">\r
+ <dependency>winebuild</dependency>\r
+ <importlibrary definition="iphlpapi.def" />\r
+ <include base="iphlpapi">include</include>\r
+ <include base="ReactOS">include/wine</include>\r
+ <define name="YDEBUG" />\r
+ <define name="UNICODE" />\r
+ <define name="_UNICODE" />\r
+ <define name="__REACTOS__" />\r
+ <define name="__USE_W32API" />\r
+ <library>wine</library>\r
+<!-- <library>wine_uuid</library> -->\r
+ <library>rtl</library>\r
+ <library>ntdll</library>\r
+ <library>kernel32</library>\r
+ <library>advapi32</library>\r
+ <library>ws2_32</library>\r
+ <file>ifenum_reactos.c</file>\r
+ <file>ipstats_reactos.c</file>\r
+ <file>iphlpapi_main.c</file>\r
+ <file>media.c</file>\r
+ <file>registry.c</file>\r
+ <file>resinfo_reactos.c</file>\r
+ <file>route_reactos.c</file>\r
+ <file>iphlpapi.rc</file>\r
+ <file>iphlpapi.spec</file>\r
+</module>\r
<file>swab.c</file>\r
<file>wcstod.c</file>\r
<file>wcstol.c</file>\r
- <file>wcstom.c</file>\r
<file>wcstomb.c</file>\r
<file>wcstombs.c</file>\r
<file>wcstoul.c</file>\r
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)
--- /dev/null
+<module name="ws2_32" type="win32dll">\r
+ <importlibrary definition="ws2_32.def" />\r
+ <include base="ws2_32">include</include>\r
+ <define name="_DISABLE_TIDENTS" />\r
+ <define name="UNICODE" />\r
+ <define name="LE" />\r
+ <define name="__USE_W32API" />\r
+ <define name="_WIN32_WINNT">0x0500</define>\r
+ <library>ntdll</library>\r
+ <library>kernel32</library>\r
+ <library>user32</library>\r
+ <library>advapi32</library>\r
+ <library>dnsapi</library>\r
+ <directory name="misc">\r
+ <file>bsd.c</file>\r
+ <file>catalog.c</file>\r
+ <file>dllmain.c</file>\r
+ <file>event.c</file>\r
+ <file>handle.c</file>\r
+ <file>ns.c</file>\r
+ <file>sndrcv.c</file>\r
+ <file>stubs.c</file>\r
+ <file>upcall.c</file>\r
+ </directory>\r
+ <file>ws2_32.rc</file>\r
+</module>\r
fprintf ( fMakefile, "gcc = gcc\n" );\r
fprintf ( fMakefile, "ld = ld\n" );\r
fprintf ( fMakefile, "ar = ar\n" );\r
- fprintf ( fMakefile, "dlltool = dlltool\n\n" );\r
- fprintf ( fMakefile, "windres = windres\n\n" );\r
+ fprintf ( fMakefile, "dlltool = dlltool\n" );\r
+ fprintf ( fMakefile, "windres = windres\n" );\r
+ fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild\n" );\r
+ fprintf ( fMakefile, "\n" );\r
GenerateGlobalCFlagsAndProperties (\r
"=",\r
ProjectNode.properties,\r
return "";\r
}\r
\r
+string\r
+MingwModuleHandler::GetBasename ( const string& filename ) const\r
+{\r
+ size_t index = filename.find_last_of ( '.' );\r
+ if (index != string::npos)\r
+ return filename.substr ( 0, index );\r
+ return "";\r
+}\r
+\r
string\r
MingwModuleHandler::ReplaceExtension ( const string& filename,\r
const string& newExtension ) const\r
return filename;\r
}\r
\r
+string\r
+MingwModuleHandler::GetActualSourceFilename ( const string& filename ) const\r
+{\r
+ string extension = GetExtension ( filename );\r
+ if ( extension == ".spec" || extension == "SPEC" )\r
+ {\r
+ string basename = GetBasename( filename );\r
+ return basename + ".stubs.c";\r
+ }\r
+ else\r
+ return filename;\r
+}\r
+\r
string\r
MingwModuleHandler::GetModuleArchiveFilename ( const Module& module ) const\r
{\r
const Module* dependencyModule = dependency->dependencyModule;\r
dependencies += dependencyModule->GetTargets ();\r
}\r
+ string definitionDependencies = GetDefinitionDependencies ( module );\r
+ if ( dependencies.length () > 0 && definitionDependencies.length () > 0 )\r
+ dependencies += " " + definitionDependencies;\r
+ else if ( definitionDependencies.length () > 0 )\r
+ dependencies = definitionDependencies;\r
return dependencies;\r
}\r
\r
\r
string sourceFilenames ( "" );\r
for ( i = 0; i < module.files.size (); i++ )\r
- sourceFilenames += " " + module.files[i]->name;\r
+ sourceFilenames += " " + GetActualSourceFilename ( module.files[i]->name );\r
vector<If*> ifs = module.ifs;\r
for ( i = 0; i < ifs.size(); i++ )\r
{\r
for ( j = 0; j < rIf.ifs.size(); j++ )\r
ifs.push_back ( rIf.ifs[j] );\r
for ( j = 0; j < rIf.files.size(); j++ )\r
- sourceFilenames += " " + rIf.files[j]->name;\r
+ sourceFilenames += " " + GetActualSourceFilename ( rIf.files[j]->name );\r
}\r
return sourceFilenames;\r
}\r
string extension = GetExtension ( sourceFilename );\r
if ( extension == ".rc" || extension == ".RC" )\r
newExtension = ".coff";\r
+ else if ( extension == ".spec" || extension == ".SPEC" )\r
+ newExtension = ".stubs.o";\r
else\r
newExtension = ".o";\r
return FixupTargetFilename ( ReplaceExtension ( sourceFilename,\r
}\r
fprintf ( fMakefile, "\n" );\r
}\r
- \r
+\r
void\r
MingwModuleHandler::GenerateMacros (\r
const char* assignmentOperation,\r
assignmentOperation );\r
for ( i = 0; i < files.size(); i++ )\r
{\r
- fprintf (\r
- fMakefile,\r
- "%s%s",\r
- ( i%10 == 9 ? "\\\n\t" : " " ),\r
- GetObjectFilename(files[i]->name).c_str() );\r
+ string extension = GetExtension ( files[i]->name );\r
+ if ( extension != ".spec" && extension != ".SPEC" )\r
+ {\r
+ fprintf (\r
+ fMakefile,\r
+ "%s%s",\r
+ ( i%10 == 9 ? "\\\n\t" : " " ),\r
+ GetObjectFilename(files[i]->name).c_str() );\r
+ }\r
}\r
fprintf ( fMakefile, "\n" );\r
}\r
module.name.c_str () );\r
}\r
\r
-string\r
+void\r
MingwModuleHandler::GenerateGccCommand ( const Module& module,\r
const string& sourceFilename,\r
const string& cc,\r
const string& cflagsMacro ) const\r
{\r
string objectFilename = GetObjectFilename ( sourceFilename );\r
- return ssprintf ( "%s -c %s -o %s %s\n",\r
- cc.c_str (),\r
- sourceFilename.c_str (),\r
- objectFilename.c_str (),\r
- cflagsMacro.c_str () );\r
+ fprintf ( fMakefile,\r
+ "%s: %s\n",\r
+ objectFilename.c_str (),\r
+ sourceFilename.c_str () );\r
+ fprintf ( fMakefile,\r
+ "\t%s -c %s -o %s %s\n",\r
+ cc.c_str (),\r
+ sourceFilename.c_str (),\r
+ objectFilename.c_str (),\r
+ cflagsMacro.c_str () );\r
}\r
\r
-string\r
+void\r
MingwModuleHandler::GenerateGccAssemblerCommand ( const Module& module,\r
const string& sourceFilename,\r
const string& cc,\r
const string& cflagsMacro ) const\r
{\r
string objectFilename = GetObjectFilename ( sourceFilename );\r
- return ssprintf ( "%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n",\r
- cc.c_str (),\r
- sourceFilename.c_str (),\r
- objectFilename.c_str (),\r
- cflagsMacro.c_str () );\r
+ fprintf ( fMakefile,\r
+ "%s: %s\n",\r
+ objectFilename.c_str (),\r
+ sourceFilename.c_str () );\r
+ fprintf ( fMakefile,\r
+ "\t%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n",\r
+ cc.c_str (),\r
+ sourceFilename.c_str (),\r
+ objectFilename.c_str (),\r
+ cflagsMacro.c_str () );\r
}\r
\r
-string\r
+void\r
MingwModuleHandler::GenerateNasmCommand ( const Module& module,\r
const string& sourceFilename,\r
const string& nasmflagsMacro ) const\r
{\r
string objectFilename = GetObjectFilename ( sourceFilename );\r
- return ssprintf ( "%s -f win32 %s -o %s %s\n",\r
- "nasm",\r
- sourceFilename.c_str (),\r
- objectFilename.c_str (),\r
- nasmflagsMacro.c_str () );\r
+ fprintf ( fMakefile,\r
+ "%s: %s\n",\r
+ objectFilename.c_str (),\r
+ sourceFilename.c_str () );\r
+ fprintf ( fMakefile,\r
+ "\t%s -f win32 %s -o %s %s\n",\r
+ "nasm",\r
+ sourceFilename.c_str (),\r
+ objectFilename.c_str (),\r
+ nasmflagsMacro.c_str () );\r
}\r
\r
-string\r
+void\r
MingwModuleHandler::GenerateWindresCommand ( const Module& module,\r
const string& sourceFilename,\r
const string& windresflagsMacro ) const\r
{\r
string objectFilename = GetObjectFilename ( sourceFilename );\r
- return ssprintf ( "%s %s -o %s ${%s}\n",\r
- "${windres}",\r
- sourceFilename.c_str (),\r
- objectFilename.c_str (),\r
- windresflagsMacro.c_str () );\r
+ fprintf ( fMakefile,\r
+ "%s: %s\n",\r
+ objectFilename.c_str (),\r
+ sourceFilename.c_str () );\r
+ fprintf ( fMakefile,\r
+ "\t%s %s -o %s ${%s}\n",\r
+ "${windres}",\r
+ sourceFilename.c_str (),\r
+ objectFilename.c_str (),\r
+ windresflagsMacro.c_str () );\r
}\r
\r
-string\r
-MingwModuleHandler::GenerateCommand ( const Module& module,\r
- const string& sourceFilename,\r
- const string& cc,\r
- const string& cflagsMacro,\r
- const string& nasmflagsMacro,\r
- const string& windresflagsMacro ) const\r
+void\r
+MingwModuleHandler::GenerateWinebuildCommands ( const Module& module,\r
+ const string& sourceFilename ) const\r
+{\r
+ string basename = GetBasename ( sourceFilename );\r
+ fprintf ( fMakefile,\r
+ "%s.def: %s\n",\r
+ basename.c_str (),\r
+ sourceFilename.c_str () );\r
+ fprintf ( fMakefile,\r
+ "\t%s --def=%s -o %s.def\n",\r
+ "${winebuild}",\r
+ sourceFilename.c_str (),\r
+ basename.c_str () );\r
+\r
+ fprintf ( fMakefile,\r
+ "%s.stubs.c: %s\n",\r
+ basename.c_str (),\r
+ sourceFilename.c_str () );\r
+ fprintf ( fMakefile,\r
+ "\t%s --pedll=%s -o %s.stubs.c\n",\r
+ "${winebuild}",\r
+ sourceFilename.c_str (),\r
+ basename.c_str () );\r
+}\r
+\r
+void\r
+MingwModuleHandler::GenerateCommands ( const Module& module,\r
+ const string& sourceFilename,\r
+ const string& cc,\r
+ const string& cflagsMacro,\r
+ const string& nasmflagsMacro,\r
+ const string& windresflagsMacro ) const\r
{\r
string extension = GetExtension ( sourceFilename );\r
if ( extension == ".c" || extension == ".C" )\r
- return GenerateGccCommand ( module,\r
- sourceFilename,\r
- cc,\r
- cflagsMacro );\r
+ {\r
+ GenerateGccCommand ( module,\r
+ sourceFilename,\r
+ cc,\r
+ cflagsMacro );\r
+ return;\r
+ }\r
else if ( extension == ".s" || extension == ".S" )\r
- return GenerateGccAssemblerCommand ( module,\r
- sourceFilename,\r
- cc,\r
- cflagsMacro );\r
+ {\r
+ GenerateGccAssemblerCommand ( module,\r
+ sourceFilename,\r
+ cc,\r
+ cflagsMacro );\r
+ return;\r
+ }\r
else if ( extension == ".asm" || extension == ".ASM" )\r
- return GenerateNasmCommand ( module,\r
- sourceFilename,\r
- nasmflagsMacro );\r
+ {\r
+ GenerateNasmCommand ( module,\r
+ sourceFilename,\r
+ nasmflagsMacro );\r
+ return;\r
+ }\r
else if ( extension == ".rc" || extension == ".RC" )\r
- return GenerateWindresCommand ( module,\r
- sourceFilename,\r
- windresflagsMacro );\r
+ {\r
+ GenerateWindresCommand ( module,\r
+ sourceFilename,\r
+ windresflagsMacro );\r
+ return;\r
+ }\r
+ else if ( extension == ".spec" || extension == ".SPEC" )\r
+ {\r
+ GenerateWinebuildCommands ( module,\r
+ sourceFilename );\r
+ GenerateGccCommand ( module,\r
+ GetActualSourceFilename ( sourceFilename ),\r
+ cc,\r
+ cflagsMacro );\r
+ return;\r
+ }\r
\r
throw InvalidOperationException ( __FILE__,\r
__LINE__,\r
for ( i = 0; i < files.size (); i++ )\r
{\r
string sourceFilename = files[i]->name;\r
- string objectFilename = GetObjectFilename ( sourceFilename );\r
- fprintf ( fMakefile,\r
- "%s: %s\n",\r
- objectFilename.c_str (),\r
- sourceFilename.c_str () );\r
+ GenerateCommands ( module,\r
+ sourceFilename,\r
+ cc,\r
+ cflagsMacro,\r
+ nasmflagsMacro,\r
+ windresflagsMacro );\r
fprintf ( fMakefile,\r
- "\t%s\n",\r
- GenerateCommand ( module,\r
- sourceFilename,\r
- cc,\r
- cflagsMacro,\r
- nasmflagsMacro,\r
- windresflagsMacro ).c_str () );\r
+ "\n" );\r
}\r
\r
for ( i = 0; i < ifs.size(); i++ )\r
{\r
if ( module.importLibrary != NULL )\r
{\r
- fprintf ( fMakefile, "%s:\n",\r
- module.GetDependencyPath ().c_str () );\r
+ string definitionDependencies = GetDefinitionDependencies ( module );\r
+ fprintf ( fMakefile, "%s: %s\n",\r
+ module.GetDependencyPath ().c_str (),\r
+ definitionDependencies.c_str () );\r
\r
fprintf ( fMakefile,\r
"\t${dlltool} --dllname %s --def %s --output-lib %s --kill-at\n\n",\r
}\r
}\r
\r
+string\r
+MingwModuleHandler::GetSpecObjectDependencies ( const string& filename ) const\r
+{\r
+ string basename = GetBasename ( filename );\r
+ return basename + ".def" + " " + basename + ".stubs.c";\r
+}\r
+\r
+string\r
+MingwModuleHandler::GetDefinitionDependencies ( const Module& module ) const\r
+{\r
+ string dependencies;\r
+ for ( size_t i = 0; i < module.files.size (); i++ )\r
+ {\r
+ File& file = *module.files[i];\r
+ string extension = GetExtension ( file.name );\r
+ if ( extension == ".spec" || extension == ".SPEC" )\r
+ {\r
+ if ( dependencies.length () > 0 )\r
+ dependencies += " ";\r
+ dependencies += GetSpecObjectDependencies ( file.name );\r
+ }\r
+ }\r
+ return dependencies;\r
+}\r
+\r
+string\r
+MingwModuleHandler::GetLinkingDependencies ( const Module& module ) const\r
+{\r
+ string dependencies = GetImportLibraryDependencies ( module );\r
+ string s = GetDefinitionDependencies ( module );\r
+ if ( s.length () > 0 )\r
+ {\r
+ dependencies += " ";\r
+ dependencies += s;\r
+ }\r
+ return dependencies;\r
+}\r
+\r
\r
static MingwBuildToolModuleHandler buildtool_handler;\r
\r
GenerateInvocations ( module );\r
}\r
\r
+\r
void\r
MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ( const Module& module )\r
{\r
static string ros_junk ( "$(ROS_TEMPORARY)" );\r
string target ( FixupTargetFilename ( module.GetPath () ) );\r
string workingDirectory = GetWorkingDirectory ( );\r
- string archiveFilename = GetModuleArchiveFilename ( module );\r
- string importLibraryDependencies = GetImportLibraryDependencies ( module );\r
+ string objectFilenames = GetObjectFilenames ( module );\r
+ string linkingDependencies = GetLinkingDependencies ( module );\r
\r
GenerateImportLibraryTargetIfNeeded ( module );\r
\r
\r
fprintf ( fMakefile, "%s: %s %s\n",\r
target.c_str (),\r
- archiveFilename.c_str (),\r
- importLibraryDependencies.c_str () );\r
+ objectFilenames.c_str (),\r
+ linkingDependencies.c_str () );\r
\r
string linkerParameters ( "-Wl,--subsystem,console -Wl,--entry,_DllMain@12 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -mdll" );\r
GenerateLinkerCommand ( module,\r
"${gcc}",\r
linkerParameters,\r
- archiveFilename );\r
+ objectFilenames );\r
}\r
else\r
{\r
protected:\r
std::string GetWorkingDirectory () const;\r
std::string GetExtension ( const std::string& filename ) const;\r
+ std::string GetBasename ( const std::string& filename ) const;\r
std::string ReplaceExtension ( const std::string& filename,\r
const std::string& newExtension ) const;\r
+ std::string GetActualSourceFilename ( const std::string& filename ) const;\r
std::string GetModuleArchiveFilename ( const Module& module ) const;\r
std::string GetImportLibraryDependencies ( const Module& module ) const;\r
std::string GetModuleDependencies ( const Module& module ) const;\r
const std::string& linkerParameters,\r
const std::string& objectFilenames ) const;\r
void GenerateImportLibraryTargetIfNeeded ( const Module& module ) const;\r
+ std::string GetDefinitionDependencies ( const Module& module ) const;\r
+ std::string GetLinkingDependencies ( const Module& module ) const;\r
static FILE* fMakefile;\r
private:\r
std::string ConcatenatePaths ( const std::string& path1,\r
std::string GenerateGccIncludeParameters ( const Module& module ) const;\r
std::string GenerateGccParameters ( const Module& module ) const;\r
std::string GenerateNasmParameters ( const Module& module ) const;\r
- std::string GenerateGccCommand ( const Module& module,\r
- const std::string& sourceFilename,\r
- const std::string& cc,\r
- const std::string& cflagsMacro ) const;\r
- std::string GenerateGccAssemblerCommand ( const Module& module,\r
- const std::string& sourceFilename,\r
- const std::string& cc,\r
- const std::string& cflagsMacro ) const;\r
- std::string GenerateNasmCommand ( const Module& module,\r
- const std::string& sourceFilename,\r
- const std::string& nasmflagsMacro ) const;\r
- std::string GenerateWindresCommand ( const Module& module,\r
- const std::string& sourceFilename,\r
- const std::string& windresflagsMacro ) const;\r
- std::string GenerateCommand ( const Module& module,\r
+ void GenerateGccCommand ( const Module& module,\r
+ const std::string& sourceFilename,\r
+ const std::string& cc,\r
+ const std::string& cflagsMacro ) const;\r
+ void GenerateGccAssemblerCommand ( const Module& module,\r
+ const std::string& sourceFilename,\r
+ const std::string& cc,\r
+ const std::string& cflagsMacro ) const;\r
+ void GenerateNasmCommand ( const Module& module,\r
+ const std::string& sourceFilename,\r
+ const std::string& nasmflagsMacro ) const;\r
+ void GenerateWindresCommand ( const Module& module,\r
const std::string& sourceFilename,\r
- const std::string& cc,\r
- const std::string& cflagsMacro,\r
- const std::string& nasmflagsMacro,\r
const std::string& windresflagsMacro ) const;\r
+ void GenerateWinebuildCommands ( const Module& module,\r
+ const std::string& sourceFilename ) const;\r
+ void GenerateCommands ( const Module& module,\r
+ const std::string& sourceFilename,\r
+ const std::string& cc,\r
+ const std::string& cflagsMacro,\r
+ const std::string& nasmflagsMacro,\r
+ const std::string& windresflagsMacro ) const;\r
void GenerateObjectFileTargets ( const Module& module,\r
const std::vector<File*>& files,\r
const std::vector<If*>& ifs,\r
const std::string& ar,\r
const std::string* clags ) const;\r
std::string GetPreconditionDependenciesName ( const Module& module ) const;\r
+ std::string GetSpecObjectDependencies ( const std::string& filename ) const;\r
};\r
\r
\r
bool HasImportLibrary () const;\r
std::string GetTargetName () const;\r
std::string GetDependencyPath () const;\r
- std::string GetBasePath() const;\r
+ std::string GetBasePath () const;\r
std::string GetPath () const;\r
std::string GetPathWithPrefix ( const std::string& prefix ) const;\r
std::string GetTargets () const;\r
<directory name="wmc">\r
<xi:include href="wmc/wmc.xml" />\r
</directory>\r
+<directory name="winebuild">\r
+ <xi:include href="winebuild/winebuild.xml" />\r
+</directory>\r
--- /dev/null
+<module name="winebuild" type="buildtool">\r
+ <include base="winebuild">.</include>\r
+ <include base="ReactOS">include/wine</include>\r
+ <define name="__USE_W32API" />\r
+ <file>import.c</file>\r
+ <file>main.c</file>\r
+ <file>mkstemps.c</file>\r
+ <file>parser.c</file>\r
+ <file>res16.c</file>\r
+ <file>res32.c</file>\r
+ <file>spec32.c</file>\r
+ <file>utils.c</file>\r
+</module>\r