2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00

wscript: add option to turn on simple mod hacks

This commit is contained in:
Alibek Omarov 2019-12-02 02:28:51 +03:00
parent 52b067fd4f
commit e53f15cabf

10
wscript
View File

@ -43,6 +43,9 @@ def options(opt):
grp.add_option('--enable-magx', action = 'store_true', dest = 'MAGX', default = False,
help = 'enable targetting for MotoMAGX phones [default: %default]')
grp.add_option('--enable-simple-mod-hacks', action = 'store_true', dest = 'ENABLE_MOD_HACKS', default = False,
help = 'enable hacks for simple mods that mostly compatible with Half-Life but has little changes. Enforced for Android. [default: %default]')
opt.load('xcompile compiler_cxx compiler_c clang_compilation_database strip_on_install')
if sys.platform == 'win32':
@ -180,8 +183,6 @@ def configure(conf):
compiler_optional_flags = [
'-fdiagnostics-color=always',
'-Werror=implicit-function-declaration',
'-Werror=int-conversion',
'-Werror=return-type',
'-Werror=parentheses',
'-Werror=vla',
@ -193,6 +194,8 @@ def configure(conf):
]
c_compiler_optional_flags = [
'-Werror=implicit-function-declaration',
'-Werror=int-conversion',
'-Werror=implicit-int',
'-Werror=declaration-after-statement'
]
@ -263,6 +266,9 @@ def configure(conf):
conf.define('CLIENT_WEAPONS', '1')
if conf.env.DEST_OS == 'android' or conf.options.ENABLE_MOD_HACKS:
conf.define('MOBILE_HACKS', '1')
conf.add_subproject(["cl_dll", "dlls"])
def build(bld):