Switch to AMBuild 2.1 API. (#694)
This commit is contained in:
@@ -8,9 +8,9 @@ binary.compiler.cxxincludes += [
|
||||
os.path.join(builder.sourcePath, 'public', 'jit'),
|
||||
os.path.join(builder.sourcePath, 'public', 'jit', 'x86'),
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -5,9 +5,9 @@ binary = SM.ExtLibrary(builder, 'clientprefs.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python :
|
||||
import os
|
||||
|
||||
libcurl = builder.RunScript('curl-src/lib/AMBuilder')
|
||||
libcurl = builder.Build('curl-src/lib/AMBuilder')
|
||||
|
||||
binary = SM.ExtLibrary(builder, 'webternet.ext')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
binary.compiler.defines += ['CURL_STATICLIB']
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
binary.compiler.postlink += [libcurl.binary]
|
||||
if builder.target_platform == 'linux':
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target_platform == 'windows':
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.postlink += ['ws2_32.lib']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -3,24 +3,24 @@ import os, platform
|
||||
|
||||
builder.SetBuildFolder('libcurl')
|
||||
|
||||
binary = builder.compiler.StaticLibrary('curl')
|
||||
binary = SM.StaticLibrary(builder, 'curl')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'lib'),
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
|
||||
if builder.target_platform == 'mac':
|
||||
if builder.target.platform == 'mac':
|
||||
mac_version, ignore, ignore = platform.mac_ver()
|
||||
mac_tuple = mac_version.split('.')
|
||||
if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
|
||||
binary.compiler.defines += ['BUILTIN_STRLCAT']
|
||||
elif builder.target_platform == 'windows':
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.defines += [
|
||||
'BUILDING_LIBCURL',
|
||||
'CURL_STATICLIB',
|
||||
'CURL_DISABLE_LDAP',
|
||||
]
|
||||
elif builder.target_platform == 'linux':
|
||||
elif builder.target.platform == 'linux':
|
||||
binary.compiler.defines += ['_GNU_SOURCE']
|
||||
|
||||
if binary.compiler.vendor == 'clang':
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
import os
|
||||
|
||||
binary = SM.ExtLibrary(builder, 'geoip.ext')
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
if builder.target_platform == 'windows':
|
||||
if builder.target.platform == 'windows':
|
||||
binary.compiler.postlink += ['wsock32.lib']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -7,21 +7,21 @@ if SM.mysql_root:
|
||||
os.path.join(SM.mysql_root, 'include'),
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
|
||||
if builder.target.platform == 'linux' or builder.target.platform == 'mac':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
|
||||
'-lz',
|
||||
'-lpthread',
|
||||
'-lm',
|
||||
]
|
||||
if builder.target_platform == 'linux':
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target_platform == 'windows':
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'opt', 'mysqlclient.lib'),
|
||||
os.path.join(SM.mysql_root, 'lib', 'opt', 'zlib.lib'),
|
||||
@@ -38,7 +38,7 @@ if SM.mysql_root:
|
||||
'extension.cpp'
|
||||
]
|
||||
|
||||
if binary.compiler.vendor == 'msvc' and binary.compiler.version >= 1900:
|
||||
if binary.compiler.family == 'msvc' and binary.compiler.version >= 1900:
|
||||
binary.sources += [ 'msvc15hack.c' ]
|
||||
binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib']
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@ binary = SM.ExtLibrary(builder, 'regex.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
if builder.target_platform == 'linux':
|
||||
if builder.target.platform == 'linux':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux', 'libpcre.a')
|
||||
elif builder.target_platform == 'windows':
|
||||
elif builder.target.platform == 'windows':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_win', 'pcre.lib')
|
||||
elif builder.target_platform == 'mac':
|
||||
elif builder.target.platform == 'mac':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a')
|
||||
binary.compiler.postlink += [binary.Dep(path)]
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ for sdk_name in SM.sdks:
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(sdk.path, 'game', 'shared')
|
||||
]
|
||||
if binary.compiler.cxx.behavior == 'gcc':
|
||||
if binary.compiler.behavior == 'gcc':
|
||||
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
||||
|
||||
SM.extensions += builder.Add(project)
|
||||
|
||||
@@ -42,7 +42,7 @@ for sdk_name in SM.sdks:
|
||||
if sdk.name != 'episode1':
|
||||
binary.compiler.defines += ['HOOKING_ENABLED']
|
||||
|
||||
if binary.compiler.cxx.behavior == 'gcc':
|
||||
if binary.compiler.behavior == 'gcc':
|
||||
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
||||
|
||||
SM.extensions += builder.Add(project)
|
||||
|
||||
@@ -5,9 +5,9 @@ binary = SM.ExtLibrary(builder, 'dbi.sqlite.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
binary.compiler.defines += [
|
||||
@@ -16,7 +16,7 @@ binary.compiler.defines += [
|
||||
'SQLITE_USE_URI',
|
||||
'SQLITE_ALLOW_URI_AUTHORITY',
|
||||
]
|
||||
if builder.target_platform == 'linux':
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-ldl', '-lpthread']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -5,9 +5,9 @@ binary = SM.ExtLibrary(builder, 'topmenus.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -5,9 +5,9 @@ binary = SM.ExtLibrary(builder, 'updater.ext')
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.vendor == 'msvc':
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
Reference in New Issue
Block a user