Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

driver2.cc File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fstream.h>
#include <iostream>
#include "types.h"

Include dependency graph for driver2.cc:

Include dependency graph

Go to the source code of this file.

Defines

#define OUTPUT_EXT   ".ii"
#define CPP_EXT   ".occ"
#define SLIB_EXT   ".so"
#define OBJ_EXT   ".o"

Functions

int execvp (...)
int wait (int *)
void ParseCmdOptions (int from, int argc, char **argv, char *&source)
void AddCppOption (const char *arg)
void AddCcOption (const char *arg)
void CloseCcOptions ()
void ShowCommandLine (const char *cmd, const char **args)
bool ParseTargetSpecificOptions (char *arg, char *&source_file)
void RunLinker ()
char * RunPreprocessor (const char *src)
char * OpenCxxOutputFileName (const char *src)
void RunCompiler (const char *src, const char *occsrc)
void RunSoCompiler (const char *src_file)
void * LoadSoLib (char *file_name)
void * LookupSymbol (void *handle, char *symbol)
char * MakeTempFilename (const char *src, const char *suffix)

Variables

const char * compilerName = "g++"
const char * linkerName = "ld"
const char * opencxxErrorMessage = " Error(s). OpenC++ stops.\n"
bool showProgram
bool doCompile
bool makeExecutable
bool doPreprocess
bool doTranslate
bool verboseMode
bool regularCpp
bool makeSharedLibrary
char * sharedLibraryName
bool preprocessTwice
const char * cppArgv []
const char * ccArgv []


Define Documentation

#define CPP_EXT   ".occ"
 

Definition at line 60 of file driver2.cc.

Referenced by RunPreprocessor().

#define OBJ_EXT   ".o"
 

Definition at line 62 of file driver2.cc.

#define OUTPUT_EXT   ".ii"
 

Definition at line 57 of file driver2.cc.

Referenced by OpenCxxOutputFileName().

#define SLIB_EXT   ".so"
 

Definition at line 61 of file driver2.cc.

Referenced by RunCompiler(), RunLinker(), and RunSoCompiler().


Function Documentation

void AddCcOption const char *    arg
 

void AddCppOption const char *    arg
 

void CloseCcOptions  
 

int execvp ...   
 

Referenced by process(), RunCompiler(), RunLinker(), RunPreprocessor(), and RunSoCompiler().

void * LoadSoLib char *    file_name
 

Definition at line 356 of file driver2.cc.

References nil, RTLD_GLOBAL, and RTLD_LAZY.

void * LookupSymbol void *    handle,
char *    symbol
 

Definition at line 371 of file driver2.cc.

References nil.

char * MakeTempFilename const char *    src,
const char *    suffix
[static]
 

Definition at line 424 of file driver2.cc.

References nil.

char* OpenCxxOutputFileName const char *    src
 

Definition at line 223 of file driver2.cc.

References MakeTempFilename(), and OUTPUT_EXT.

void ParseCmdOptions int    from,
int    argc,
char **    argv,
char *&    source
 

bool ParseTargetSpecificOptions char *    arg,
char *&    source_file
 

Definition at line 116 of file driver2.cc.

References FALSE.

void RunCompiler const char *    src,
const char *    occsrc
 

Definition at line 241 of file driver2.cc.

References AddCcOption(), ccArgv, CloseCcOptions(), compilerName, execvp(), makeExecutable, makeSharedLibrary, MakeTempFilename(), nil, sharedLibraryName, ShowCommandLine(), SLIB_EXT, and wait().

void RunLinker  
 

Definition at line 121 of file driver2.cc.

References AddCcOption(), ccArgv, CloseCcOptions(), compilerName, doCompile, execvp(), linkerName, makeExecutable, MakeTempFilename(), nil, sharedLibraryName, ShowCommandLine(), SLIB_EXT, and wait().

char* RunPreprocessor const char *    src
 

Definition at line 173 of file driver2.cc.

References AddCppOption(), compilerName, CPP_EXT, cppArgv, execvp(), MakeTempFilename(), regularCpp, ShowCommandLine(), and wait().

void RunSoCompiler const char *    src_file
 

Definition at line 308 of file driver2.cc.

References compilerName, execvp(), MakeTempFilename(), ShowCommandLine(), SLIB_EXT, and wait().

void ShowCommandLine const char *    cmd,
const char **    args
 

int wait int *   
 

Referenced by process(), RunCompiler(), RunLinker(), RunPreprocessor(), and RunSoCompiler().


Variable Documentation

const char* ccArgv[]
 

Definition at line 93 of file driver2.cc.

Referenced by RunCompiler(), and RunLinker().

const char* compilerName = "g++"
 

Definition at line 74 of file driver2.cc.

Referenced by RunCompiler(), RunLinker(), RunPreprocessor(), and RunSoCompiler().

const char* cppArgv[]
 

Definition at line 92 of file driver2.cc.

Referenced by RunPreprocessor().

bool doCompile
 

Definition at line 82 of file driver2.cc.

Referenced by RunLinker().

bool doPreprocess
 

Definition at line 84 of file driver2.cc.

bool doTranslate
 

Definition at line 85 of file driver2.cc.

const char* linkerName = "ld"
 

Definition at line 76 of file driver2.cc.

Referenced by RunLinker().

bool makeExecutable
 

Definition at line 83 of file driver2.cc.

Referenced by RunCompiler(), and RunLinker().

bool makeSharedLibrary
 

Definition at line 88 of file driver2.cc.

Referenced by RunCompiler().

const char* opencxxErrorMessage = " Error(s). OpenC++ stops.\n"
 

Definition at line 77 of file driver2.cc.

bool preprocessTwice
 

Definition at line 90 of file driver2.cc.

Referenced by ParseCmdOptions(), and ParseOptions().

bool regularCpp
 

Definition at line 87 of file driver2.cc.

Referenced by RunPreprocessor().

char* sharedLibraryName
 

Definition at line 89 of file driver2.cc.

Referenced by ParseCmdOptions(), ParseOptions(), RunCompiler(), and RunLinker().

bool showProgram
 

Definition at line 81 of file driver2.cc.

bool verboseMode
 

Definition at line 86 of file driver2.cc.


Generated on Mon Feb 10 17:33:28 2003 for VFiasco Semantics Compiler by doxygen1.2.15