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_',
|
||||
'ENGINE_DLL',
|
||||
'VERSION_SAFE_STEAM_API_INTERFACES',
|
||||
'USE_BREAKPAD_HANDLER'
|
||||
'USE_BREAKPAD_HANDLER',
|
||||
'USE_CONVARS'
|
||||
])
|
||||
|
||||
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[] )
|
||||
{
|
||||
void *launcher = dlopen( "bin/liblauncher" DLL_EXT_STRING, RTLD_NOW );
|
||||
fprintf( stderr, "%s\nFailed to load the launcher\n", dlerror() );
|
||||
if( !launcher )
|
||||
launcher = dlopen( "bin/launcher" DLL_EXT_STRING, RTLD_NOW );
|
||||
|
||||
|
@ -99,15 +99,6 @@ uint64 GetCPUFreqFromPROC()
|
||||
|
||||
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.
|
||||
FILE *fp = fopen( "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", "r" );
|
||||
if ( fp )
|
||||
@ -128,6 +119,7 @@ uint64 CalculateCPUFreq()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __arm__
|
||||
// Compute the period. Loop until we get 3 consecutive periods that
|
||||
// are the same to within a small error. The error is chosen
|
||||
// to be +/- 0.02% on a P-200.
|
||||
@ -178,5 +170,6 @@ uint64 CalculateCPUFreq()
|
||||
|
||||
return period;
|
||||
#endif
|
||||
return (uint64)0;
|
||||
}
|
||||
|
||||
|
37
wscript
37
wscript
@ -86,7 +86,7 @@ projects={
|
||||
'dedicated_main',
|
||||
'dmxloader',
|
||||
'engine',
|
||||
'game/server',
|
||||
# 'game/server',
|
||||
'ivp/havana',
|
||||
'ivp/havana/havok/hk_base',
|
||||
'ivp/havana/havok/hk_math',
|
||||
@ -157,16 +157,24 @@ def define_platform(conf):
|
||||
if conf.env.DEST_OS == 'linux':
|
||||
conf.define('_GLIBCXX_USE_CXX11_ABI',0)
|
||||
conf.env.append_unique('DEFINES', [
|
||||
'LINUX=1',
|
||||
'_LINUX=1',
|
||||
'POSIX=1',
|
||||
'_POSIX=1',
|
||||
'LINUX=1', '_LINUX=1',
|
||||
'POSIX=1', '_POSIX=1',
|
||||
'GNUC',
|
||||
'NDEBUG',
|
||||
'NO_HOOK_MALLOC',
|
||||
'_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):
|
||||
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'])
|
||||
if conf.options.DEDICATED:
|
||||
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='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
|
||||
# Because compatibility with original GoldSrc
|
||||
@ -235,7 +245,8 @@ def configure(conf):
|
||||
'-Wcast-align',
|
||||
'-Wuninitialized',
|
||||
'-Winit-self',
|
||||
'-Wstrict-aliasing'
|
||||
'-Wstrict-aliasing',
|
||||
# '-faligned-new'
|
||||
]
|
||||
|
||||
c_compiler_optional_flags = [
|
||||
@ -247,7 +258,7 @@ def configure(conf):
|
||||
flags = ['-fPIC']
|
||||
|
||||
if conf.env.DEST_CPU == 'arm':
|
||||
flags += ['-mfpu=neon']
|
||||
flags += ['-mfpu=neon', '-fsigned-char']
|
||||
else:
|
||||
flags += ['-march=pentium4','-mtune=core2','-mfpmath=387']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user