mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:42:57 +00:00
Parse libraries.
svn path=/branches/xmlbuildsystem/; revision=12840
This commit is contained in:
parent
91d97cbc91
commit
7d876c4d0c
8 changed files with 72 additions and 12 deletions
|
@ -5,12 +5,29 @@
|
|||
#include "mingw.h"
|
||||
#include "modulehandler.h"
|
||||
|
||||
MingwModuleHandler::MingwModuleHandler ()
|
||||
using std::string;
|
||||
|
||||
MingwModuleHandler::MingwModuleHandler ( FILE* fMakefile )
|
||||
: fMakefile ( fMakefile )
|
||||
{
|
||||
}
|
||||
|
||||
string MingwModuleHandler::GetModuleDependencies ( Module& module )
|
||||
{
|
||||
string dependencies ( "" );
|
||||
|
||||
for ( size_t i = 0; i < module.libraries.size(); i++ )
|
||||
{
|
||||
if (dependencies.size () > 0)
|
||||
dependencies += " ";
|
||||
dependencies += module.libraries[i]->name;
|
||||
}
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
MingwKernelModuleHandler::MingwKernelModuleHandler ()
|
||||
|
||||
MingwKernelModuleHandler::MingwKernelModuleHandler ( FILE* fMakefile )
|
||||
: MingwModuleHandler ( fMakefile )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -21,4 +38,15 @@ bool MingwKernelModuleHandler::CanHandleModule ( Module& module )
|
|||
|
||||
void MingwKernelModuleHandler::Process ( Module& module )
|
||||
{
|
||||
GenerateKernelModuleTarget ( module );
|
||||
}
|
||||
|
||||
void MingwKernelModuleHandler::GenerateKernelModuleTarget ( Module& module )
|
||||
{
|
||||
fprintf ( fMakefile, "%s: %s",
|
||||
module.name.c_str (),
|
||||
GetModuleDependencies ( module ).c_str () );
|
||||
fprintf ( fMakefile, "\n" );
|
||||
fprintf ( fMakefile, "\t" );
|
||||
fprintf ( fMakefile, "\n\n" );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue