almost done
This commit is contained in:
48
fpc/Makefile
48
fpc/Makefile
@@ -1,10 +1,13 @@
|
|||||||
# We want to build just enough to use other stuff
|
# We want to build just enough to use other stuff
|
||||||
TIER_FILES := ../tier0/lib.cpp ../tier0/mem.cpp ../tier0/platform.cpp ../tier1/utlbuffer.cpp ../tier1/interface.cpp ../tier1/utlstring.cpp ../tier1/utlvector.cpp ../tier1/utlmap.cpp ../tier1/commandline.cpp ../tier2/filesystem.cpp ../tier2/filesystem_libc.cpp ../tier2/fileformats/ini.cpp
|
TIER0_FILES := ../tier0/lib.cpp ../tier0/mem.cpp ../tier0/platform.cpp
|
||||||
|
TIER1_FILES := ../tier1/utlbuffer.cpp ../tier1/interface.cpp ../tier1/utlstring.cpp ../tier1/utlvector.cpp ../tier1/utlmap.cpp ../tier1/commandline.cpp
|
||||||
FPC_FILES := main.cpp library/runner.cpp library/helper.cpp library/c.cpp library/ld.cpp library/clang/c.cpp library/clang/ld.cpp library/target.cpp
|
TIER2_FILES := ../tier2/filesystem.cpp ../tier2/fileformats/ini.cpp
|
||||||
|
FILESYSTEM_FILES := ../stdfilesystems/filesystem_libc.cpp
|
||||||
|
TIER1_OBJS := $(TIER1_FILES:.cpp=.o)
|
||||||
|
TIER2_OBJS := $(TIER2_FILES:.cpp=.o)
|
||||||
|
FPC_FILES := library/runner.cpp library/helper.cpp library/c.cpp library/ld.cpp library/clang/c.cpp library/clang/ld.cpp library/target.cpp library/builder.cpp
|
||||||
CC = clang
|
CC = clang
|
||||||
OUTPUT_DIR = fpc
|
CCFLAGS = -g -I../public -Ipublic
|
||||||
CCFLAGS = -I../public -Ipublic -lc -lstdc++
|
|
||||||
|
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
@@ -14,20 +17,43 @@ ifeq ($(UNAME_S),Linux)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
recompile: ../build/tools
|
recompile: ../build/tools
|
||||||
./fpc build
|
build/fpc build
|
||||||
mv fpc_temp fpc
|
mv fpc_temp fpc
|
||||||
|
|
||||||
install: $(FPC_FILES) ../build/tools
|
install: ../build/tools libfpcbuild.a libfpc.so libtier0.so libtier1.a libtier2.a libfilesystem_std.so builddir
|
||||||
$(CC) -g $(TIER_FILES) $(FPC_FILES) $(CCFLAGS) -o $(OUTPUT_DIR)
|
$(CC) main.cpp -lc -lstdc++ $(CCFLAGS) -o build/fpc build/libtier0.so build/libtier1.a build/libtier2.a build/libfpc.so build/libfilesystem_std.so
|
||||||
./fpc build
|
gdb --args build/fpc build
|
||||||
mv fpc_temp fpc
|
mv fpc_temp fpc
|
||||||
|
|
||||||
|
libtier0.so: $(TIER0_FILES) builddir
|
||||||
|
$(CC) $(CCFLAGS) -fPIC -shared -o build/libtier0.so $(TIER0_FILES)
|
||||||
|
|
||||||
|
%.o: %.cpp
|
||||||
|
$(CC) $(CCFLAGS) -fPIC -c $< -o $@
|
||||||
|
|
||||||
|
libtier1.a: $(TIER1_OBJS) builddir
|
||||||
|
ar rcs build/libtier1.a $(TIER1_OBJS)
|
||||||
|
|
||||||
|
libtier2.a: $(TIER2_OBJS) builddir
|
||||||
|
ar rcs build/libtier2.a $(TIER2_OBJS)
|
||||||
|
|
||||||
|
libfilesystem_std.so: $(FILESYSTEM_FILES) libtier1.a builddir
|
||||||
|
$(CC) $(CCFLAGS) -fPIC -shared -o build/libfilesystem_std.so $(FILESYSTEM_FILES) build/libtier1.a
|
||||||
|
|
||||||
|
libfpcbuild.a: buildfile/interfaces.o builddir
|
||||||
|
ar rcs build/libfpcbuild.a buildfile/interfaces.o
|
||||||
|
|
||||||
|
libfpc.so: $(FPC_FILES) builddir libfpcbuild.a
|
||||||
|
$(CC) $(CCFLAGS) -fPIC -shared -o build/libfpc.so build/libfpcbuild.a $(FPC_FILES)
|
||||||
|
|
||||||
|
builddir:
|
||||||
|
mkdir -p build
|
||||||
|
|
||||||
../build/tools:
|
../build/tools:
|
||||||
mkdir -p ../build/tools
|
mkdir -p ../build/tools/fpc
|
||||||
|
|
||||||
install_fpc:
|
install_fpc:
|
||||||
cp fpc ../build/tools
|
cp -r build/* ../build/tools/fpc
|
||||||
cp -r public ../build/tools
|
cp -r public ../build/tools
|
||||||
cp -r ../public/tier0 ../build/tools/public
|
cp -r ../public/tier0 ../build/tools/public
|
||||||
cp -r ../public/tier1 ../build/tools/public
|
cp -r ../public/tier1 ../build/tools/public
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
#include "tier1/interface.h"
|
#include "tier1/interface.h"
|
||||||
#include "signal.h"
|
#include "signal.h"
|
||||||
|
|
||||||
ADD_DEPENDENCY_BUILD_FILE("../tier0/__build.cpp")
|
ADD_DEPENDENCY_BUILD_FILE(tier0, "../tier0/");
|
||||||
ADD_DEPENDENCY_BUILD_FILE("../tier1/__build.cpp")
|
ADD_DEPENDENCY_BUILD_FILE(tier1, "../tier1/");
|
||||||
ADD_DEPENDENCY_BUILD_FILE("../tier2/__build.cpp")
|
ADD_DEPENDENCY_BUILD_FILE(tier2, "../tier2/");
|
||||||
|
|
||||||
|
|
||||||
CUtlVector<CUtlString> g_CompiledFiles = {
|
CUtlVector<CUtlString> g_CompiledFiles = {
|
||||||
@@ -16,6 +16,7 @@ CUtlVector<CUtlString> g_CompiledFiles = {
|
|||||||
"library/runner.cpp",
|
"library/runner.cpp",
|
||||||
"library/helper.cpp",
|
"library/helper.cpp",
|
||||||
"library/target.cpp",
|
"library/target.cpp",
|
||||||
|
"library/builder.cpp",
|
||||||
|
|
||||||
"library/winerunner.cpp",
|
"library/winerunner.cpp",
|
||||||
|
|
||||||
|
|||||||
26
fpc/buildfile/interfaces.cpp
Normal file
26
fpc/buildfile/interfaces.cpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#include "tier1/interface.h"
|
||||||
|
#include "helper.h"
|
||||||
|
|
||||||
|
static BuildFileInfo_t buildfileinfo = {};
|
||||||
|
BuildFileInfo_t *GetBuildFileInfo()
|
||||||
|
{
|
||||||
|
return &buildfileinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CBuildStage::CBuildStage( const char *psz, int(*pMainFn)() )
|
||||||
|
{
|
||||||
|
m_psz = psz;
|
||||||
|
m_pMainFn = pMainFn;
|
||||||
|
if (psz == 0 || pMainFn == 0)
|
||||||
|
Plat_FatalErrorFunc("Name and function pointer must be set\n");
|
||||||
|
|
||||||
|
GetBuildFileInfo()->m_stages.AppendTail(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
CBuildDependentFile::CBuildDependentFile( const char *psz )
|
||||||
|
{
|
||||||
|
GetBuildFileInfo()->m_dependantFiles.AppendTail(psz);
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPOSE_INTERFACE_GLOBALVAR(BuildFileInfo_t, BuildFileInfo_t, BUILD_FILE_INFO_INTERFACE_NAME, buildfileinfo);
|
||||||
BIN
fpc/buildfile/interfaces.o
Normal file
BIN
fpc/buildfile/interfaces.o
Normal file
Binary file not shown.
@@ -0,0 +1,96 @@
|
|||||||
|
#include "builder.h"
|
||||||
|
#include "ld.h"
|
||||||
|
#include "c.h"
|
||||||
|
|
||||||
|
class CProjectBuilder : public IProjectBuilder
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual BuildFile_t *BuildProject( const char *szProjectName, const char *szPath ) override;
|
||||||
|
|
||||||
|
BuildFile_t *m_pBuildFiles = NULL;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static CProjectBuilder s_projectBuilder;
|
||||||
|
|
||||||
|
EXPOSE_INTERFACE_GLOBALVAR(CProjectBuilder, IProjectBuilder, PROJECT_BUILDER_INTERFACE_NAME, s_projectBuilder)
|
||||||
|
|
||||||
|
IProjectBuilder *ProjectBuilder()
|
||||||
|
{
|
||||||
|
return &s_projectBuilder;
|
||||||
|
};
|
||||||
|
|
||||||
|
BuildFile_t *CProjectBuilder::BuildProject( const char *szProjectName, const char *szPath )
|
||||||
|
{
|
||||||
|
CProject_t stCompileProject = {};
|
||||||
|
LinkProject_t stLinkProject = {};
|
||||||
|
CUtlString szBuildLibrary;
|
||||||
|
void *pLibrary;
|
||||||
|
CreateInterfaceFn pBuildFactory;
|
||||||
|
BuildFileInfo_t *pBuildFileInfo;
|
||||||
|
BuildFileInfo_t stBuildFileInfo;
|
||||||
|
BuildFile_t *pBuildFile = NULL;
|
||||||
|
|
||||||
|
CUtlString szWd = CUtlString(szPath).GetDirectory();
|
||||||
|
|
||||||
|
Plat_SetWorkingDir(szWd);
|
||||||
|
|
||||||
|
|
||||||
|
stCompileProject.m_szName = szProjectName;
|
||||||
|
stCompileProject.files = {
|
||||||
|
szPath,
|
||||||
|
};
|
||||||
|
stCompileProject.includeDirectories = {CUtlString("%s/public",filesystem2->OwnDirectory()),CUtlString("%s/public", filesystem2->BuildDirectory()), CUtlString("%s/../public",filesystem2->OwnDirectory()),CUtlString("%s/../public", filesystem2->BuildDirectory())};
|
||||||
|
stCompileProject.bFPIC = true;
|
||||||
|
stCompileProject.m_target = Target_t::HostTarget();
|
||||||
|
|
||||||
|
stLinkProject = ccompiler->Compile(&stCompileProject);
|
||||||
|
stLinkProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
||||||
|
stLinkProject.m_target = Target_t::HostTarget();
|
||||||
|
stLinkProject.objects.AppendHead({CUtlString("%s/libfpcbuild.a",filesystem2->OwnDirectory())});
|
||||||
|
stLinkProject.objects.AppendHead({CUtlString("%s/libtier2.a",filesystem2->OwnDirectory())});
|
||||||
|
stLinkProject.objects.AppendHead({CUtlString("%s/libtier1.a",filesystem2->OwnDirectory())});
|
||||||
|
szBuildLibrary = linker->Link(&stLinkProject);
|
||||||
|
|
||||||
|
pLibrary = Plat_LoadLibrary(szBuildLibrary);
|
||||||
|
if ( !pLibrary )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
pBuildFactory = Sys_GetFactory(pLibrary);
|
||||||
|
if (!pBuildFactory)
|
||||||
|
{
|
||||||
|
V_printf("Failed to find CreateInterface\n");
|
||||||
|
Plat_UnloadLibrary(szBuildLibrary);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
pBuildFileInfo = (BuildFileInfo_t*)pBuildFactory(BUILD_FILE_INFO_INTERFACE_NAME, NULL);
|
||||||
|
if (!pBuildFileInfo)
|
||||||
|
{
|
||||||
|
V_printf("Failed to find build file info interface\n");
|
||||||
|
Plat_UnloadLibrary(szBuildLibrary);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
stBuildFileInfo = *pBuildFileInfo;
|
||||||
|
for (auto a: stBuildFileInfo.m_dependantFiles)
|
||||||
|
{
|
||||||
|
BuildProject("something", CUtlString("%s/build.cpp",a));
|
||||||
|
}
|
||||||
|
|
||||||
|
Plat_SetWorkingDir(szWd);
|
||||||
|
|
||||||
|
|
||||||
|
for (auto &build: stBuildFileInfo.m_stages)
|
||||||
|
{
|
||||||
|
build->m_pMainFn();
|
||||||
|
};
|
||||||
|
|
||||||
|
pBuildFile = new BuildFile_t;
|
||||||
|
pBuildFile->m_szOutputFile = szBuildLibrary;
|
||||||
|
pBuildFile->m_pLibrary = pLibrary;
|
||||||
|
pBuildFile->m_pNext = m_pBuildFiles;
|
||||||
|
m_pBuildFiles = pBuildFile;
|
||||||
|
|
||||||
|
|
||||||
|
return pBuildFile;
|
||||||
|
}
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ CUtlString CClangLinker::Link( LinkProject_t *pProject )
|
|||||||
}
|
}
|
||||||
if (pProject->m_target.kernel == TARGET_KERNEL_LINUX || pProject->m_target.kernel == TARGET_KERNEL_ANDROID)
|
if (pProject->m_target.kernel == TARGET_KERNEL_LINUX || pProject->m_target.kernel == TARGET_KERNEL_ANDROID)
|
||||||
{
|
{
|
||||||
args.AppendTail("-rdynamic");
|
//args.AppendTail("-rdynamic");
|
||||||
args.AppendTail("-Wl,-rpath,$ORIGIN");
|
args.AppendTail("-Wl,-rpath,$ORIGIN");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,21 +133,4 @@ bool CPOSIXFileSystem2::ShouldRecompile(const char *szSource, const char *szOutp
|
|||||||
return outbuf.st_mtime < srcbuf.st_mtime;
|
return outbuf.st_mtime < srcbuf.st_mtime;
|
||||||
};
|
};
|
||||||
|
|
||||||
CUtlVector<CBuildStage*> g_buildStages;
|
|
||||||
|
|
||||||
CBuildStage::CBuildStage( const char *psz, int(*pMainFn)() )
|
|
||||||
{
|
|
||||||
m_psz = psz;
|
|
||||||
m_pMainFn = pMainFn;
|
|
||||||
if (psz == 0 || pMainFn == 0)
|
|
||||||
Plat_FatalErrorFunc("Name and function pointer must be set\n");
|
|
||||||
|
|
||||||
g_buildStages.AppendTail(this);
|
|
||||||
};
|
|
||||||
|
|
||||||
CUtlVector<CBuildStage*>& BuildStages()
|
|
||||||
{
|
|
||||||
return g_buildStages;
|
|
||||||
}
|
|
||||||
|
|
||||||
IINIFile *g_pConfig;
|
IINIFile *g_pConfig;
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
#include "ld.h"
|
#include "ld.h"
|
||||||
|
|
||||||
ILinker *linker;
|
ILinker *linker;
|
||||||
|
|
||||||
|
void LinkProject_t::AddObject( Object_t object )
|
||||||
|
{
|
||||||
|
objects.AppendTail(object);
|
||||||
|
};
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ CUtlString CMSVCLinker::Link( LinkProject_t *pProject )
|
|||||||
"/nologo"
|
"/nologo"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *szWindowsPath = GetWindowsPath(szOutputFile);
|
const char *szWindowsPath = filesystem2->GetWindowsPath(szOutputFile);
|
||||||
args.AppendTail(CUtlString("/out:%s", szWindowsPath));
|
args.AppendTail(CUtlString("/out:%s", szWindowsPath));
|
||||||
V_free((void*)szWindowsPath);
|
V_free((void*)szWindowsPath);
|
||||||
|
|
||||||
|
|||||||
21
fpc/main.cpp
21
fpc/main.cpp
@@ -13,6 +13,7 @@
|
|||||||
#include "c.h"
|
#include "c.h"
|
||||||
#include "signal.h"
|
#include "signal.h"
|
||||||
#include "libgen.h"
|
#include "libgen.h"
|
||||||
|
#include "builder.h"
|
||||||
|
|
||||||
CUtlString owndir;
|
CUtlString owndir;
|
||||||
extern char *g_szBuildDir;
|
extern char *g_szBuildDir;
|
||||||
@@ -24,14 +25,9 @@ void build_tier0()
|
|||||||
|
|
||||||
int build()
|
int build()
|
||||||
{
|
{
|
||||||
CreateInterfaceFn pBuildFactory;
|
BuildFile_t *pBuildFile = ProjectBuilder()->BuildProject("main",CUtlString("%s/build.cpp",g_szBuildDir));
|
||||||
BuildFileInfo_t *pBuildFileInfo;
|
|
||||||
CProject_t compileScriptProject = {};
|
/*
|
||||||
compileScriptProject.m_szName = "build";
|
|
||||||
compileScriptProject.files = {"build.cpp"};
|
|
||||||
compileScriptProject.includeDirectories = {CUtlString("%s/public",filesystem2->OwnDirectory()),CUtlString("%s/public", filesystem2->BuildDirectory()), CUtlString("%s/../public",filesystem2->OwnDirectory()),CUtlString("%s/../public", filesystem2->BuildDirectory())};
|
|
||||||
compileScriptProject.bFPIC = true;
|
|
||||||
compileScriptProject.m_target = Target_t::HostTarget();
|
|
||||||
|
|
||||||
LinkProject_t linkScriptProject = ccompiler->Compile(&compileScriptProject);
|
LinkProject_t linkScriptProject = ccompiler->Compile(&compileScriptProject);
|
||||||
linkScriptProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
linkScriptProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
||||||
@@ -57,7 +53,7 @@ int build()
|
|||||||
{
|
{
|
||||||
build->m_pMainFn();
|
build->m_pMainFn();
|
||||||
};
|
};
|
||||||
Plat_UnloadLibrary(scriptDLL);
|
*/
|
||||||
|
|
||||||
ccompiler->GenerateLinterData();
|
ccompiler->GenerateLinterData();
|
||||||
|
|
||||||
@@ -86,11 +82,13 @@ void IEngine_Signal(int sig)
|
|||||||
|
|
||||||
int main(int c, char **v)
|
int main(int c, char **v)
|
||||||
{
|
{
|
||||||
|
|
||||||
char path[1024];
|
char path[1024];
|
||||||
|
|
||||||
CUtlString buildcppDir = getcwd(path, 1024);
|
CUtlString buildcppDir = getcwd(path, 1024);
|
||||||
owndir = buildcppDir;
|
owndir = buildcppDir;
|
||||||
char *szBuildcppDir = buildcppDir.GetString();
|
char *szBuildcppDir = buildcppDir.GetString();
|
||||||
|
|
||||||
findbuild:
|
findbuild:
|
||||||
FILE* file = V_fopen("build.cpp", "rb");
|
FILE* file = V_fopen("build.cpp", "rb");
|
||||||
if (!file)
|
if (!file)
|
||||||
@@ -126,6 +124,11 @@ findbuild:
|
|||||||
filesystem2 = (IFileSystem2*)CreateInterface(FILE_SYSTEM_2_INTERFACE_NAME, NULL);
|
filesystem2 = (IFileSystem2*)CreateInterface(FILE_SYSTEM_2_INTERFACE_NAME, NULL);
|
||||||
ccompiler = (ICCompiler*)CreateInterface(CLANG_C_COMPILER_INTERFACE_NAME, NULL);
|
ccompiler = (ICCompiler*)CreateInterface(CLANG_C_COMPILER_INTERFACE_NAME, NULL);
|
||||||
linker = (ILinker*)CreateInterface(CLANG_LINKER_INTERFACE_NAME, NULL);
|
linker = (ILinker*)CreateInterface(CLANG_LINKER_INTERFACE_NAME, NULL);
|
||||||
|
|
||||||
|
void *pFilesystem = Plat_LoadLibrary(CUtlString("%s/libfilesystem_std.so",filesystem2->OwnDirectory()));
|
||||||
|
CreateInterfaceFn pFilesystemFactory = Sys_GetFactory(pFilesystem);
|
||||||
|
|
||||||
|
filesystem = (IFileSystem*)CreateInterface(FILESYSTEM_INTERFACE_VERSION, NULL);
|
||||||
filesystem->Init();
|
filesystem->Init();
|
||||||
|
|
||||||
g_pConfig = INIManager()->ReadFile(".fpccfg");
|
g_pConfig = INIManager()->ReadFile(".fpccfg");
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
|
|
||||||
#include "tier1/interface.h"
|
#include "tier1/interface.h"
|
||||||
#include "tier1/utlvector.h"
|
#include "tier1/utlvector.h"
|
||||||
|
#include "tier1/utlstring.h"
|
||||||
|
|
||||||
struct BuildOutput_t
|
struct BuildOutput_t
|
||||||
{
|
{
|
||||||
|
const char *m_szName;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BuildOutputs_t
|
struct BuildOutputs_t
|
||||||
@@ -17,15 +18,21 @@ struct BuildOutputs_t
|
|||||||
|
|
||||||
struct BuildFile_t
|
struct BuildFile_t
|
||||||
{
|
{
|
||||||
|
CUtlString m_szOutputFile;
|
||||||
void *m_pLibrary;
|
void *m_pLibrary;
|
||||||
CUtlVector<BuildOutputs_t> m_compiledProjects;
|
CUtlVector<BuildOutputs_t> m_compiledProjects;
|
||||||
|
|
||||||
|
struct BuildFile_t *m_pNext;
|
||||||
};
|
};
|
||||||
|
|
||||||
abstract_class IProjectBuilder
|
abstract_class IProjectBuilder
|
||||||
{
|
{
|
||||||
virtual BuildFile_t *BuildProject( const char *szPath ) = 0;
|
public:
|
||||||
|
virtual BuildFile_t *BuildProject( const char *szProjectName, const char *szPath ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
IProjectBuilder *ProjectBuilder();
|
IProjectBuilder *ProjectBuilder();
|
||||||
|
|
||||||
|
#define PROJECT_BUILDER_INTERFACE_NAME "ProjectBuilder001"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
0
fpc/public/dependencymanager.h
Normal file
0
fpc/public/dependencymanager.h
Normal file
@@ -90,7 +90,8 @@ public:
|
|||||||
|
|
||||||
class CBuildDependentFile
|
class CBuildDependentFile
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
CBuildDependentFile( const char *psz );
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -102,11 +103,12 @@ class CBuildDependentFile
|
|||||||
// }
|
// }
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#define DECLARE_BUILD_STAGE(sz) \
|
#define DECLARE_BUILD_STAGE(sz) \
|
||||||
int __build_stage_##sz(); \
|
static int __build_stage_##sz(); \
|
||||||
CBuildStage __##sz##_build_stage(#sz, __build_stage_##sz); \
|
static CBuildStage __##sz##_build_stage(#sz, __build_stage_##sz); \
|
||||||
int __build_stage_##sz()
|
static int __build_stage_##sz()
|
||||||
|
|
||||||
#define ADD_DEPENDENCY_BUILD_FILE(sz) \
|
#define ADD_DEPENDENCY_BUILD_FILE(name, path) \
|
||||||
|
static CBuildDependentFile __##name##DependencyFile(path);
|
||||||
|
|
||||||
#define ADD_OUTPUT_LIBRARY(sz) \
|
#define ADD_OUTPUT_LIBRARY(sz) \
|
||||||
|
|
||||||
@@ -116,7 +118,7 @@ int __build_stage_##sz()
|
|||||||
|
|
||||||
struct BuildFileInfo_t
|
struct BuildFileInfo_t
|
||||||
{
|
{
|
||||||
CUtlVector<const char*> m_dependantFile;
|
CUtlVector<const char*> m_dependantFiles;
|
||||||
CUtlVector<CBuildStage*> m_stages;
|
CUtlVector<CBuildStage*> m_stages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
#include "tier1/interface.h"
|
|
||||||
#include "helper.h"
|
|
||||||
|
|
||||||
static BuildFileInfo_t buildfileinfo = {};
|
|
||||||
BuildFileInfo_t *GetBuildFileInfo()
|
|
||||||
{
|
|
||||||
return &buildfileinfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
EXPOSE_INTERFACE_GLOBALVAR(BuildFileInfo_t, BuildFileInfo_t, BUILD_FILE_INFO_INTERFACE_NAME, buildfileinfo);
|
|
||||||
@@ -46,7 +46,7 @@ enum EWindowsSubsystem
|
|||||||
struct LinkProject_t: public CPUProject_t
|
struct LinkProject_t: public CPUProject_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void AddObject( Object_t& object );
|
void AddObject( Object_t object );
|
||||||
|
|
||||||
// output file
|
// output file
|
||||||
ELinkType linkType;
|
ELinkType linkType;
|
||||||
|
|||||||
11
fpc/public/lsp.h
Normal file
11
fpc/public/lsp.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#ifndef LSP_H
|
||||||
|
#define LSP_H
|
||||||
|
|
||||||
|
#include "tier0/platform.h"
|
||||||
|
|
||||||
|
abstract_class IBasicLSP
|
||||||
|
{
|
||||||
|
virtual void GenerateConfig() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user