Browse Source

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

pull/2/head
Alibek Omarov 5 years ago
parent
commit
453c0d890d
  1. 17
      engine/wscript

17
engine/wscript

@ -12,10 +12,13 @@ def options(opt): @@ -12,10 +12,13 @@ def options(opt):
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]')
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')
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,
help = 'enable custom swap allocator. For devices with no swap support')
@ -43,13 +46,10 @@ def configure(conf): @@ -43,13 +46,10 @@ def configure(conf):
if conf.options.USE_SELECT == None:
conf.options.USE_SELECT = conf.options.DEDICATED
if not conf.env.DEST_OS in ['win32', 'android'] and not conf.options.NO_ASYNC_RESOLVE:
conf.check_cc( lib='pthread' )
if conf.options.CUSTOM_SWAP:
conf.define('XASH_CUSTOM_SWAP',1)
conf.env.CUSTOM_SWAP = True
conf.define_conf('XASH_CUSTOM_SWAP', conf.options.CUSTOM_SWAP)
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_USE_SELECT', conf.options.USE_SELECT or conf.options.DEDICATED)
@ -71,7 +71,6 @@ def build(bld): @@ -71,7 +71,6 @@ def build(bld):
if bld.env.DEST_OS != 'win32':
libs += [ 'DL' , 'M' , 'RT', 'PTHREAD', 'ASOUND']
source += bld.path.ant_glob(['platform/posix/*.c'])
else:
libs += ['USER32', 'SHELL32', 'GDI32', 'ADVAPI32', 'DBGHELP', 'PSAPI', 'WS2_32' ]
source += bld.path.ant_glob(['platform/win32/*.c'])
@ -79,7 +78,7 @@ def build(bld): @@ -79,7 +78,7 @@ def build(bld):
if bld.env.DEST_OS == 'linux':
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'])
if bld.env.HAVE_SDL2:
@ -97,7 +96,7 @@ def build(bld): @@ -97,7 +96,7 @@ def build(bld):
'client/vgui/*.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' ]
if bld.env.SINGLE_BINARY:

Loading…
Cancel
Save