sourcemod/extensions/mysql/AMBuilder

47 lines
1.5 KiB
Plaintext
Raw Normal View History

# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
2009-08-30 09:46:56 +02:00
import os
if SM.mysql_root:
binary = SM.ExtLibrary(builder, 'dbi.mysql.ext')
binary.compiler.cxxincludes += [
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':
binary.compiler.cxxflags += ['-fno-rtti']
elif binary.compiler.vendor == 'msvc':
binary.compiler.cxxflags += ['/GR-']
2009-08-30 09:46:56 +02:00
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',
]
2014-10-22 06:51:15 +02:00
if builder.target_platform == 'linux':
binary.compiler.postlink += ['-lrt']
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'),
'wsock32.lib'
]
2009-08-30 09:46:56 +02:00
binary.sources += [
Deduplicate a number of files used by extensions by moving them to the public directory (bug 5341, r=psychonic). These files include smsdk_ext.cpp, smsdk_ext.h, sm_memtable.h, CDetour/*, and asm/*. The smsdk_config.h file for each extension has also been moved out of the 'sdk' directory into its parent. --HG-- rename : extensions/bintools/sdk/smsdk_config.h => extensions/bintools/smsdk_config.h rename : extensions/clientprefs/sdk/smsdk_config.h => extensions/clientprefs/smsdk_config.h rename : extensions/cstrike/sdk/smsdk_config.h => extensions/cstrike/smsdk_config.h rename : extensions/curl/sdk/smsdk_config.h => extensions/curl/smsdk_config.h rename : extensions/geoip/sdk/smsdk_config.h => extensions/geoip/smsdk_config.h rename : extensions/mysql/sdk/smsdk_config.h => extensions/mysql/smsdk_config.h rename : extensions/regex/sdk/smsdk_config.h => extensions/regex/smsdk_config.h rename : extensions/sdkhooks/sdk/smsdk_config.h => extensions/sdkhooks/smsdk_config.h rename : extensions/sdktools/sdk/smsdk_config.h => extensions/sdktools/smsdk_config.h rename : extensions/sqlite/sdk/smsdk_config.h => extensions/sqlite/smsdk_config.h rename : extensions/structs/sdk/smsdk_config.h => extensions/structs/smsdk_config.h rename : extensions/tf2/sdk/smsdk_config.h => extensions/tf2/smsdk_config.h rename : extensions/topmenus/sdk/smsdk_config.h => extensions/topmenus/smsdk_config.h rename : extensions/updater/sdk/smsdk_config.h => extensions/updater/smsdk_config.h rename : extensions/sdktools/CDetour/detourhelpers.h => public/CDetour/detourhelpers.h rename : extensions/sdktools/CDetour/detours.cpp => public/CDetour/detours.cpp rename : extensions/sdktools/CDetour/detours.h => public/CDetour/detours.h rename : extensions/sdktools/asm/asm.c => public/asm/asm.c rename : extensions/sdktools/asm/asm.h => public/asm/asm.h rename : public/sample_ext/sdk/smsdk_config.h => public/sample_ext/smsdk_config.h rename : core/logic/sm_memtable.h => public/sm_memtable.h rename : public/sample_ext/sdk/smsdk_ext.cpp => public/smsdk_ext.cpp rename : public/sample_ext/sdk/smsdk_ext.h => public/smsdk_ext.h
2014-04-24 04:19:28 +02:00
'../../public/smsdk_ext.cpp',
'mysql/MyBasicResults.cpp',
'mysql/MyBoundResults.cpp',
'mysql/MyDatabase.cpp',
'mysql/MyDriver.cpp',
'mysql/MyStatement.cpp',
'extension.cpp'
]
if binary.compiler.vendor == 'msvc' and binary.compiler.version >= 1900:
binary.sources += [ 'msvc15hack.c' ]
binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib']
SM.extensions += [builder.Add(binary)]