mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 09:57:21 +01:00
wscript: remove DEST_OS2
This commit is contained in:
parent
a4548074ec
commit
17e1af726d
@ -48,7 +48,7 @@ def build(bld):
|
|||||||
if bld.env.GOLDSRC:
|
if bld.env.GOLDSRC:
|
||||||
libs += ['DL']
|
libs += ['DL']
|
||||||
|
|
||||||
if bld.env.DEST_OS2 not in ['android']:
|
if bld.env.DEST_OS not in ['android']:
|
||||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
|
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
|
||||||
else:
|
else:
|
||||||
install_path = bld.env.PREFIX
|
install_path = bld.env.PREFIX
|
||||||
|
@ -54,7 +54,7 @@ def build(bld):
|
|||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
if bld.env.DEST_OS2 not in ['android']:
|
if bld.env.DEST_OS not in ['android']:
|
||||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_DIR)
|
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_DIR)
|
||||||
else:
|
else:
|
||||||
install_path = bld.env.PREFIX
|
install_path = bld.env.PREFIX
|
||||||
|
@ -14,20 +14,11 @@
|
|||||||
try: from fwgslib import get_flags_by_compiler
|
try: from fwgslib import get_flags_by_compiler
|
||||||
except: from waflib.extras.fwgslib import get_flags_by_compiler
|
except: from waflib.extras.fwgslib import get_flags_by_compiler
|
||||||
from waflib import Logs
|
from waflib import Logs
|
||||||
|
from waflib.Tools import c_config
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Output:
|
# This class does support ONLY r10e and r19c/r20 NDK
|
||||||
# CROSSCOMPILING -- set to true, if crosscompiling is enabled
|
|
||||||
# DEST_OS2 -- as some operating systems is built on top of another, it's better to not change DEST_OS,
|
|
||||||
# instead of this DEST_OS2 is defined with target value
|
|
||||||
# For example: android is built on top of linux and have many things in common,
|
|
||||||
# but it can't be considered as default GNU/Linux.
|
|
||||||
# Possible values:
|
|
||||||
# DEST_OS2 DEST_OS
|
|
||||||
# 'android' 'linux'
|
|
||||||
|
|
||||||
# This class does support ONLY r10e and r19c NDK
|
|
||||||
class Android:
|
class Android:
|
||||||
ctx = None # waf context
|
ctx = None # waf context
|
||||||
arch = None
|
arch = None
|
||||||
@ -309,8 +300,7 @@ def configure(conf):
|
|||||||
if values[0] not in valid_archs:
|
if values[0] not in valid_archs:
|
||||||
conf.fatal('Unknown arch: {}. Supported: {}'.format(values[0], ', '.join(valid_archs)))
|
conf.fatal('Unknown arch: {}. Supported: {}'.format(values[0], ', '.join(valid_archs)))
|
||||||
|
|
||||||
android = Android(conf, values[0], values[1], int(values[2]))
|
conf.android = android = Android(conf, values[0], values[1], int(values[2]))
|
||||||
setattr(conf, 'android', android)
|
|
||||||
conf.environ['CC'] = android.cc()
|
conf.environ['CC'] = android.cc()
|
||||||
conf.environ['CXX'] = android.cxx()
|
conf.environ['CXX'] = android.cxx()
|
||||||
conf.environ['STRIP'] = android.strip()
|
conf.environ['STRIP'] = android.strip()
|
||||||
@ -334,10 +324,18 @@ def configure(conf):
|
|||||||
|
|
||||||
# conf.env.ANDROID_OPTS = android
|
# conf.env.ANDROID_OPTS = android
|
||||||
conf.env.DEST_OS2 = 'android'
|
conf.env.DEST_OS2 = 'android'
|
||||||
# else:
|
|
||||||
# conf.load('compiler_c compiler_cxx') # Use host compiler :)
|
MACRO_TO_DESTOS = {
|
||||||
|
'__ANDROID__' : 'android'
|
||||||
|
}
|
||||||
|
MACRO_TO_DESTOS.update(c_config.MACRO_TO_DESTOS) # ordering is important
|
||||||
|
c_config.MACRO_TO_DESTOS = MACRO_TO_DESTOS
|
||||||
|
|
||||||
def post_compiler_cxx_configure(conf):
|
def post_compiler_cxx_configure(conf):
|
||||||
|
conf.msg('Target OS', conf.env.DEST_OS)
|
||||||
|
conf.msg('Target CPU', conf.env.DEST_CPU)
|
||||||
|
conf.msg('Target binfmt', conf.env.DEST_BINFMT)
|
||||||
|
|
||||||
if conf.options.ANDROID_OPTS:
|
if conf.options.ANDROID_OPTS:
|
||||||
if conf.android.ndk_rev == 19:
|
if conf.android.ndk_rev == 19:
|
||||||
conf.env.CXXFLAGS_cxxshlib += ['-static-libstdc++']
|
conf.env.CXXFLAGS_cxxshlib += ['-static-libstdc++']
|
||||||
@ -345,6 +343,10 @@ def post_compiler_cxx_configure(conf):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def post_compiler_c_configure(conf):
|
def post_compiler_c_configure(conf):
|
||||||
|
conf.msg('Target OS', conf.env.DEST_OS)
|
||||||
|
conf.msg('Target CPU', conf.env.DEST_CPU)
|
||||||
|
conf.msg('Target binfmt', conf.env.DEST_BINFMT)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
from waflib.Tools import compiler_cxx, compiler_c
|
from waflib.Tools import compiler_cxx, compiler_c
|
||||||
|
2
wscript
2
wscript
@ -70,7 +70,7 @@ def configure(conf):
|
|||||||
conf.load('msvc msdev')
|
conf.load('msvc msdev')
|
||||||
conf.load('xcompile compiler_c compiler_cxx strip_on_install')
|
conf.load('xcompile compiler_c compiler_cxx strip_on_install')
|
||||||
|
|
||||||
if conf.env.DEST_OS2 == 'android':
|
if conf.env.DEST_OS == 'android':
|
||||||
conf.options.ALLOW64 = True
|
conf.options.ALLOW64 = True
|
||||||
conf.options.GOLDSRC = False
|
conf.options.GOLDSRC = False
|
||||||
conf.env.SERVER_NAME = 'server' # can't be any other name, until specified
|
conf.env.SERVER_NAME = 'server' # can't be any other name, until specified
|
||||||
|
Loading…
Reference in New Issue
Block a user