Parse libraries.

svn path=/branches/xmlbuildsystem/; revision=12840
This commit is contained in:
Casper Hornstrup 2005-01-05 22:36:17 +00:00
parent 91d97cbc91
commit 7d876c4d0c
8 changed files with 72 additions and 12 deletions

View file

@ -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" );
}