mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
wscript: strip lib prefix for HLSDK
This commit is contained in:
parent
c27aec4c9c
commit
a699702c00
@ -48,13 +48,10 @@ def build(bld):
|
||||
if bld.env.GOLDSRC:
|
||||
libs += ['DL']
|
||||
|
||||
if bld.env.DEST_OS == 'win32':
|
||||
libname = 'client.dll'
|
||||
elif bld.env.DEST_OS == 'linux':
|
||||
libname = 'client.so'
|
||||
elif bld.env.DEST_OS == 'darwin':
|
||||
libname = 'client.dylib'
|
||||
else: libname = ''
|
||||
if bld.env.DEST_OS2 not in ['android']:
|
||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
|
||||
else:
|
||||
install_path = bld.env.PREFIX
|
||||
|
||||
bld.shlib(
|
||||
source = source,
|
||||
@ -63,7 +60,7 @@ def build(bld):
|
||||
includes = includes,
|
||||
defines = defines,
|
||||
use = libs,
|
||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR, libname),
|
||||
install_path = install_path,
|
||||
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||
idx = 1
|
||||
)
|
||||
|
13
dlls/wscript
13
dlls/wscript
@ -54,13 +54,10 @@ def build(bld):
|
||||
|
||||
libs = []
|
||||
|
||||
if bld.env.DEST_OS == 'win32':
|
||||
libname = bld.env.SERVER_NAME + '.dll'
|
||||
elif bld.env.DEST_OS == 'linux':
|
||||
libname = bld.env.SERVER_NAME + '.so'
|
||||
elif bld.env.DEST_OS == 'darwin':
|
||||
libname = bld.env.SERVER_NAME + '.dylib'
|
||||
else: libname = ''
|
||||
if bld.env.DEST_OS2 not in ['android']:
|
||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_DIR)
|
||||
else:
|
||||
install_path = bld.env.PREFIX
|
||||
|
||||
bld.shlib(
|
||||
source = source,
|
||||
@ -69,7 +66,7 @@ def build(bld):
|
||||
includes = includes,
|
||||
defines = defines,
|
||||
use = libs,
|
||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_DIR, libname),
|
||||
install_path = install_path,
|
||||
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||
idx = 2
|
||||
)
|
||||
|
14
wscript
14
wscript
@ -71,6 +71,11 @@ def configure(conf):
|
||||
conf.load('msvc msdev')
|
||||
conf.load('xcompile compiler_c compiler_cxx')
|
||||
|
||||
if conf.env.DEST_OS2 == 'android':
|
||||
conf.options.ALLOW64 = True
|
||||
conf.options.GOLDSRC = False
|
||||
conf.env.SERVER_NAME = 'server' # can't be any other name, until specified
|
||||
|
||||
# print(conf.options.ALLOW64)
|
||||
|
||||
conf.env.BIT32_MANDATORY = not conf.options.ALLOW64
|
||||
@ -134,10 +139,17 @@ def configure(conf):
|
||||
conf.env.append_unique('DEFINES', ['_CRT_SECURE_NO_WARNINGS','_CRT_NONSTDC_NO_DEPRECATE'])
|
||||
else:
|
||||
conf.env.append_unique('DEFINES', ['stricmp=strcasecmp','strnicmp=strncasecmp','_LINUX','LINUX','_snprintf=snprintf','_vsnprintf=vsnprintf'])
|
||||
cflags = ['-fvisibility=hidden','-Wno-write-strings','-fno-exceptions']
|
||||
cflags = ['-fvisibility=hidden','-Wno-write-strings','-fno-exceptions','-fno-rtti']
|
||||
conf.env.append_unique('CFLAGS', cflags)
|
||||
conf.env.append_unique('CXXFLAGS', cflags + ['-Wno-invalid-offsetof'])
|
||||
|
||||
# strip lib from pattern
|
||||
if conf.env.DEST_OS in ['linux', 'darwin'] and conf.env.DEST_OS2 not in ['android']:
|
||||
if conf.env.cshlib_PATTERN.startswith('lib'):
|
||||
conf.env.cshlib_PATTERN = conf.env.cshlib_PATTERN[3:]
|
||||
if conf.env.cxxshlib_PATTERN.startswith('lib'):
|
||||
conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:]
|
||||
|
||||
conf.env.append_unique('DEFINES', 'CLIENT_WEAPONS')
|
||||
|
||||
conf.recurse('cl_dll dlls')
|
||||
|
Loading…
Reference in New Issue
Block a user