added forgotten files
This commit is contained in:
32
tier0/build.cpp
Normal file
32
tier0/build.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "helper.h"
|
||||
#include "c.h"
|
||||
#include "ld.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
CUtlVector<CUtlString> tier0_CompiledFiles = {
|
||||
"lib.cpp",
|
||||
"mem.cpp",
|
||||
"platform.cpp",
|
||||
"network.cpp",
|
||||
};
|
||||
|
||||
DECLARE_BUILD_STAGE(tier0)
|
||||
{
|
||||
CProject_t compileProject = {};
|
||||
LinkProject_t ldProject = {};
|
||||
CUtlString szOutputProject = "";
|
||||
|
||||
compileProject.m_szName = "tier0";
|
||||
compileProject.files = tier0_CompiledFiles;
|
||||
compileProject.includeDirectories = {"../public"};
|
||||
compileProject.bFPIC = true;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
|
||||
ldProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
||||
szOutputProject = linker->Link(&ldProject);
|
||||
|
||||
ADD_OUTPUT_LIBRARY(szOutputProject);
|
||||
|
||||
return 0;
|
||||
};
|
||||
@@ -1,7 +1,4 @@
|
||||
#include "tier0/network.h"
|
||||
#include "steam/isteamnetworkingsockets.h"
|
||||
#include "steam/isteamnetworkingutils.h"
|
||||
#include "steam/steamnetworkingtypes.h"
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
|
||||
|
||||
@@ -214,18 +214,20 @@ PLATFORM_INTERFACE const char *Plat_GetEnv( const char *szVar )
|
||||
|
||||
PLATFORM_INTERFACE void Plat_SetWorkingDir( const char *psz )
|
||||
{
|
||||
|
||||
chdir(psz);
|
||||
}
|
||||
|
||||
PLATFORM_INTERFACE const char *Plat_GetWorkingDir( void )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 4096
|
||||
#endif
|
||||
|
||||
PLATFORM_INTERFACE const char *Plat_GetWorkingDir( void )
|
||||
{
|
||||
static char szCwd[MAX_PATH];
|
||||
getcwd(szCwd, MAX_PATH);
|
||||
return szCwd;
|
||||
}
|
||||
|
||||
|
||||
static char s_szExecutablePath[MAX_PATH];
|
||||
#ifdef __linux__
|
||||
static ssize_t s_iExecutablePathSize = readlink("/proc/self/exe", s_szExecutablePath, MAX_PATH);
|
||||
|
||||
Reference in New Issue
Block a user