mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 19:42:34 +00:00
Build ntdll.dll.
svn path=/branches/xmlbuildsystem/; revision=12926
This commit is contained in:
parent
444e4297dd
commit
6858112b10
7 changed files with 189 additions and 67 deletions
|
@ -1,66 +0,0 @@
|
|||
<!--
|
||||
Architecture to build for
|
||||
|
||||
Specify one of: i386
|
||||
Possible values in the future: alpha,i386,m68k,mips,powerpc
|
||||
-->
|
||||
|
||||
<define name="ARCH" value="i386" />
|
||||
|
||||
|
||||
<!--
|
||||
Which cpu should reactos optimze for
|
||||
example : i486, i586, pentium, pentium2, pentum3, pentium4
|
||||
athlon-xp, athlon-mp, k6-2,
|
||||
|
||||
see gcc manual for more cpu name and which cpu it can
|
||||
be optimze for.
|
||||
-->
|
||||
|
||||
<define name="OARCH" value="i486" />
|
||||
|
||||
<!--
|
||||
Whether to compile in the kernel debugger
|
||||
-->
|
||||
|
||||
<define name="KDBG" value="0" />
|
||||
|
||||
|
||||
<!--
|
||||
Whether to compile for debugging
|
||||
-->
|
||||
|
||||
<define name="DBG" value="0" />
|
||||
|
||||
|
||||
<!--
|
||||
Whether to compile with optimizations
|
||||
-->
|
||||
|
||||
<define name="OPTIMIZED" value="0" />
|
||||
|
||||
|
||||
<!--
|
||||
Whether to compile a multiprocessor or single processor version
|
||||
-->
|
||||
|
||||
<define name="MP" value="0" />
|
||||
|
||||
<!--
|
||||
Whether to compile for ACPI compliant systems
|
||||
-->
|
||||
|
||||
<define name="ACPI" value="0" />
|
||||
|
||||
|
||||
<!--
|
||||
whether to use a 3GB User, 1GB Kernel memory map
|
||||
-->
|
||||
|
||||
<define name="3GB" value="1" />
|
||||
|
||||
|
||||
<!--
|
||||
Which version of NDIS do we support up to?
|
||||
<define name="NDISVERSION" value="NDIS50" />
|
||||
-->
|
|
@ -1,6 +1,9 @@
|
|||
<directory name="kjs">
|
||||
<xi:include href="kjs/kjs.xml" />
|
||||
</directory>
|
||||
<directory name="ntdll">
|
||||
<xi:include href="ntdll/ntdll.xml" />
|
||||
</directory>
|
||||
<directory name="pseh">
|
||||
<xi:include href="pseh/pseh.xml" />
|
||||
</directory>
|
||||
|
|
108
reactos/lib/ntdll/ntdll.xml
Normal file
108
reactos/lib/ntdll/ntdll.xml
Normal file
|
@ -0,0 +1,108 @@
|
|||
<module name="ntdll" type="nativedll">
|
||||
<dependency>genntdll</dependency>
|
||||
<importlibrary definition="def/ntdll.def" />
|
||||
<define name="__NTDLL__" />
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<library>rosrtl</library>
|
||||
<library>rtl</library>
|
||||
<library>string</library>
|
||||
<directory name="csr">
|
||||
<file>capture.c</file>
|
||||
<file>lpc.c</file>
|
||||
<file>probe.c</file>
|
||||
<file>thread.c</file>
|
||||
</directory>
|
||||
<directory name="dbg">
|
||||
<file>brkpoint.c</file>
|
||||
<file>debug.c</file>
|
||||
<file>print.c</file>
|
||||
</directory>
|
||||
<directory name="ldr">
|
||||
<file>entry.S</file>
|
||||
<file>res.c</file>
|
||||
<file>startup.c</file>
|
||||
<file>utils.c</file>
|
||||
</directory>
|
||||
<directory name="main">
|
||||
<file>dllmain.c</file>
|
||||
</directory>
|
||||
<directory name="rtl">
|
||||
<directory name="i386">
|
||||
<file>alldiv.s</file>
|
||||
<file>allmul.s</file>
|
||||
<file>allrem.s</file>
|
||||
<file>allshl.s</file>
|
||||
<file>allshr.s</file>
|
||||
<file>aulldiv.s</file>
|
||||
<file>aullrem.s</file>
|
||||
<file>aullshr.s</file>
|
||||
<file>chkstk.s</file>
|
||||
<file>except.s</file>
|
||||
<file>exception.c</file>
|
||||
<file>float.c</file>
|
||||
<file>ftol.c</file>
|
||||
</directory>
|
||||
<file>access.c</file>
|
||||
<file>apc.c</file>
|
||||
<file>atom.c</file>
|
||||
<file>callback.c</file>
|
||||
<file>crc32.c</file>
|
||||
<file>critical.c</file>
|
||||
<file>dbgbuffer.c</file>
|
||||
<file>exception.c</file>
|
||||
<file>handle.c</file>
|
||||
<file>intrlck.c</file>
|
||||
<file>libsupp.c</file>
|
||||
<file>math.c</file>
|
||||
<file>message.c</file>
|
||||
<file>misc.c</file>
|
||||
<file>path.c</file>
|
||||
<file>ppb.c</file>
|
||||
<file>process.c</file>
|
||||
<file>propvar.c</file>
|
||||
<file>rangelist.c</file>
|
||||
<file>registry.c</file>
|
||||
<file>resource.c</file>
|
||||
<file>teb.c</file>
|
||||
<file>thread.c</file>
|
||||
<file>timerqueue.c</file>
|
||||
</directory>
|
||||
<directory name="stdio">
|
||||
<file>sprintf.c</file>
|
||||
<file>sscanf.c</file>
|
||||
<file>swprintf.c</file>
|
||||
</directory>
|
||||
<directory name="stdlib">
|
||||
<file>abs.c</file>
|
||||
<file>atoi64.c</file>
|
||||
<file>atoi.c</file>
|
||||
<file>atol.c</file>
|
||||
<file>bsearch.c</file>
|
||||
<file>itoa.c</file>
|
||||
<file>itow.c</file>
|
||||
<file>labs.c</file>
|
||||
<file>lfind.c</file>
|
||||
<file>mbstowcs.c</file>
|
||||
<file>splitp.c</file>
|
||||
<file>strtol.c</file>
|
||||
<file>strtoul.c</file>
|
||||
<file>wcstol.c</file>
|
||||
<file>wcstombs.c</file>
|
||||
<file>wcstoul.c</file>
|
||||
<file>wtoi64.c</file>
|
||||
<file>wtoi.c</file>
|
||||
<file>wtol.c</file>
|
||||
</directory>
|
||||
<directory name="string">
|
||||
<file>ctype.c</file>
|
||||
<file>memicmp.c</file>
|
||||
<file>stricmp.c</file>
|
||||
<file>strlwr.c</file>
|
||||
<file>strnicmp.c</file>
|
||||
<file>strpbrk.c</file>
|
||||
<file>strstr.c</file>
|
||||
<file>strupr.c</file>
|
||||
<file>wstring.c</file>
|
||||
</directory>
|
||||
<file>napi.c</file>
|
||||
</module>
|
|
@ -719,3 +719,65 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ( const Modul
|
|||
target.c_str ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static MingwNativeDLLModuleHandler nativedll_handler;
|
||||
|
||||
MingwNativeDLLModuleHandler::MingwNativeDLLModuleHandler ()
|
||||
: MingwModuleHandler ( NativeDLL )
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MingwNativeDLLModuleHandler::Process ( const Module& module )
|
||||
{
|
||||
GeneratePreconditionDependencies ( module );
|
||||
GenerateNativeDLLModuleTarget ( module );
|
||||
GenerateInvocations ( module );
|
||||
}
|
||||
|
||||
void
|
||||
MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( 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 );
|
||||
|
||||
if (module.importLibrary != NULL)
|
||||
{
|
||||
fprintf ( fMakefile, "%s:\n",
|
||||
module.GetDependencyPath ().c_str () );
|
||||
|
||||
fprintf ( fMakefile,
|
||||
"\t${dlltool} --dllname %s --def %s --output-lib %s --kill-at\n\n",
|
||||
module.GetTargetName ().c_str (),
|
||||
FixupTargetFilename ( module.GetBasePath () + SSEP + module.importLibrary->definition ).c_str (),
|
||||
FixupTargetFilename ( module.GetDependencyPath () ).c_str () );
|
||||
}
|
||||
|
||||
if (module.files.size () > 0)
|
||||
{
|
||||
fprintf ( fMakefile, "%s: %s %s\n",
|
||||
target.c_str (),
|
||||
archiveFilename.c_str (),
|
||||
importLibraryDependencies.c_str () );
|
||||
|
||||
fprintf ( fMakefile,
|
||||
"\t${gcc} -Wl,--subsystem,native -Wl,--entry,_DllMainCRTStartup@12 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -nostdlib -mdll -o %s %s %s\n",
|
||||
target.c_str (),
|
||||
archiveFilename.c_str (),
|
||||
importLibraryDependencies.c_str () );
|
||||
|
||||
GenerateArchiveTargetTarget ( module );
|
||||
GenerateObjectFileTargetsTarget ( module );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf ( fMakefile, "%s:\n\n",
|
||||
target.c_str ());
|
||||
fprintf ( fMakefile, ".PHONY: %s\n\n",
|
||||
target.c_str ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,4 +108,14 @@ private:
|
|||
void GenerateKernelModeDLLModuleTarget ( const Module& module );
|
||||
};
|
||||
|
||||
|
||||
class MingwNativeDLLModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwNativeDLLModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
private:
|
||||
void GenerateNativeDLLModuleTarget ( const Module& module );
|
||||
};
|
||||
|
||||
#endif /* MINGW_MODULEHANDLER_H */
|
||||
|
|
|
@ -152,6 +152,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
|
|||
return Kernel;
|
||||
if ( attribute.value == "kernelmodedll" )
|
||||
return KernelModeDLL;
|
||||
if ( attribute.value == "nativedll" )
|
||||
return NativeDLL;
|
||||
throw InvalidAttributeValueException ( location,
|
||||
attribute.name,
|
||||
attribute.value );
|
||||
|
@ -170,6 +172,8 @@ Module::GetDefaultModuleExtension () const
|
|||
return ".exe";
|
||||
case KernelModeDLL:
|
||||
return ".dll";
|
||||
case NativeDLL:
|
||||
return ".dll";
|
||||
}
|
||||
throw InvalidOperationException (__FILE__,
|
||||
__LINE__);
|
||||
|
|
|
@ -65,7 +65,8 @@ enum ModuleType
|
|||
BuildTool,
|
||||
StaticLibrary,
|
||||
Kernel,
|
||||
KernelModeDLL
|
||||
KernelModeDLL,
|
||||
NativeDLL
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue