|
|
@ -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, |
|
|
|