int main( int argc, char* argv[] )
{
// Get inputs
- if( argc < 5 )
+ if( argc < 4 )
{
std::cerr
<< "Usage: " << argv[ 0 ]
- << " definitons_file library_name output_path number_of_sources"
+ << " definitons_file library_name output_prefix"
<< std::endl;
return( 1 );
} // fi
std::string definitions_filename = argv[ 1 ];
std::string library_name = argv[ 2 ];
- std::string output_path = argv[ 3 ];
- unsigned int number_of_sources = std::atoi( argv[ 4 ] );
+ std::string output_prefix = argv[ 3 ];
+ unsigned int number_of_sources = cpPlugins_CONFIG_NUMBER_OF_FILES;
// Read inputs
std::string definitions_buffer;
// Write header
std::stringstream header_filename;
- header_filename << output_path << "/" << library_name << ".h";
+ header_filename << output_prefix << ".h";
if( !( cpPlugins_bash::Write( header.str( ), header_filename.str( ) ) ) )
{
std::cerr << "Error writing header file." << std::endl;
<< "#include <" << library_name << "_Export.h>"
<< std::endl;
source
- << "#include <" << output_path<< "/" << library_name << ".h>"
+ << "#include <" << output_prefix << ".h>"
<< std::endl << std::endl;
if( tfiles.size( ) > 0 )
{
source << std::endl << "// eof" << std::endl;
std::stringstream source_file;
source_file
- << output_path << "/" << library_name << "_" << f_id << ".cxx";
+ << output_prefix << "_" << f_id << ".cxx";
if( !( cpPlugins_bash::Write( source.str( ), source_file.str( ) ) ) )
{
std::cerr << "Error writing source code." << std::endl;