mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:53:05 +00:00
* Keep project level includes and defines in PROJECT_CFLAGS
* Win32dll module type support * Build kernel32.dll svn path=/branches/xmlbuildsystem/; revision=12985
This commit is contained in:
parent
a868feb94a
commit
37ff0b66b5
10 changed files with 245 additions and 16 deletions
|
@ -395,6 +395,11 @@ MingwModuleHandler::GenerateMacros (
|
|||
"endif\n\n" );
|
||||
}
|
||||
}
|
||||
|
||||
fprintf (
|
||||
fMakefile,
|
||||
"%s_CFLAGS += $(PROJECT_CFLAGS)\n\n",
|
||||
module.name.c_str () );
|
||||
}
|
||||
|
||||
string
|
||||
|
@ -939,3 +944,64 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
|
|||
target.c_str ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static MingwWin32DLLModuleHandler win32dll_handler;
|
||||
|
||||
MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler ()
|
||||
: MingwModuleHandler ( Win32DLL )
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MingwWin32DLLModuleHandler::Process ( const Module& module )
|
||||
{
|
||||
GeneratePreconditionDependencies ( module );
|
||||
GenerateWin32DLLModuleTarget ( module );
|
||||
GenerateInvocations ( module );
|
||||
}
|
||||
|
||||
void
|
||||
MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( 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,console -Wl,--entry,_DllMain@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 () );
|
||||
|
||||
GenerateMacrosAndTargetsTarget ( module );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf ( fMakefile, "%s:\n\n",
|
||||
target.c_str ());
|
||||
fprintf ( fMakefile, ".PHONY: %s\n\n",
|
||||
target.c_str ());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue