no engine anymore
This commit is contained in:
@@ -5,37 +5,16 @@
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
CUtlVector<CUtlString> engine_CompiledFiles = {
|
||||
"engine/interface.cpp",
|
||||
"engine/console.cpp",
|
||||
"engine/filesystem.cpp",
|
||||
"engine/server.cpp",
|
||||
"engine/engine.cpp",
|
||||
"engine/physics.cpp",
|
||||
"engine/gamemode.cpp",
|
||||
"engine/rendering.cpp",
|
||||
|
||||
/* io */
|
||||
"engine/input.cpp",
|
||||
"engine/networking.cpp",
|
||||
|
||||
/* audio */
|
||||
"engine/ma_audio.cpp",
|
||||
|
||||
"engine/mesh.cpp",
|
||||
|
||||
/* entities */
|
||||
"engine/baseentity.cpp",
|
||||
"engine/level.cpp",
|
||||
"engine/brush.cpp",
|
||||
/* server entities */
|
||||
"engine/sv_worldspawn.cpp",
|
||||
"engine/sv_light.cpp",
|
||||
"engine/sv_playerstart.cpp",
|
||||
|
||||
/* client entities */
|
||||
"engine/cl_worldspawn.cpp",
|
||||
"engine/cl_light.cpp",
|
||||
|
||||
"engine/engine.cpp",
|
||||
"engine/cvar.cpp",
|
||||
"engine/filesystem.cpp",
|
||||
"engine/filesystem_pak.cpp",
|
||||
"engine/filesystem_libc.cpp",
|
||||
|
||||
"engine/gamewindow_sdl.cpp",
|
||||
|
||||
"engine/sv_dll.cpp",
|
||||
"engine/cl_dll.cpp",
|
||||
};
|
||||
|
||||
CUtlVector<CUtlString> engine_Libraries = {
|
||||
@@ -43,56 +22,39 @@ CUtlVector<CUtlString> engine_Libraries = {
|
||||
"SDL3",
|
||||
};
|
||||
|
||||
int engine_build()
|
||||
{
|
||||
if (Target_t::DefaultTarget().kernel == TARGET_KERNEL_IOS || Target_t::DefaultTarget().kernel == TARGET_KERNEL_DARWIN)
|
||||
{
|
||||
engine_CompiledFiles.AppendTail("engine/ml_videosdl.cpp");
|
||||
engine_CompiledFiles.AppendTail("engine/ml_video.cpp");
|
||||
engine_CompiledFiles.AppendTail("engine/ml_video.mm");
|
||||
} else {
|
||||
engine_CompiledFiles.AppendTail("engine/vk_videosdl.cpp");
|
||||
engine_CompiledFiles.AppendTail("engine/vk_video.cpp");
|
||||
}
|
||||
if (Target_t::DefaultTarget().kernel == TARGET_KERNEL_LINUX)
|
||||
{
|
||||
engine_Libraries.AppendTail("vulkan");
|
||||
}
|
||||
CCProject compileProject = {};
|
||||
CLDProject ldProject = {};
|
||||
DECLARE_BUILD_STAGE(engine)
|
||||
{
|
||||
CProject_t compileProject = {};
|
||||
LinkProject_t ldProject = {};
|
||||
|
||||
compileProject.m_szName = "engine";
|
||||
compileProject.files = engine_CompiledFiles;
|
||||
compileProject.includeDirectories = all_IncludeDirectories;
|
||||
compileProject.bFPIC = true;
|
||||
if (bStaticBuild)
|
||||
compileProject.macros.AppendTail((C_Macro_t){"STATIC_BUILD","1"});
|
||||
if (bSteam)
|
||||
compileProject.macros.AppendTail((C_Macro_t){"STEAM_ENABLED","1"});
|
||||
ldProject = compileProject.Compile();
|
||||
ldProject.libraries = engine_Libraries;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
|
||||
if (bStaticBuild)
|
||||
ldProject.linkType = ELINK_STATIC_LIBRARY;
|
||||
else
|
||||
{
|
||||
ldProject.objects.AppendTail((CObject){tier1_lib});
|
||||
ldProject.objects.AppendTail((CObject){fgui_lib});
|
||||
ldProject.objects.AppendTail((CObject){rapier_lib});
|
||||
ldProject.objects.AppendTail((Object_t){tier1_lib});
|
||||
ldProject.objects.AppendTail((Object_t){rapier_lib});
|
||||
if (bSteam)
|
||||
ldProject.objects.AppendTail((CObject){steam_lib});
|
||||
ldProject.objects.AppendTail((Object_t){steam_lib});
|
||||
ldProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
||||
}
|
||||
|
||||
CUtlString outputProject = ldProject.Link();
|
||||
|
||||
ldProject.libraries = engine_Libraries;
|
||||
CUtlString outputProject = linker->Link(&ldProject);
|
||||
|
||||
if (!bStaticBuild)
|
||||
{
|
||||
IFileSystem2::MakeDirectory(CUtlString("%s/bin",szOutputDir.GetString()));
|
||||
IFileSystem2::CopyFile(CUtlString("%s/bin", szOutputDir.GetString()), outputProject);
|
||||
filesystem2->MakeDirectory(CUtlString("%s/bin",szOutputDir.GetString()));
|
||||
filesystem2->CopyFile(CUtlString("%s/bin", szOutputDir.GetString()), outputProject);
|
||||
} else {
|
||||
engine_lib = outputProject;
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
DECLARE_BUILD_STAGE(engine, engine_build);
|
||||
|
||||
Reference in New Issue
Block a user