#include "occCommon.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <limits.h>
#include <fstream>
#include <iostream>
#include "types.h"
#include <dlfcn.h>
Include dependency graph for driver2l.cpp:
Defines | |
#define | lt_dlhandle void * |
#define | PREPROCESSOR_EXT ".i" |
#define | TRANSLATOR_EXT ".ii" |
#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) |
lt_dlhandle | LoadSoLib (char *file_name) |
void * | LookupSymbol (lt_dlhandle handle, char *symbol) |
void | RunSoLinker (const char *org_src, char *target) |
char * | MakeTempFilename (const char *src, const char *suffix) |
void | SetTargetDirectory (const char *dirPath) |
const char * | GetTargetDirectory () |
void | AddCc2Option (const char *arg) |
Variables | |
const char * | compilerName = "g++" |
const char * | linkerName = "ld" |
bool | showProgram |
bool | doCompile |
bool | makeExecutable |
bool | doPreprocess |
bool | doTranslate |
bool | verboseMode |
bool | regularCpp |
bool | makeSharedLibrary |
char * | sharedLibraryName |
bool | preprocessTwice |
const int | NARGS |
int | cppArgc |
int | ccArgc |
int | cc2Argc |
const char * | cppArgv [] |
const char * | ccArgv [] |
const char * | cc2Argv [] |
char | targetDir [PATH_MAX] = "" |
This file contains platform dependent functions of the original OpenC++ plus a few new platform dependent functions added by Josef Troch.
Functions from this file are used on Linux / gcc platform. The same functions for Windows / MSVC platform can be found in driver2.cpp.
Only functions added or modified by Josef Troch are commented.
|
|
|
Extension of files generated by preprocessor.
|
|
Extension of files that are the results of IOPC SP / OpenC++ translation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Runs preprocessor (g++ / cpre) on
|
|
|
|
Runs compiler (g++) on Sends the compiler the parameters specified when executing IOPC SP / OpenC++ (only the "compiler" options). Adds to them some parameters specified by IOPC SP / OpenC++ options, if called from IOPC SP adds some parameters needed for translated source to compile (two bytes wchar_t support).
|
|
|
|
|
|
|
|
|
|
Creates temporary filename from given filename ( Rewritten by JT - uses targetDir now..
|
|
Sets path (targetDir) into which files generated by IOPC SP / OpenC++ should be placed. Sets drive and directory (targetDrive, targetDir) into which files generated by IOPC SP / OpenC++ should be placed. |
|
Gets path into which files generated by IOPC SP / OpenC++ should be placed. See SetTargetDirectory().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Path into which files generated by IOPC SP / OpenC++ should be placed.
|