added command line, added basic character
This commit is contained in:
@@ -1,16 +1,34 @@
|
||||
#include "target.h"
|
||||
#include <god/build.h>
|
||||
#include "tier1/commandline.h"
|
||||
#include "tier1/utlstring.h"
|
||||
|
||||
Target_t Target_t::DefaultTarget()
|
||||
{
|
||||
CUtlString szDevice = ICommandLine::ParamValue("-device");
|
||||
CUtlString szOS = ICommandLine::ParamValue("-os");
|
||||
CUtlString szArch = ICommandLine::ParamValue("-arch");
|
||||
|
||||
ETargetKernel kernel =
|
||||
#if defined(__linux__)
|
||||
TARGET_KERNEL_LINUX
|
||||
#elif defined(__APPLE__)
|
||||
TARGET_KERNEL_DARWIN
|
||||
#endif
|
||||
;
|
||||
ETargetCPU cpu = TARGET_CPU_AMD64;
|
||||
|
||||
if ( szOS == "windows" )
|
||||
kernel = TARGET_KERNEL_WINDOWS;
|
||||
else if ( szOS == "linux" )
|
||||
kernel = TARGET_KERNEL_LINUX;
|
||||
else if ( szOS == "macos" )
|
||||
kernel = TARGET_KERNEL_DARWIN;
|
||||
else if ( szOS != 0 )
|
||||
V_printf("Unknown OS: %s\n", szOS.GetString());
|
||||
|
||||
return {
|
||||
.kernel = TARGET_KERNEL_LINUX,
|
||||
#ifdef __x86_64__
|
||||
.cpu = TARGET_CPU_AMD64,
|
||||
#endif
|
||||
#ifdef __x86__
|
||||
.cpu = TARGET_CPU_I386,
|
||||
#endif
|
||||
.kernel = kernel,
|
||||
.cpu = cpu,
|
||||
.optimization = TARGET_DEBUG,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user