wscript: remove DEST_OS2

This commit is contained in:
Alibek Omarov 2019-09-19 17:07:41 +03:00
parent cd0f7af38a
commit b91e97ca53
3 changed files with 21 additions and 23 deletions

View File

@ -9,12 +9,10 @@ top = '.'
def options(opt): def options(opt):
grp = opt.add_option_group('Engine options') grp = opt.add_option_group('Engine options')
grp.add_option( grp.add_option('--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
'--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
help = 'build engine with BSP2 map support(recommended for Quake, breaks compatibility!)') help = 'build engine with BSP2 map support(recommended for Quake, breaks compatibility!)')
grp.add_option( grp.add_option('--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None,
'--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None,
help = 'enable console input from stdin (default for dedicated)') help = 'enable console input from stdin (default for dedicated)')
opt.load('sdl2') opt.load('sdl2')
@ -22,13 +20,12 @@ def options(opt):
def configure(conf): def configure(conf):
# check for dedicated server build # check for dedicated server build
if conf.options.DEDICATED: if conf.options.DEDICATED:
if(conf.env.DEST_OS == 'linux'): if conf.env.DEST_OS == 'linux':
conf.check_cc( lib='rt' ) conf.check_cc( lib='rt' )
conf.env.append_unique('DEFINES', 'XASH_DEDICATED') conf.env.append_unique('DEFINES', 'XASH_DEDICATED=1')
elif conf.env.DEST_OS2 == 'android': # Android doesn't need SDL2 elif conf.env.DEST_OS == 'android': # Android doesn't need SDL2
conf.check_cc(lib='android') for i in ['android', 'log', 'EGL']:
conf.check_cc(lib='log') conf.check_cc(lib = i)
conf.check_cc(lib='EGL')
else: else:
conf.load('sdl2') conf.load('sdl2')
if not conf.env.HAVE_SDL2: if not conf.env.HAVE_SDL2:
@ -40,6 +37,7 @@ 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 conf.options.USE_SELECT: if conf.options.USE_SELECT:
conf.env.append_unique('DEFINES', 'XASH_USE_SELECT') conf.env.append_unique('DEFINES', 'XASH_USE_SELECT')
@ -77,9 +75,9 @@ def build(bld):
libs.append('SDL2') libs.append('SDL2')
source += bld.path.ant_glob(['platform/sdl/*.c']) source += bld.path.ant_glob(['platform/sdl/*.c'])
if bld.env.DEST_OS2 == 'android': if bld.env.DEST_OS == 'android':
libs += ['LOG', 'EGL', 'ANDROID'] libs += ['LOG', 'EGL', 'ANDROID']
source += bld.path.ant_glob(['platform/android/*.cpp', 'platform/android/*.c']) source += bld.path.ant_glob(['platform/android/*.cpp', 'platform/android/*.c', 'platform/linux/*.c'])
# add client files # add client files
if not bld.env.DEDICATED: if not bld.env.DEDICATED:
@ -101,8 +99,7 @@ def build(bld):
install_path = bld.env.LIBDIR install_path = bld.env.LIBDIR
features = 'c cshlib' features = 'c cshlib'
bld( bld(source = source,
source = source,
target = 'xash', target = 'xash',
features = features, features = features,
includes = includes, includes = includes,

2
mainui

@ -1 +1 @@
Subproject commit c3095f477ff4ecfd8bc1f803c6d9e6e63ba32926 Subproject commit 59d65fdf60b088846bcd01de97481724ac40e8cb

17
wscript
View File

@ -98,7 +98,7 @@ def configure(conf):
conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC') conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC')
# modify options dictionary early # modify options dictionary early
if conf.env.DEST_OS2 == 'android': if conf.env.DEST_OS == 'android':
conf.options.ALLOW64 = True # skip pointer length check conf.options.ALLOW64 = True # skip pointer length check
conf.options.NO_VGUI = True # skip vgui conf.options.NO_VGUI = True # skip vgui
conf.options.NANOGL = True conf.options.NANOGL = True
@ -115,7 +115,7 @@ def configure(conf):
conf.env.BIT32_ALLOW64 = True conf.env.BIT32_ALLOW64 = True
conf.env.BIT32_MANDATORY = not conf.env.BIT32_ALLOW64 conf.env.BIT32_MANDATORY = not conf.env.BIT32_ALLOW64
conf.load('force_32bit') conf.load('force_32bit')
if conf.env.DEST_OS2 != 'android' and not conf.options.DEDICATED: if conf.env.DEST_OS != 'android' and not conf.options.DEDICATED:
conf.load('sdl2') conf.load('sdl2')
linker_flags = { linker_flags = {
@ -193,8 +193,10 @@ def configure(conf):
conf.check_cc( lib='dl' ) conf.check_cc( lib='dl' )
if conf.env.DEST_OS != 'win32': if conf.env.DEST_OS != 'win32':
if conf.env.DEST_OS2 != 'android': if not conf.env.LIB_M: # HACK: already added in xcompile!
conf.check_cc( lib='m' ) # HACK: already added in xcompile! conf.check_cc( lib='m' )
if conf.env.DEST_OS != 'android': # Android has pthread directly in libc
conf.check_cc( lib='pthread' ) conf.check_cc( lib='pthread' )
else: else:
# Common Win32 libraries # Common Win32 libraries
@ -212,8 +214,7 @@ def configure(conf):
# indicate if we are packaging for Linux/BSD # indicate if we are packaging for Linux/BSD
if(not conf.options.WIN_INSTALL and if(not conf.options.WIN_INSTALL and
conf.env.DEST_OS not in ['win32', 'darwin'] and conf.env.DEST_OS not in ['win32', 'darwin', 'android']):
conf.env.DEST_OS2 not in ['android']):
conf.env.LIBDIR = conf.env.BINDIR = '${PREFIX}/lib/xash3d' conf.env.LIBDIR = conf.env.BINDIR = '${PREFIX}/lib/xash3d'
else: else:
conf.env.LIBDIR = conf.env.BINDIR = conf.env.PREFIX conf.env.LIBDIR = conf.env.BINDIR = conf.env.PREFIX
@ -224,7 +225,7 @@ def configure(conf):
if conf.env.SINGLE_BINARY and i.singlebin: if conf.env.SINGLE_BINARY and i.singlebin:
continue continue
if conf.env.DEST_OS2 == 'android' and i.singlebin: if conf.env.DEST_OS == 'android' and i.singlebin:
continue continue
if conf.env.DEDICATED and i.dedicated: if conf.env.DEDICATED and i.dedicated:
@ -237,7 +238,7 @@ def build(bld):
if bld.env.SINGLE_BINARY and i.singlebin: if bld.env.SINGLE_BINARY and i.singlebin:
continue continue
if bld.env.DEST_OS2 == 'android' and i.singlebin: if bld.env.DEST_OS == 'android' and i.singlebin:
continue continue
if bld.env.DEDICATED and i.dedicated: if bld.env.DEDICATED and i.dedicated: