mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-15 05:29:51 +01:00
wscript: initial support for building on Android
This commit is contained in:
parent
71cae6b02b
commit
463a339a09
@ -21,7 +21,7 @@ def configure(conf):
|
||||
conf.check_cc( lib='rt' )
|
||||
conf.env.append_unique('DEFINES', 'SINGLE_BINARY')
|
||||
conf.env.append_unique('DEFINES', 'XASH_DEDICATED')
|
||||
else:
|
||||
elif conf.env.DEST_OS2 != 'android': # Android doesn't need SDL2
|
||||
conf.load('sdl2')
|
||||
if not conf.env.HAVE_SDL2:
|
||||
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
||||
@ -56,16 +56,21 @@ def build(bld):
|
||||
if bld.env.DEST_OS == 'linux':
|
||||
source += bld.path.ant_glob(['platform/linux/*.c'])
|
||||
|
||||
# add client files and sdl2 library
|
||||
if bld.env.HAVE_SDL2:
|
||||
libs.append('SDL2')
|
||||
source += bld.path.ant_glob(['platform/sdl/*.c'])
|
||||
|
||||
if bld.env.DEST_OS2 == 'android':
|
||||
source += bld.path.ant_glob(['platform/android/*.c'])
|
||||
|
||||
# add client files
|
||||
if not bld.env.DEDICATED:
|
||||
libs.append( 'SDL2' )
|
||||
source += bld.path.ant_glob([
|
||||
'client/*.c',
|
||||
'client/vgui/*.c',
|
||||
'client/avi/*.c',
|
||||
'platform/sdl/*.c'])
|
||||
'client/avi/*.c'])
|
||||
else:
|
||||
if(bld.env.DEST_OS == 'linux'):
|
||||
if bld.env.DEST_OS == 'linux':
|
||||
libs.append('RT')
|
||||
|
||||
includes = ['common', 'server', 'client', 'client/vgui', '.', '../common', '../pm_shared' ]
|
||||
|
2
mainui
2
mainui
@ -1 +1 @@
|
||||
Subproject commit f288c4b740289ad96710de772e769cc2a0731b7e
|
||||
Subproject commit 5961ebe5dfdcdc1052b20836bd6a85acd06ad22e
|
9
wscript
9
wscript
@ -17,7 +17,7 @@ SUBDIRS = [ 'engine', 'game_launch', 'mainui', 'vgui_support' ]
|
||||
top = '.'
|
||||
|
||||
def options(opt):
|
||||
opt.load('compiler_cxx compiler_c')
|
||||
opt.load('xcompile compiler_cxx compiler_c')
|
||||
if sys.platform == 'win32':
|
||||
opt.load('msvc msvs')
|
||||
|
||||
@ -54,10 +54,12 @@ def configure(conf):
|
||||
# TODO: wrapper around bld.stlib, bld.shlib and so on?
|
||||
conf.env.MSVC_SUBSYSTEM = 'WINDOWS,5.01'
|
||||
conf.env.MSVC_TARGETS = ['x86'] # explicitly request x86 target for MSVC
|
||||
conf.load('compiler_cxx compiler_c gitversion')
|
||||
conf.load('xcompile compiler_c compiler_cxx gitversion')
|
||||
if sys.platform == 'win32':
|
||||
conf.load('msvc msvs')
|
||||
|
||||
# print(conf.options.ALLOW64)
|
||||
|
||||
conf.env.BIT32_MANDATORY = not conf.options.ALLOW64
|
||||
conf.env.BIT32_ALLOW64 = conf.options.ALLOW64
|
||||
conf.load('force_32bit')
|
||||
@ -105,7 +107,8 @@ def configure(conf):
|
||||
|
||||
if conf.env.DEST_OS != 'win32':
|
||||
conf.check_cc( lib='m' )
|
||||
conf.check_cc( lib='pthread' )
|
||||
if conf.env.DEST_OS2 != 'android':
|
||||
conf.check_cc( lib='pthread' )
|
||||
else:
|
||||
# Common Win32 libraries
|
||||
# Don't check them more than once, to save time
|
||||
|
Loading…
Reference in New Issue
Block a user