Build snmpapi and network applications
Modified: branches/xmlbuildsystem/reactos/ReactOS.xml
Added: branches/xmlbuildsystem/reactos/apps/directory.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/directory.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/arp/arp.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/finger/finger.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/ipconfig/ipconfig.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/netstat/netstat.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/telnet/telnet.xml
Added: branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.xml
Modified: branches/xmlbuildsystem/reactos/lib/directory.xml
Added: branches/xmlbuildsystem/reactos/lib/snmpapi/snmpapi.xml
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp

Modified: branches/xmlbuildsystem/reactos/ReactOS.xml
--- branches/xmlbuildsystem/reactos/ReactOS.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/ReactOS.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -21,6 +21,9 @@
 	<include>w32api/include</include>
 	<include>w32api/include/ddk</include>
 
+	<directory name="apps">
+		<xi:include href="apps/directory.xml" />
+	</directory>
 	<directory name="boot">
 		<xi:include href="boot/boot.xml" />
 	</directory>

Added: branches/xmlbuildsystem/reactos/apps/directory.xml
--- branches/xmlbuildsystem/reactos/apps/directory.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/directory.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,3 @@
+<directory name="utils">
+	<xi:include href="utils/directory.xml" />
+</directory>

Added: branches/xmlbuildsystem/reactos/apps/utils/directory.xml
--- branches/xmlbuildsystem/reactos/apps/utils/directory.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/directory.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,3 @@
+<directory name="net">
+	<xi:include href="net/directory.xml" />
+</directory>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/arp/arp.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/arp/arp.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/arp/arp.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,9 @@
+<module name="arp" type="win32cui">
+	<include base="arp">.</include>
+	<define name="__USE_W32API" />
+	<library>kernel32</library>
+	<library>user32</library>
+	<library>snmpapi</library>
+	<file>arp.c</file>
+	<file>arp.rc</file>
+</module>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/directory.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,21 @@
+<directory name="arp">
+	<xi:include href="arp/arp.xml" />
+</directory>
+<directory name="finger">
+	<xi:include href="finger/finger.xml" />
+</directory>
+<directory name="ipconfig">
+	<xi:include href="ipconfig/ipconfig.xml" />
+</directory>
+<directory name="netstat">
+	<xi:include href="netstat/netstat.xml" />
+</directory>
+<directory name="ping">
+	<xi:include href="ping/ping.xml" />
+</directory>
+<directory name="telnet">
+	<xi:include href="telnet/telnet.xml" />
+</directory>
+<directory name="whois">
+	<xi:include href="whois/whois.xml" />
+</directory>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/finger/finger.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/finger/finger.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/finger/finger.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,11 @@
+<module name="finger" type="win32cui">
+	<include base="finger">.</include>
+	<define name="__USE_W32_SOCKETS" />
+	<library>kernel32</library>
+	<library>ws2_32</library>
+	<file>finger.c</file>
+	<file>err.c</file>
+	<file>getopt.c</file>
+	<file>net.c</file>
+	<file>finger.rc</file>
+</module>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/ipconfig/ipconfig.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/ipconfig/ipconfig.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/ipconfig/ipconfig.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,10 @@
+<module name="ipconfig" type="win32cui">
+	<include base="ipconfig">.</include>
+	<define name="__USE_W32API" />
+	<library>kernel32</library>
+	<library>user32</library>
+	<library>iphlpapi</library>
+	<file>ipconfig.c</file>
+	<file>trace.c</file>
+	<file>ipconfig.rc</file>
+</module>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/netstat/netstat.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/netstat/netstat.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/netstat/netstat.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,14 @@
+<module name="netstat" type="win32cui">
+	<include base="netstat">.</include>
+	<define name="__USE_W32API" />
+	<define name="_WIN32_IE">0x600</define>
+	<define name="_WIN32_WINNT">0x501</define>
+	<library>kernel32</library>
+	<library>user32</library>
+	<library>ws2_32</library>
+	<library>snmpapi</library>
+	<library>iphlpapi</library>
+	<file>netstat.c</file>
+	<file>trace.c</file>
+	<file>netstat.rc</file>
+</module>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/ping/ping.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,10 @@
+<module name="ping" type="win32cui">
+	<include base="ping">.</include>
+	<define name="__USE_W32_SOCKETS" />
+	<define name="_WIN32_IE">0x600</define>
+	<define name="_WIN32_WINNT">0x501</define>
+	<library>kernel32</library>
+	<library>ws2_32</library>
+	<file>ping.c</file>
+	<file>ping.rc</file>
+</module>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/telnet/telnet.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/telnet/telnet.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/telnet/telnet.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,29 @@
+<module name="telnet" type="win32cui">
+	<include base="telnet">.</include>
+	<define name="__USE_W32API" />
+	<define name="__REACTOS__" />
+	<library>kernel32</library>
+	<library>ws2_32</library>
+	<directory name="src">
+		<file>ansiprsr.cpp</file>
+		<file>keytrans.cpp</file>
+		<file>tcharmap.cpp</file>
+		<file>tconsole.cpp</file>
+		<file>tkeydef.cpp</file>
+		<file>tkeymap.cpp</file>
+		<file>tmapldr.cpp</file>
+		<file>tmouse.cpp</file>
+		<file>tnclass.cpp</file>
+		<file>tnclip.cpp</file>
+		<file>tncon.cpp</file>
+		<file>tnconfig.cpp</file>
+		<file>tnerror.cpp</file>
+		<file>tnetwork.cpp</file>
+		<file>tnmain.cpp</file>
+		<file>tnmisc.cpp</file>
+		<file>tscript.cpp</file>
+		<file>tscroll.cpp</file>
+		<file>ttelhndl.cpp</file>
+	</directory>
+	<file>telnet.rc</file>
+</module>

Added: branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.xml
--- branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/apps/utils/net/whois/whois.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,7 @@
+<module name="whois" type="win32cui">
+	<include base="whois">.</include>
+	<library>kernel32</library>
+	<library>ws2_32</library>
+	<file>whois.c</file>
+	<file>whois.rc</file>
+</module>

Modified: branches/xmlbuildsystem/reactos/lib/directory.xml
--- branches/xmlbuildsystem/reactos/lib/directory.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/lib/directory.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -203,6 +203,9 @@
 <directory name="shlwapi">
 	<xi:include href="shlwapi/shlwapi.xml" />
 </directory>
+<directory name="snmpapi">
+	<xi:include href="snmpapi/snmpapi.xml" />
+</directory>
 <directory name="string">
 	<xi:include href="string/string.xml" />
 </directory>

Added: branches/xmlbuildsystem/reactos/lib/snmpapi/snmpapi.xml
--- branches/xmlbuildsystem/reactos/lib/snmpapi/snmpapi.xml	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/lib/snmpapi/snmpapi.xml	2005-02-06 11:01:22 UTC (rev 13435)
@@ -0,0 +1,10 @@
+<module name="snmpapi" type="win32dll">
+	<importlibrary definition="snmpapi.def" />
+	<include base="snmpapi">.</include>
+	<define name="UNICODE" />
+	<define name="_DISABLE_TIDENTS" />
+	<library>ntdll</library>
+	<library>kernel32</library>
+	<file>snmpapi.c</file>
+	<file>snmpapi.rc</file>
+</module>

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-02-06 10:50:50 UTC (rev 13434)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler.cpp	2005-02-06 11:01:22 UTC (rev 13435)
@@ -1767,10 +1767,16 @@
 		          objectFilenames.c_str (),
 		          importLibraryDependencies.c_str () );
 
+		string linker;
+		if ( IsCPlusPlusModule ( module ) )
+			linker = "${gpp}";
+		else
+			linker = "${gcc}";
+
 		string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,0x00400000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000",
 		                                     module.entrypoint.c_str () );
 		GenerateLinkerCommand ( module,
-		                        "${gcc}",
+		                        linker,
 		                        linkerParameters,
 		                        objectFilenames );
 	}