This commit is contained in:
2025-06-04 00:18:32 +03:00
parent 804711f2c4
commit 5d85ebd85f
17 changed files with 108 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ public:
CUtlVector<CUtlString> includeFiles;
bool bFPIE;
bool bFPIC;
bool bDebug = m_target.optimization == TARGET_DEBUG;
CLDProject Compile();
static void GenerateCompileCommands();
};

View File

@@ -2,12 +2,14 @@
#define HELPER_H
#include "tier1/utlstring.h"
#include "target.h"
#define FPC_TEMPORAL_DIRNAME ".fpc"
class CProject
{
public:
Target_t m_target = Target_t::DefaultTarget();
CUtlString m_szName;
unsigned int GenerateProjectHash( void );
};
@@ -20,6 +22,7 @@ public:
static void MakeDirectory( const char *psz );
static void CopyFile( const char *szDestination, const char *szOrigin );
static void CopyDirectory( const char *szDestination, const char *szOrigin );
static bool ShouldRecompile( const char *szSource, const char *szOutput );
};
class CBuildStage

View File

@@ -13,10 +13,18 @@ enum ETargetCPU
TARGET_CPU_I386,
};
enum ETargetOptimization
{
TARGET_DEBUG,
TARGET_RELEASE_SPEED,
TARGET_RELEASE_SIZE
};
struct Target_t
{
ETargetKernel kernel;
ETargetCPU cpu;
ETargetOptimization optimization;
static Target_t DefaultTarget();
};