diff --git a/engine/wscript b/engine/wscript index b5cb6dcb..53f5875b 100644 --- a/engine/wscript +++ b/engine/wscript @@ -9,12 +9,10 @@ top = '.' def options(opt): grp = opt.add_option_group('Engine options') - grp.add_option( - '--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False, + grp.add_option('--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False, help = 'build engine with BSP2 map support(recommended for Quake, breaks compatibility!)') - grp.add_option( - '--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None, + grp.add_option('--stdin-input', action = 'store_true', dest = 'USE_SELECT', default = None, help = 'enable console input from stdin (default for dedicated)') opt.load('sdl2') @@ -22,13 +20,12 @@ def options(opt): def configure(conf): # check for dedicated server build if conf.options.DEDICATED: - if(conf.env.DEST_OS == 'linux'): + if conf.env.DEST_OS == 'linux': conf.check_cc( lib='rt' ) - conf.env.append_unique('DEFINES', 'XASH_DEDICATED') - elif conf.env.DEST_OS2 == 'android': # Android doesn't need SDL2 - conf.check_cc(lib='android') - conf.check_cc(lib='log') - conf.check_cc(lib='EGL') + conf.env.append_unique('DEFINES', 'XASH_DEDICATED=1') + elif conf.env.DEST_OS == 'android': # Android doesn't need SDL2 + for i in ['android', 'log', 'EGL']: + conf.check_cc(lib = i) else: conf.load('sdl2') if not conf.env.HAVE_SDL2: @@ -40,6 +37,7 @@ def configure(conf): if conf.options.USE_SELECT == None: conf.options.USE_SELECT = conf.options.DEDICATED + if conf.options.USE_SELECT: conf.env.append_unique('DEFINES', 'XASH_USE_SELECT') @@ -77,9 +75,9 @@ def build(bld): libs.append('SDL2') source += bld.path.ant_glob(['platform/sdl/*.c']) - if bld.env.DEST_OS2 == 'android': + if bld.env.DEST_OS == '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 if not bld.env.DEDICATED: @@ -101,8 +99,7 @@ def build(bld): install_path = bld.env.LIBDIR features = 'c cshlib' - bld( - source = source, + bld(source = source, target = 'xash', features = features, includes = includes, diff --git a/mainui b/mainui index c3095f47..59d65fdf 160000 --- a/mainui +++ b/mainui @@ -1 +1 @@ -Subproject commit c3095f477ff4ecfd8bc1f803c6d9e6e63ba32926 +Subproject commit 59d65fdf60b088846bcd01de97481724ac40e8cb diff --git a/wscript b/wscript index cb924f4c..4655103d 100644 --- a/wscript +++ b/wscript @@ -98,7 +98,7 @@ def configure(conf): conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC') # 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.NO_VGUI = True # skip vgui conf.options.NANOGL = True @@ -115,7 +115,7 @@ def configure(conf): conf.env.BIT32_ALLOW64 = True conf.env.BIT32_MANDATORY = not conf.env.BIT32_ALLOW64 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') linker_flags = { @@ -193,8 +193,10 @@ def configure(conf): conf.check_cc( lib='dl' ) if conf.env.DEST_OS != 'win32': - if conf.env.DEST_OS2 != 'android': - conf.check_cc( lib='m' ) # HACK: already added in xcompile! + if not conf.env.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' ) else: # Common Win32 libraries @@ -212,8 +214,7 @@ def configure(conf): # indicate if we are packaging for Linux/BSD if(not conf.options.WIN_INSTALL and - conf.env.DEST_OS not in ['win32', 'darwin'] and - conf.env.DEST_OS2 not in ['android']): + conf.env.DEST_OS not in ['win32', 'darwin', 'android']): conf.env.LIBDIR = conf.env.BINDIR = '${PREFIX}/lib/xash3d' else: conf.env.LIBDIR = conf.env.BINDIR = conf.env.PREFIX @@ -224,7 +225,7 @@ def configure(conf): if conf.env.SINGLE_BINARY and i.singlebin: continue - if conf.env.DEST_OS2 == 'android' and i.singlebin: + if conf.env.DEST_OS == 'android' and i.singlebin: continue if conf.env.DEDICATED and i.dedicated: @@ -237,7 +238,7 @@ def build(bld): if bld.env.SINGLE_BINARY and i.singlebin: continue - if bld.env.DEST_OS2 == 'android' and i.singlebin: + if bld.env.DEST_OS == 'android' and i.singlebin: continue if bld.env.DEDICATED and i.dedicated: