Build snmpapi and network applications
authorCasper Hornstrup <chorns@users.sourceforge.net>
Sun, 6 Feb 2005 11:01:22 +0000 (11:01 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Sun, 6 Feb 2005 11:01:22 +0000 (11:01 +0000)
svn path=/branches/xmlbuildsystem/; revision=13435

14 files changed:
reactos/ReactOS.xml
reactos/apps/directory.xml [new file with mode: 0644]
reactos/apps/utils/directory.xml [new file with mode: 0644]
reactos/apps/utils/net/arp/arp.xml [new file with mode: 0644]
reactos/apps/utils/net/directory.xml [new file with mode: 0644]
reactos/apps/utils/net/finger/finger.xml [new file with mode: 0644]
reactos/apps/utils/net/ipconfig/ipconfig.xml [new file with mode: 0644]
reactos/apps/utils/net/netstat/netstat.xml [new file with mode: 0644]
reactos/apps/utils/net/ping/ping.xml [new file with mode: 0644]
reactos/apps/utils/net/telnet/telnet.xml [new file with mode: 0644]
reactos/apps/utils/net/whois/whois.xml [new file with mode: 0644]
reactos/lib/directory.xml
reactos/lib/snmpapi/snmpapi.xml [new file with mode: 0644]
reactos/tools/rbuild/backend/mingw/modulehandler.cpp

index ea644fe..019f3a9 100644 (file)
@@ -21,6 +21,9 @@
        <include>w32api/include</include>\r
        <include>w32api/include/ddk</include>\r
 \r
+       <directory name="apps">\r
+               <xi:include href="apps/directory.xml" />\r
+       </directory>\r
        <directory name="boot">\r
                <xi:include href="boot/boot.xml" />\r
        </directory>\r
diff --git a/reactos/apps/directory.xml b/reactos/apps/directory.xml
new file mode 100644 (file)
index 0000000..6ba4fa5
--- /dev/null
@@ -0,0 +1,3 @@
+<directory name="utils">\r
+       <xi:include href="utils/directory.xml" />\r
+</directory>\r
diff --git a/reactos/apps/utils/directory.xml b/reactos/apps/utils/directory.xml
new file mode 100644 (file)
index 0000000..5fcd82e
--- /dev/null
@@ -0,0 +1,3 @@
+<directory name="net">\r
+       <xi:include href="net/directory.xml" />\r
+</directory>\r
diff --git a/reactos/apps/utils/net/arp/arp.xml b/reactos/apps/utils/net/arp/arp.xml
new file mode 100644 (file)
index 0000000..8a6b084
--- /dev/null
@@ -0,0 +1,9 @@
+<module name="arp" type="win32cui">\r
+       <include base="arp">.</include>\r
+       <define name="__USE_W32API" />\r
+       <library>kernel32</library>\r
+       <library>user32</library>\r
+       <library>snmpapi</library>\r
+       <file>arp.c</file>\r
+       <file>arp.rc</file>\r
+</module>\r
diff --git a/reactos/apps/utils/net/directory.xml b/reactos/apps/utils/net/directory.xml
new file mode 100644 (file)
index 0000000..57b9d6a
--- /dev/null
@@ -0,0 +1,21 @@
+<directory name="arp">\r
+       <xi:include href="arp/arp.xml" />\r
+</directory>\r
+<directory name="finger">\r
+       <xi:include href="finger/finger.xml" />\r
+</directory>\r
+<directory name="ipconfig">\r
+       <xi:include href="ipconfig/ipconfig.xml" />\r
+</directory>\r
+<directory name="netstat">\r
+       <xi:include href="netstat/netstat.xml" />\r
+</directory>\r
+<directory name="ping">\r
+       <xi:include href="ping/ping.xml" />\r
+</directory>\r
+<directory name="telnet">\r
+       <xi:include href="telnet/telnet.xml" />\r
+</directory>\r
+<directory name="whois">\r
+       <xi:include href="whois/whois.xml" />\r
+</directory>\r
diff --git a/reactos/apps/utils/net/finger/finger.xml b/reactos/apps/utils/net/finger/finger.xml
new file mode 100644 (file)
index 0000000..8bacec9
--- /dev/null
@@ -0,0 +1,11 @@
+<module name="finger" type="win32cui">\r
+       <include base="finger">.</include>\r
+       <define name="__USE_W32_SOCKETS" />\r
+       <library>kernel32</library>\r
+       <library>ws2_32</library>\r
+       <file>finger.c</file>\r
+       <file>err.c</file>\r
+       <file>getopt.c</file>\r
+       <file>net.c</file>\r
+       <file>finger.rc</file>\r
+</module>\r
diff --git a/reactos/apps/utils/net/ipconfig/ipconfig.xml b/reactos/apps/utils/net/ipconfig/ipconfig.xml
new file mode 100644 (file)
index 0000000..e842e84
--- /dev/null
@@ -0,0 +1,10 @@
+<module name="ipconfig" type="win32cui">\r
+       <include base="ipconfig">.</include>\r
+       <define name="__USE_W32API" />\r
+       <library>kernel32</library>\r
+       <library>user32</library>\r
+       <library>iphlpapi</library>\r
+       <file>ipconfig.c</file>\r
+       <file>trace.c</file>\r
+       <file>ipconfig.rc</file>\r
+</module>\r
diff --git a/reactos/apps/utils/net/netstat/netstat.xml b/reactos/apps/utils/net/netstat/netstat.xml
new file mode 100644 (file)
index 0000000..a882736
--- /dev/null
@@ -0,0 +1,14 @@
+<module name="netstat" type="win32cui">\r
+       <include base="netstat">.</include>\r
+       <define name="__USE_W32API" />\r
+       <define name="_WIN32_IE">0x600</define>\r
+       <define name="_WIN32_WINNT">0x501</define>\r
+       <library>kernel32</library>\r
+       <library>user32</library>\r
+       <library>ws2_32</library>\r
+       <library>snmpapi</library>\r
+       <library>iphlpapi</library>\r
+       <file>netstat.c</file>\r
+       <file>trace.c</file>\r
+       <file>netstat.rc</file>\r
+</module>\r
diff --git a/reactos/apps/utils/net/ping/ping.xml b/reactos/apps/utils/net/ping/ping.xml
new file mode 100644 (file)
index 0000000..358b82c
--- /dev/null
@@ -0,0 +1,10 @@
+<module name="ping" type="win32cui">\r
+       <include base="ping">.</include>\r
+       <define name="__USE_W32_SOCKETS" />\r
+       <define name="_WIN32_IE">0x600</define>\r
+       <define name="_WIN32_WINNT">0x501</define>\r
+       <library>kernel32</library>\r
+       <library>ws2_32</library>\r
+       <file>ping.c</file>\r
+       <file>ping.rc</file>\r
+</module>\r
diff --git a/reactos/apps/utils/net/telnet/telnet.xml b/reactos/apps/utils/net/telnet/telnet.xml
new file mode 100644 (file)
index 0000000..fff6993
--- /dev/null
@@ -0,0 +1,29 @@
+<module name="telnet" type="win32cui">\r
+       <include base="telnet">.</include>\r
+       <define name="__USE_W32API" />\r
+       <define name="__REACTOS__" />\r
+       <library>kernel32</library>\r
+       <library>ws2_32</library>\r
+       <directory name="src">\r
+               <file>ansiprsr.cpp</file>\r
+               <file>keytrans.cpp</file>\r
+               <file>tcharmap.cpp</file>\r
+               <file>tconsole.cpp</file>\r
+               <file>tkeydef.cpp</file>\r
+               <file>tkeymap.cpp</file>\r
+               <file>tmapldr.cpp</file>\r
+               <file>tmouse.cpp</file>\r
+               <file>tnclass.cpp</file>\r
+               <file>tnclip.cpp</file>\r
+               <file>tncon.cpp</file>\r
+               <file>tnconfig.cpp</file>\r
+               <file>tnerror.cpp</file>\r
+               <file>tnetwork.cpp</file>\r
+               <file>tnmain.cpp</file>\r
+               <file>tnmisc.cpp</file>\r
+               <file>tscript.cpp</file>\r
+               <file>tscroll.cpp</file>\r
+               <file>ttelhndl.cpp</file>\r
+       </directory>\r
+       <file>telnet.rc</file>\r
+</module>\r
diff --git a/reactos/apps/utils/net/whois/whois.xml b/reactos/apps/utils/net/whois/whois.xml
new file mode 100644 (file)
index 0000000..c02caf8
--- /dev/null
@@ -0,0 +1,7 @@
+<module name="whois" type="win32cui">\r
+       <include base="whois">.</include>\r
+       <library>kernel32</library>\r
+       <library>ws2_32</library>\r
+       <file>whois.c</file>\r
+       <file>whois.rc</file>\r
+</module>\r
index ea2c8be..89e3be5 100644 (file)
 <directory name="shlwapi">\r
        <xi:include href="shlwapi/shlwapi.xml" />\r
 </directory>\r
+<directory name="snmpapi">\r
+       <xi:include href="snmpapi/snmpapi.xml" />\r
+</directory>\r
 <directory name="string">\r
        <xi:include href="string/string.xml" />\r
 </directory>\r
diff --git a/reactos/lib/snmpapi/snmpapi.xml b/reactos/lib/snmpapi/snmpapi.xml
new file mode 100644 (file)
index 0000000..f1193e6
--- /dev/null
@@ -0,0 +1,10 @@
+<module name="snmpapi" type="win32dll">\r
+       <importlibrary definition="snmpapi.def" />\r
+       <include base="snmpapi">.</include>\r
+       <define name="UNICODE" />\r
+       <define name="_DISABLE_TIDENTS" />\r
+       <library>ntdll</library>\r
+       <library>kernel32</library>\r
+       <file>snmpapi.c</file>\r
+       <file>snmpapi.rc</file>\r
+</module>\r
index fbfa609..43e78a2 100644 (file)
@@ -1767,10 +1767,16 @@ MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget ( const Module& module
                          objectFilenames.c_str (),\r
                          importLibraryDependencies.c_str () );\r
 \r
+               string linker;\r
+               if ( IsCPlusPlusModule ( module ) )\r
+                       linker = "${gpp}";\r
+               else\r
+                       linker = "${gcc}";\r
+\r
                string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,0x00400000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000",\r
                                                     module.entrypoint.c_str () );\r
                GenerateLinkerCommand ( module,\r
-                                       "${gcc}",\r
+                                       linker,\r
                                        linkerParameters,\r
                                        objectFilenames );\r
        }\r