mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 14:16:50 +00:00
fixes for arm target
This commit is contained in:
parent
50a93ce91a
commit
b33af199a7
@ -21,7 +21,8 @@ def configure(conf):
|
|||||||
'_ADD_EAX_',
|
'_ADD_EAX_',
|
||||||
'ENGINE_DLL',
|
'ENGINE_DLL',
|
||||||
'VERSION_SAFE_STEAM_API_INTERFACES',
|
'VERSION_SAFE_STEAM_API_INTERFACES',
|
||||||
'USE_BREAKPAD_HANDLER'
|
'USE_BREAKPAD_HANDLER',
|
||||||
|
'USE_CONVARS'
|
||||||
])
|
])
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
|
2
ivp
2
ivp
@ -1 +1 @@
|
|||||||
Subproject commit be91ef6413e2ff771c4484f7d5bd009d3bb90322
|
Subproject commit 58cb1243b4b2b005eeed808df84e994942c84751
|
@ -216,7 +216,6 @@ static void WaitForDebuggerConnect( int argc, char *argv[], int time )
|
|||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
void *launcher = dlopen( "bin/liblauncher" DLL_EXT_STRING, RTLD_NOW );
|
void *launcher = dlopen( "bin/liblauncher" DLL_EXT_STRING, RTLD_NOW );
|
||||||
fprintf( stderr, "%s\nFailed to load the launcher\n", dlerror() );
|
|
||||||
if( !launcher )
|
if( !launcher )
|
||||||
launcher = dlopen( "bin/launcher" DLL_EXT_STRING, RTLD_NOW );
|
launcher = dlopen( "bin/launcher" DLL_EXT_STRING, RTLD_NOW );
|
||||||
|
|
||||||
@ -225,7 +224,7 @@ int main( int argc, char *argv[] )
|
|||||||
fprintf( stderr, "%s\nFailed to load the launcher\n", dlerror() );
|
fprintf( stderr, "%s\nFailed to load the launcher\n", dlerror() );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LauncherMain_t main = (LauncherMain_t)dlsym( launcher, "LauncherMain" );
|
LauncherMain_t main = (LauncherMain_t)dlsym( launcher, "LauncherMain" );
|
||||||
if ( !main )
|
if ( !main )
|
||||||
{
|
{
|
||||||
|
@ -99,15 +99,6 @@ uint64 GetCPUFreqFromPROC()
|
|||||||
|
|
||||||
uint64 CalculateCPUFreq()
|
uint64 CalculateCPUFreq()
|
||||||
{
|
{
|
||||||
#ifdef LINUX
|
|
||||||
char const *pFreq = getenv( "CPU_MHZ" );
|
|
||||||
if ( pFreq )
|
|
||||||
{
|
|
||||||
uint64 retVal = 1000000;
|
|
||||||
return retVal * atoi( pFreq );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
|
|
||||||
// Try to open cpuinfo_max_freq. If the kernel was built with cpu scaling support disabled, this will fail.
|
// Try to open cpuinfo_max_freq. If the kernel was built with cpu scaling support disabled, this will fail.
|
||||||
FILE *fp = fopen( "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", "r" );
|
FILE *fp = fopen( "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", "r" );
|
||||||
if ( fp )
|
if ( fp )
|
||||||
@ -128,6 +119,7 @@ uint64 CalculateCPUFreq()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __arm__
|
||||||
// Compute the period. Loop until we get 3 consecutive periods that
|
// Compute the period. Loop until we get 3 consecutive periods that
|
||||||
// are the same to within a small error. The error is chosen
|
// are the same to within a small error. The error is chosen
|
||||||
// to be +/- 0.02% on a P-200.
|
// to be +/- 0.02% on a P-200.
|
||||||
@ -178,5 +170,6 @@ uint64 CalculateCPUFreq()
|
|||||||
|
|
||||||
return period;
|
return period;
|
||||||
#endif
|
#endif
|
||||||
|
return (uint64)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
37
wscript
37
wscript
@ -86,7 +86,7 @@ projects={
|
|||||||
'dedicated_main',
|
'dedicated_main',
|
||||||
'dmxloader',
|
'dmxloader',
|
||||||
'engine',
|
'engine',
|
||||||
'game/server',
|
# 'game/server',
|
||||||
'ivp/havana',
|
'ivp/havana',
|
||||||
'ivp/havana/havok/hk_base',
|
'ivp/havana/havok/hk_base',
|
||||||
'ivp/havana/havok/hk_math',
|
'ivp/havana/havok/hk_math',
|
||||||
@ -157,16 +157,24 @@ def define_platform(conf):
|
|||||||
if conf.env.DEST_OS == 'linux':
|
if conf.env.DEST_OS == 'linux':
|
||||||
conf.define('_GLIBCXX_USE_CXX11_ABI',0)
|
conf.define('_GLIBCXX_USE_CXX11_ABI',0)
|
||||||
conf.env.append_unique('DEFINES', [
|
conf.env.append_unique('DEFINES', [
|
||||||
'LINUX=1',
|
'LINUX=1', '_LINUX=1',
|
||||||
'_LINUX=1',
|
'POSIX=1', '_POSIX=1',
|
||||||
'POSIX=1',
|
|
||||||
'_POSIX=1',
|
|
||||||
'GNUC',
|
'GNUC',
|
||||||
'NDEBUG',
|
'NDEBUG',
|
||||||
'NO_HOOK_MALLOC',
|
'NO_HOOK_MALLOC',
|
||||||
'_DLL_EXT=.so'
|
'_DLL_EXT=.so'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if conf.env.DEST_OS == 'android':
|
||||||
|
conf.env.append_unique('DEFINES', [
|
||||||
|
'ANDROID', '_ANDROID'
|
||||||
|
'LINUX=1', '_LINUX=1',
|
||||||
|
'POSIX=1', '_POSIX=1',
|
||||||
|
'GNUC',
|
||||||
|
'NDEBUG',
|
||||||
|
'NO_HOOK_MALLOC',
|
||||||
|
'_DLL_EXT=.so'
|
||||||
|
])
|
||||||
|
|
||||||
def options(opt):
|
def options(opt):
|
||||||
grp = opt.add_option_group('Common options')
|
grp = opt.add_option_group('Common options')
|
||||||
@ -209,14 +217,16 @@ def configure(conf):
|
|||||||
conf.check_cfg(package='sdl2', uselib_store='SDL2', args=['--cflags', '--libs'])
|
conf.check_cfg(package='sdl2', uselib_store='SDL2', args=['--cflags', '--libs'])
|
||||||
if conf.options.DEDICATED:
|
if conf.options.DEDICATED:
|
||||||
conf.check_cfg(package='libedit', uselib_store='EDIT', args=['--cflags', '--libs'])
|
conf.check_cfg(package='libedit', uselib_store='EDIT', args=['--cflags', '--libs'])
|
||||||
|
else:
|
||||||
|
conf.check_pkg('freetype2', 'FT2', FT2_CHECK)
|
||||||
|
conf.check_pkg('fontconfig', 'FC', FC_CHECK)
|
||||||
|
conf.check_cfg(package='openal', uselib_store='OPENAL', args=['--cflags', '--libs'])
|
||||||
|
conf.check_cfg(package='libjpeg', uselib_store='JPEG', args=['--cflags', '--libs'])
|
||||||
|
conf.check_cfg(package='libpng', uselib_store='PNG', args=['--cflags', '--libs'])
|
||||||
|
conf.check_cfg(package='libcurl', uselib_store='CURL', args=['--cflags', '--libs'])
|
||||||
|
|
||||||
conf.check_cfg(package='libjpeg', uselib_store='JPEG', args=['--cflags', '--libs'])
|
|
||||||
conf.check_cfg(package='libpng', uselib_store='PNG', args=['--cflags', '--libs'])
|
|
||||||
conf.check_cfg(package='zlib', uselib_store='ZLIB', args=['--cflags', '--libs'])
|
conf.check_cfg(package='zlib', uselib_store='ZLIB', args=['--cflags', '--libs'])
|
||||||
conf.check_cfg(package='openal', uselib_store='OPENAL', args=['--cflags', '--libs'])
|
|
||||||
conf.check_cfg(package='libcurl', uselib_store='CURL', args=['--cflags', '--libs'])
|
|
||||||
conf.check_pkg('freetype2', 'FT2', FT2_CHECK)
|
|
||||||
conf.check_pkg('fontconfig', 'FC', FC_CHECK)
|
|
||||||
|
|
||||||
# We restrict 64-bit builds ONLY for Win/Linux/OSX running on Intel architecture
|
# We restrict 64-bit builds ONLY for Win/Linux/OSX running on Intel architecture
|
||||||
# Because compatibility with original GoldSrc
|
# Because compatibility with original GoldSrc
|
||||||
@ -235,7 +245,8 @@ def configure(conf):
|
|||||||
'-Wcast-align',
|
'-Wcast-align',
|
||||||
'-Wuninitialized',
|
'-Wuninitialized',
|
||||||
'-Winit-self',
|
'-Winit-self',
|
||||||
'-Wstrict-aliasing'
|
'-Wstrict-aliasing',
|
||||||
|
# '-faligned-new'
|
||||||
]
|
]
|
||||||
|
|
||||||
c_compiler_optional_flags = [
|
c_compiler_optional_flags = [
|
||||||
@ -247,7 +258,7 @@ def configure(conf):
|
|||||||
flags = ['-fPIC']
|
flags = ['-fPIC']
|
||||||
|
|
||||||
if conf.env.DEST_CPU == 'arm':
|
if conf.env.DEST_CPU == 'arm':
|
||||||
flags += ['-mfpu=neon']
|
flags += ['-mfpu=neon', '-fsigned-char']
|
||||||
else:
|
else:
|
||||||
flags += ['-march=pentium4','-mtune=core2','-mfpmath=387']
|
flags += ['-march=pentium4','-mtune=core2','-mfpmath=387']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user