added forgotten files
This commit is contained in:
@@ -13,7 +13,6 @@ CUtlVector<CUtlString> tier1_CompiledFiles = {
|
||||
"tier1/utlstring.cpp",
|
||||
"tier1/utlvector.cpp",
|
||||
};
|
||||
CUtlString tier1_lib;
|
||||
|
||||
DECLARE_BUILD_STAGE(tier1)
|
||||
{
|
||||
@@ -22,13 +21,15 @@ DECLARE_BUILD_STAGE(tier1)
|
||||
|
||||
compileProject.m_szName = "tier1";
|
||||
compileProject.files = tier1_CompiledFiles;
|
||||
compileProject.includeDirectories = all_IncludeDirectories;
|
||||
compileProject.includeDirectories = {"../public"};
|
||||
compileProject.bFPIC = true;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
ldProject.linkType = ELINK_STATIC_LIBRARY;
|
||||
|
||||
CUtlString outputProject = linker->Link(&ldProject);
|
||||
tier1_lib = outputProject;
|
||||
CUtlString szOutputDir = linker->Link(&ldProject);
|
||||
|
||||
ADD_OUTPUT_LIBRARY(szOutputDir)
|
||||
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
34
tier1/build.cpp
Normal file
34
tier1/build.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "helper.h"
|
||||
#include "c.h"
|
||||
#include "ld.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
CUtlVector<CUtlString> tier1_CompiledFiles = {
|
||||
"interface.cpp",
|
||||
"appinit.cpp",
|
||||
"commandline.cpp",
|
||||
"utlbuffer.cpp",
|
||||
"utlmap.cpp",
|
||||
"utlstring.cpp",
|
||||
"utlvector.cpp",
|
||||
};
|
||||
|
||||
DECLARE_BUILD_STAGE(tier1)
|
||||
{
|
||||
CProject_t compileProject = {};
|
||||
LinkProject_t ldProject = {};
|
||||
|
||||
compileProject.m_szName = "tier1";
|
||||
compileProject.files = tier1_CompiledFiles;
|
||||
compileProject.includeDirectories = {"../public"};
|
||||
compileProject.bFPIC = true;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
ldProject.linkType = ELINK_STATIC_LIBRARY;
|
||||
|
||||
CUtlString szOutputDir = linker->Link(&ldProject);
|
||||
|
||||
ADD_OUTPUT_LIBRARY(szOutputDir)
|
||||
|
||||
return 0;
|
||||
};
|
||||
BIN
tier1/commandline.o
Normal file
BIN
tier1/commandline.o
Normal file
Binary file not shown.
@@ -1,18 +1,23 @@
|
||||
#include "tier1/interface.h"
|
||||
#include "tier1/utlvector.h"
|
||||
#include "dlfcn.h"
|
||||
|
||||
static CInterfaceRegistry *s_pInterfaceRegistries;
|
||||
|
||||
CInterfaceRegistry *g_pInterfaceRegistries = NULL;
|
||||
CInterfaceRegistry::CInterfaceRegistry( InstantiateInterfaceFn fn, const char *szName )
|
||||
: m_szName(szName)
|
||||
{
|
||||
m_CreateFn = fn;
|
||||
m_pNext = g_pInterfaceRegistries;
|
||||
g_pInterfaceRegistries = this;
|
||||
m_pNext = s_pInterfaceRegistries;
|
||||
s_pInterfaceRegistries = this;
|
||||
Dl_info info = {};
|
||||
dladdr((void *)&s_pInterfaceRegistries, &info);
|
||||
printf("%p: %s in %s\n",&s_pInterfaceRegistries, m_szName, info.dli_fname);
|
||||
};
|
||||
|
||||
void *CreateInterface( const char *szName, int *pReturnCode )
|
||||
DLL_EXPORT void *CreateInterface( const char *szName, int *pReturnCode )
|
||||
{
|
||||
CInterfaceRegistry *pRegistry = g_pInterfaceRegistries;
|
||||
CInterfaceRegistry *pRegistry = s_pInterfaceRegistries;
|
||||
while (pRegistry)
|
||||
{
|
||||
if (!V_strcmp(szName, pRegistry->m_szName))
|
||||
@@ -30,5 +35,8 @@ void *CreateInterface( const char *szName, int *pReturnCode )
|
||||
|
||||
CreateInterfaceFn Sys_GetFactory( void *lib )
|
||||
{
|
||||
#ifdef POSIX
|
||||
return CreateInterface;
|
||||
#endif
|
||||
return (CreateInterfaceFn)Plat_GetProc(lib, "CreateInterface");
|
||||
}
|
||||
|
||||
BIN
tier1/interface.o
Normal file
BIN
tier1/interface.o
Normal file
Binary file not shown.
BIN
tier1/utlbuffer.o
Normal file
BIN
tier1/utlbuffer.o
Normal file
Binary file not shown.
BIN
tier1/utlmap.o
Normal file
BIN
tier1/utlmap.o
Normal file
Binary file not shown.
BIN
tier1/utlstring.o
Normal file
BIN
tier1/utlstring.o
Normal file
Binary file not shown.
BIN
tier1/utlvector.o
Normal file
BIN
tier1/utlvector.o
Normal file
Binary file not shown.
Reference in New Issue
Block a user