71 lines
1.3 KiB
C++
71 lines
1.3 KiB
C++
#ifndef C_H
|
|
#define C_H
|
|
|
|
#include "tier0/platform.h"
|
|
#include "tier1/utlstring.h"
|
|
#include "tier1/utlvector.h"
|
|
#include "runner.h"
|
|
#include "ld.h"
|
|
#include "target.h"
|
|
#include "helper.h"
|
|
|
|
struct C_Macro_t
|
|
{
|
|
CUtlString szName;
|
|
CUtlString szValue;
|
|
};
|
|
|
|
enum ECVersion
|
|
{
|
|
CVERSION_89,
|
|
CVERSION_99 = 0,
|
|
CVERSION_11,
|
|
CVERSION_17,
|
|
CVERSION_23,
|
|
CVERSION_2Y,
|
|
};
|
|
|
|
enum ECPPVersion
|
|
{
|
|
CPPVERSION_98 = 1,
|
|
CPPVERSION_11 = 0,
|
|
CPPVERSION_14 = 2,
|
|
CPPVERSION_17 = 3,
|
|
CPPVERSION_20 = 4,
|
|
CPPVERSION_23 = 5,
|
|
CPPVERSION_2C = 6,
|
|
};
|
|
|
|
struct CProject_t : public CPUProject_t
|
|
{
|
|
public:
|
|
CUtlVector<CUtlString> files = {};
|
|
CUtlVector<CUtlString> includeDirectories = {};
|
|
CUtlVector<CUtlString> includeFiles = {};
|
|
CUtlVector<C_Macro_t> macros = {};
|
|
|
|
bool bFPIE = false;
|
|
bool bFPIC = false;
|
|
|
|
ECVersion cVersion;
|
|
ECPPVersion cppVersion;
|
|
|
|
AndroidManifest_t m_androidmanifest;
|
|
};
|
|
|
|
#define C_COMPILER_INTERFACE_NAME "CCompiler001"
|
|
#define CLANG_C_COMPILER_INTERFACE_NAME "ClangCCompiler001"
|
|
#define GCC_C_COMPILER_INTERFACE_NAME "GCCCCompiler001"
|
|
#define MSVC_C_COMPILER_INTERFACE_NAME "MSVCCCompiler001"
|
|
|
|
abstract_class ICCompiler
|
|
{
|
|
public:
|
|
virtual LinkProject_t Compile( CProject_t *pProject ) = 0;
|
|
virtual void GenerateLinterData( void ) = 0;
|
|
};
|
|
|
|
extern ICCompiler *ccompiler;
|
|
|
|
#endif
|