2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-23 17:25:24 +01:00

engine: wscript: rename fbdev to enable-fbdev for great consistency, check definition instead of putting vars into env

This commit is contained in:
Alibek Omarov 2019-11-05 01:35:20 +03:00
parent 60f0f68e68
commit 453c0d890d

View File

@ -12,10 +12,13 @@ def options(opt):
grp.add_option('--enable-stdin-input', action = 'store_true', dest = 'USE_SELECT', default = False, grp.add_option('--enable-stdin-input', action = 'store_true', dest = 'USE_SELECT', default = False,
help = 'enable console input from stdin (always enabled for dedicated) [default: %default]') help = 'enable console input from stdin (always enabled for dedicated) [default: %default]')
grp.add_option('--fbdev', action = 'store_true', dest = 'FBDEV_SW', default = False,
grp.add_option('--enable-fbdev', action = 'store_true', dest = 'FBDEV_SW', default = False,
help = 'build fbdev-only software-only engine') help = 'build fbdev-only software-only engine')
grp.add_option('--disable-async-resolve', action = 'store_true', dest = 'NO_ASYNC_RESOLVE', default = False, grp.add_option('--disable-async-resolve', action = 'store_true', dest = 'NO_ASYNC_RESOLVE', default = False,
help = 'disable asynchronous name resolution') help = 'disable multithreaded operations(asynchronous name resolution)')
grp.add_option('--enable-custom-swap', action = 'store_true', dest = 'CUSTOM_SWAP', default = False, grp.add_option('--enable-custom-swap', action = 'store_true', dest = 'CUSTOM_SWAP', default = False,
help = 'enable custom swap allocator. For devices with no swap support') help = 'enable custom swap allocator. For devices with no swap support')
@ -43,13 +46,10 @@ def configure(conf):
if conf.options.USE_SELECT == None: if conf.options.USE_SELECT == None:
conf.options.USE_SELECT = conf.options.DEDICATED conf.options.USE_SELECT = conf.options.DEDICATED
if not conf.env.DEST_OS in ['win32', 'android'] and not conf.options.NO_ASYNC_RESOLVE: if not conf.env.DEST_OS in ['win32', 'android'] and not conf.options.NO_ASYNC_RESOLVE:
conf.check_cc( lib='pthread' ) conf.check_cc( lib='pthread' )
if conf.options.CUSTOM_SWAP: conf.define_conf('XASH_CUSTOM_SWAP', conf.options.CUSTOM_SWAP)
conf.define('XASH_CUSTOM_SWAP',1)
conf.env.CUSTOM_SWAP = True
conf.define_cond('SINGLE_BINARY', conf.env.SINGLE_BINARY) conf.define_cond('SINGLE_BINARY', conf.env.SINGLE_BINARY)
conf.define_cond('XASH_NO_ASYNC_NS_RESOLVE', conf.options.NO_ASYNC_RESOLVE) conf.define_cond('XASH_NO_ASYNC_NS_RESOLVE', conf.options.NO_ASYNC_RESOLVE)
conf.define_cond('XASH_USE_SELECT', conf.options.USE_SELECT or conf.options.DEDICATED) conf.define_cond('XASH_USE_SELECT', conf.options.USE_SELECT or conf.options.DEDICATED)
@ -71,7 +71,6 @@ def build(bld):
if bld.env.DEST_OS != 'win32': if bld.env.DEST_OS != 'win32':
libs += [ 'DL' , 'M' , 'RT', 'PTHREAD', 'ASOUND'] libs += [ 'DL' , 'M' , 'RT', 'PTHREAD', 'ASOUND']
source += bld.path.ant_glob(['platform/posix/*.c']) source += bld.path.ant_glob(['platform/posix/*.c'])
else: else:
libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32', 'DBGHELP', 'PSAPI', 'WS2_32' ] libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32', 'DBGHELP', 'PSAPI', 'WS2_32' ]
source += bld.path.ant_glob(['platform/win32/*.c']) source += bld.path.ant_glob(['platform/win32/*.c'])
@ -79,7 +78,7 @@ def build(bld):
if bld.env.DEST_OS == 'linux': if bld.env.DEST_OS == 'linux':
source += bld.path.ant_glob(['platform/linux/*.c']) source += bld.path.ant_glob(['platform/linux/*.c'])
if bld.env.CUSTOM_SWAP: if bld.get_define('XASH_CUSTOM_SWAP'):
source += bld.path.ant_glob(['platform/swap/*.c']) source += bld.path.ant_glob(['platform/swap/*.c'])
if bld.env.HAVE_SDL2: if bld.env.HAVE_SDL2:
@ -97,7 +96,7 @@ def build(bld):
'client/vgui/*.c', 'client/vgui/*.c',
'client/avi/*.c']) 'client/avi/*.c'])
# HACK: public headers must be put before common, so we don't get wrong mathlib included # HACK: public headers must be put before SDK common, so we don't get wrong mathlib included
includes = ['common', 'server', 'client', 'client/vgui', '.', '../public', '../common', '../pm_shared' ] includes = ['common', 'server', 'client', 'client/vgui', '.', '../public', '../common', '../pm_shared' ]
if bld.env.SINGLE_BINARY: if bld.env.SINGLE_BINARY: