|
|
|
@ -9,12 +9,10 @@ top = '.'
@@ -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):
@@ -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):
@@ -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):
@@ -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):
@@ -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, |
|
|
|
|