diff --git a/reactos/config.template.xml b/reactos/config.template.xml
index 341c54850bb..e69de29bb2d 100644
--- a/reactos/config.template.xml
+++ b/reactos/config.template.xml
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/reactos/lib/directory.xml b/reactos/lib/directory.xml
index 42a7bf6dc9a..83f82969501 100644
--- a/reactos/lib/directory.xml
+++ b/reactos/lib/directory.xml
@@ -1,6 +1,9 @@
+
+
+
diff --git a/reactos/lib/ntdll/ntdll.xml b/reactos/lib/ntdll/ntdll.xml
new file mode 100644
index 00000000000..0a8afdf7a67
--- /dev/null
+++ b/reactos/lib/ntdll/ntdll.xml
@@ -0,0 +1,108 @@
+
+ genntdll
+
+
+
+ rosrtl
+ rtl
+ string
+
+ capture.c
+ lpc.c
+ probe.c
+ thread.c
+
+
+ brkpoint.c
+ debug.c
+ print.c
+
+
+ entry.S
+ res.c
+ startup.c
+ utils.c
+
+
+ dllmain.c
+
+
+
+ alldiv.s
+ allmul.s
+ allrem.s
+ allshl.s
+ allshr.s
+ aulldiv.s
+ aullrem.s
+ aullshr.s
+ chkstk.s
+ except.s
+ exception.c
+ float.c
+ ftol.c
+
+ access.c
+ apc.c
+ atom.c
+ callback.c
+ crc32.c
+ critical.c
+ dbgbuffer.c
+ exception.c
+ handle.c
+ intrlck.c
+ libsupp.c
+ math.c
+ message.c
+ misc.c
+ path.c
+ ppb.c
+ process.c
+ propvar.c
+ rangelist.c
+ registry.c
+ resource.c
+ teb.c
+ thread.c
+ timerqueue.c
+
+
+ sprintf.c
+ sscanf.c
+ swprintf.c
+
+
+ abs.c
+ atoi64.c
+ atoi.c
+ atol.c
+ bsearch.c
+ itoa.c
+ itow.c
+ labs.c
+ lfind.c
+ mbstowcs.c
+ splitp.c
+ strtol.c
+ strtoul.c
+ wcstol.c
+ wcstombs.c
+ wcstoul.c
+ wtoi64.c
+ wtoi.c
+ wtol.c
+
+
+ ctype.c
+ memicmp.c
+ stricmp.c
+ strlwr.c
+ strnicmp.c
+ strpbrk.c
+ strstr.c
+ strupr.c
+ wstring.c
+
+ napi.c
+
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
index de6c5e8afab..4542a1fd3ba 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -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 ());
+ }
+}
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h
index 2d752222548..d7bf6a5015e 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.h
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h
@@ -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 */
diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp
index 56ce6882e5d..fba4022ad92 100644
--- a/reactos/tools/rbuild/module.cpp
+++ b/reactos/tools/rbuild/module.cpp
@@ -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__);
diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h
index 1eb5cab3b63..8411a35d8b3 100644
--- a/reactos/tools/rbuild/rbuild.h
+++ b/reactos/tools/rbuild/rbuild.h
@@ -65,7 +65,8 @@ enum ModuleType
BuildTool,
StaticLibrary,
Kernel,
- KernelModeDLL
+ KernelModeDLL,
+ NativeDLL
};