Revert "Remove arch loops from build scripts. (#889)"
This reverts commit 7ed329c11f.
			
			
This commit is contained in:
		
							parent
							
								
									22b43e3869
								
							
						
					
					
						commit
						1ca4517f46
					
				| @ -639,40 +639,32 @@ for arch in SM.archs: | |||||||
|      SP.libsourcepawn[arch] |      SP.libsourcepawn[arch] | ||||||
|   ] |   ] | ||||||
| 
 | 
 | ||||||
| NonSDKBuilds = [ | BuildScripts = [ | ||||||
|  |   'loader/AMBuilder', | ||||||
|  |   'core/AMBuilder', | ||||||
|   'core/logic/AMBuilder', |   'core/logic/AMBuilder', | ||||||
|   'extensions/bintools/AMBuilder', |   'extensions/bintools/AMBuilder', | ||||||
|   'extensions/clientprefs/AMBuilder', |   'extensions/clientprefs/AMBuilder', | ||||||
|   'extensions/curl/AMBuilder', |   'extensions/curl/AMBuilder', | ||||||
|   'extensions/geoip/AMBuilder', |  | ||||||
|   'extensions/regex/AMBuilder', |  | ||||||
|   'extensions/sqlite/AMBuilder', |  | ||||||
|   'extensions/topmenus/AMBuilder', |  | ||||||
|   'extensions/updater/AMBuilder', |  | ||||||
|   'loader/AMBuilder', |  | ||||||
| ] |  | ||||||
| if SM.mysql_root: |  | ||||||
|   NonSDKBuilds += [ |  | ||||||
|     'extensions/mysql/AMBuilder', |  | ||||||
|   ] |  | ||||||
| for arch in SM.archs: |  | ||||||
|   builder.Build(NonSDKBuilds, { 'SM': SM, 'arch': arch }) |  | ||||||
| 
 |  | ||||||
| SDKBuilds = [ |  | ||||||
|   'core/AMBuilder', |  | ||||||
|   'extensions/cstrike/AMBuilder', |   'extensions/cstrike/AMBuilder', | ||||||
|  |   'extensions/geoip/AMBuilder', | ||||||
|  |   'extensions/mysql/AMBuilder', | ||||||
|  |   'extensions/regex/AMBuilder', | ||||||
|   'extensions/sdkhooks/AMBuilder', |   'extensions/sdkhooks/AMBuilder', | ||||||
|   'extensions/sdktools/AMBuilder', |   'extensions/sdktools/AMBuilder', | ||||||
|  |   'extensions/sqlite/AMBuilder', | ||||||
|   'extensions/tf2/AMBuilder', |   'extensions/tf2/AMBuilder', | ||||||
|  |   'extensions/topmenus/AMBuilder', | ||||||
|  |   'extensions/updater/AMBuilder', | ||||||
| ] | ] | ||||||
| builder.Build(SDKBuilds, { 'SM': SM }) |  | ||||||
| 
 | 
 | ||||||
| if builder.backend == 'amb2': | if builder.backend == 'amb2': | ||||||
|   OtherScripts = [ |   BuildScripts += [ | ||||||
|     'plugins/AMBuilder', |     'plugins/AMBuilder', | ||||||
|     'tools/buildbot/PackageScript', |     'tools/buildbot/PackageScript', | ||||||
|   ] |   ] | ||||||
|   builder.Build(OtherScripts, { 'SM': SM }) | 
 | ||||||
|  | builder.Build(BuildScripts, { 'SM': SM }) | ||||||
| 
 | 
 | ||||||
| if builder.options.breakpad_dump: | if builder.options.breakpad_dump: | ||||||
|   builder.Build('tools/buildbot/BreakpadSymbols', { 'SM': SM }) |   builder.Build('tools/buildbot/BreakpadSymbols', { 'SM': SM }) | ||||||
|  | |||||||
| @ -1,8 +1,9 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.Library(builder, 'sourcemod.logic', arch) | for arch in SM.archs: | ||||||
| binary.compiler.cxxincludes += [ |   binary = SM.Library(builder, 'sourcemod.logic', arch) | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     builder.sourcePath, |     builder.sourcePath, | ||||||
|     os.path.join(builder.sourcePath, 'core', 'logic'), |     os.path.join(builder.sourcePath, 'core', 'logic'), | ||||||
|     os.path.join(builder.sourcePath, 'public'), |     os.path.join(builder.sourcePath, 'public'), | ||||||
| @ -10,24 +11,24 @@ binary.compiler.cxxincludes += [ | |||||||
|     os.path.join(builder.sourcePath, 'public', 'amtl', 'amtl'), |     os.path.join(builder.sourcePath, 'public', 'amtl', 'amtl'), | ||||||
|     os.path.join(builder.sourcePath, 'public', 'amtl'), |     os.path.join(builder.sourcePath, 'public', 'amtl'), | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook') |     os.path.join(SM.mms_root, 'core', 'sourcehook') | ||||||
| ] |   ] | ||||||
| binary.compiler.defines += [ |   binary.compiler.defines += [ | ||||||
|     'SM_DEFAULT_THREADER', |     'SM_DEFAULT_THREADER', | ||||||
|     'SM_LOGIC' |     'SM_LOGIC' | ||||||
| ] |   ] | ||||||
|    |    | ||||||
| if builder.target.platform == 'linux': |   if builder.target.platform == 'linux': | ||||||
|     binary.compiler.postlink += ['-lpthread', '-lrt'] |     binary.compiler.postlink += ['-lpthread', '-lrt'] | ||||||
| elif builder.target.platform == 'mac': |   elif builder.target.platform == 'mac': | ||||||
|     binary.compiler.cflags += ['-Wno-deprecated-declarations'] |     binary.compiler.cflags += ['-Wno-deprecated-declarations'] | ||||||
|     binary.compiler.postlink += ['-framework', 'CoreServices'] |     binary.compiler.postlink += ['-framework', 'CoreServices'] | ||||||
| 
 | 
 | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'common_logic.cpp', |     'common_logic.cpp', | ||||||
|     'smn_adt_array.cpp', |     'smn_adt_array.cpp', | ||||||
|     'smn_sorting.cpp', |     'smn_sorting.cpp', | ||||||
| @ -84,14 +85,14 @@ binary.sources += [ | |||||||
|     'smn_halflife.cpp', |     'smn_halflife.cpp', | ||||||
|     'FrameIterator.cpp', |     'FrameIterator.cpp', | ||||||
|     'DatabaseConfBuilder.cpp', |     'DatabaseConfBuilder.cpp', | ||||||
| ] |   ] | ||||||
| 
 | 
 | ||||||
| if arch == 'x64': |   if arch == 'x64': | ||||||
|     binary.sources += ['PseudoAddrManager.cpp'] |     binary.sources += ['PseudoAddrManager.cpp'] | ||||||
| 
 | 
 | ||||||
| if builder.target.platform == 'windows': |   if builder.target.platform == 'windows': | ||||||
|     binary.sources += ['thread/WinThreads.cpp'] |     binary.sources += ['thread/WinThreads.cpp'] | ||||||
| else: |   else: | ||||||
|     binary.sources += ['thread/PosixThreads.cpp'] |     binary.sources += ['thread/PosixThreads.cpp'] | ||||||
| 
 | 
 | ||||||
| SM.binaries += [builder.Add(binary)] |   SM.binaries += [builder.Add(binary)] | ||||||
|  | |||||||
| @ -1,28 +1,30 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'bintools.ext', arch) | for arch in SM.archs: | ||||||
| binary.compiler.defines += ['HOOKING_ENABLED'] |   binary = SM.ExtLibrary(builder, 'bintools.ext', arch) | ||||||
| binary.compiler.cxxincludes += [ |   binary.compiler.defines += ['HOOKING_ENABLED'] | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook'), |     os.path.join(SM.mms_root, 'core', 'sourcehook'), | ||||||
|     os.path.join(builder.sourcePath, 'public', 'jit'), |     os.path.join(builder.sourcePath, 'public', 'jit'), | ||||||
|     os.path.join(builder.sourcePath, 'public', 'jit', 'x86'), |     os.path.join(builder.sourcePath, 'public', 'jit', 'x86'), | ||||||
| ] |   ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'CallMaker.cpp', |     'CallMaker.cpp', | ||||||
|     'CallWrapper.cpp', |     'CallWrapper.cpp', | ||||||
|     '../../public/smsdk_ext.cpp' |     '../../public/smsdk_ext.cpp' | ||||||
| ] |   ] | ||||||
|    |    | ||||||
| if arch == 'x64': |   if arch == 'x64': | ||||||
|     binary.sources += ['jit_call_x64.cpp'] |     binary.sources += ['jit_call_x64.cpp'] | ||||||
| else: |   else: | ||||||
|     binary.sources += ['jit_call.cpp'] |     binary.sources += ['jit_call.cpp'] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |   SM.extensions += [builder.Add(binary)] | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -1,22 +1,24 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'clientprefs.ext', arch) | for arch in SM.archs: | ||||||
| binary.compiler.cxxincludes += [ |   binary = SM.ExtLibrary(builder, 'clientprefs.ext', arch) | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook'), |     os.path.join(SM.mms_root, 'core', 'sourcehook'), | ||||||
| ] |   ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'cookie.cpp', |     'cookie.cpp', | ||||||
|     'menus.cpp', |     'menus.cpp', | ||||||
|     'natives.cpp', |     'natives.cpp', | ||||||
|     'query.cpp', |     'query.cpp', | ||||||
|     '../../public/smsdk_ext.cpp' |     '../../public/smsdk_ext.cpp' | ||||||
| ] |   ] | ||||||
|  | 
 | ||||||
|  |   SM.extensions += [builder.Add(binary)] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |  | ||||||
|  | |||||||
| @ -2,26 +2,27 @@ | |||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| libcurl = builder.Build('curl-src/lib/AMBuilder') | libcurl = builder.Build('curl-src/lib/AMBuilder') | ||||||
| 
 | for arch in SM.archs: | ||||||
| binary = SM.ExtLibrary(builder, 'webternet.ext', arch) |   binary = SM.ExtLibrary(builder, 'webternet.ext', arch) | ||||||
| binary.compiler.includes += [ |   binary.compiler.includes += [ | ||||||
|     os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include') |     os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include') | ||||||
| ] |   ] | ||||||
| binary.compiler.defines += ['CURL_STATICLIB'] |   binary.compiler.defines += ['CURL_STATICLIB'] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| binary.compiler.postlink += [libcurl[arch].binary] |   binary.compiler.postlink += [libcurl[arch].binary] | ||||||
| if builder.target.platform == 'linux': |   if builder.target.platform == 'linux': | ||||||
|     binary.compiler.postlink += ['-lrt'] |     binary.compiler.postlink += ['-lrt'] | ||||||
| elif builder.target.platform == 'windows': |   elif builder.target.platform == 'windows': | ||||||
|     binary.compiler.postlink += ['ws2_32.lib'] |     binary.compiler.postlink += ['ws2_32.lib'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'curlapi.cpp', |     'curlapi.cpp', | ||||||
|     '../../public/smsdk_ext.cpp' |     '../../public/smsdk_ext.cpp' | ||||||
| ] |   ] | ||||||
|  | 
 | ||||||
|  |   SM.extensions += [builder.Add(binary)] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |  | ||||||
|  | |||||||
| @ -1,18 +1,20 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'geoip.ext', arch) | for arch in SM.archs: | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   binary = SM.ExtLibrary(builder, 'geoip.ext', arch) | ||||||
|  |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| if builder.target.platform == 'windows': |   if builder.target.platform == 'windows': | ||||||
|     binary.compiler.postlink += ['wsock32.lib'] |     binary.compiler.postlink += ['wsock32.lib'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'GeoIP.c', |     'GeoIP.c', | ||||||
|     '../../public/smsdk_ext.cpp' |     '../../public/smsdk_ext.cpp' | ||||||
| ] |   ] | ||||||
|  | 
 | ||||||
|  |   SM.extensions += [builder.Add(binary)] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |  | ||||||
|  | |||||||
| @ -1,33 +1,35 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'dbi.mysql.ext', arch) | if SM.mysql_root: | ||||||
| binary.compiler.cxxincludes += [ |   for arch in SM.archs: | ||||||
|  |     binary = SM.ExtLibrary(builder, 'dbi.mysql.ext', arch) | ||||||
|  |     binary.compiler.cxxincludes += [ | ||||||
|       os.path.join(SM.mysql_root[arch], 'include'), |       os.path.join(SM.mysql_root[arch], 'include'), | ||||||
|       os.path.join(SM.mms_root, 'core', 'sourcehook') |       os.path.join(SM.mms_root, 'core', 'sourcehook') | ||||||
| ] |     ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |     if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|       binary.compiler.cxxflags += ['-fno-rtti'] |       binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |     elif binary.compiler.family == 'msvc': | ||||||
|       binary.compiler.cxxflags += ['/GR-'] |       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 += [ |       binary.compiler.postlink += [ | ||||||
|         os.path.join(SM.mysql_root[arch], 'lib', 'libmysqlclient_r.a'), |         os.path.join(SM.mysql_root[arch], 'lib', 'libmysqlclient_r.a'), | ||||||
|         '-lz', |         '-lz', | ||||||
|         '-lpthread', |         '-lpthread', | ||||||
|         '-lm', |         '-lm', | ||||||
|       ] |       ] | ||||||
| if builder.target.platform == 'linux': |     if builder.target.platform == 'linux': | ||||||
|       binary.compiler.postlink += ['-lrt'] |       binary.compiler.postlink += ['-lrt'] | ||||||
| elif builder.target.platform == 'windows': |     elif builder.target.platform == 'windows': | ||||||
|       binary.compiler.defines += ['WIN32_LEAN_AND_MEAN'] |       binary.compiler.defines += ['WIN32_LEAN_AND_MEAN'] | ||||||
|       binary.compiler.postlink += [ |       binary.compiler.postlink += [ | ||||||
|         os.path.join(SM.mysql_root[arch], 'lib', 'mysqlclient.lib'), |         os.path.join(SM.mysql_root[arch], 'lib', 'mysqlclient.lib'), | ||||||
|         'wsock32.lib' |         'wsock32.lib' | ||||||
|       ] |       ] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |     binary.sources += [ | ||||||
|       '../../public/smsdk_ext.cpp', |       '../../public/smsdk_ext.cpp', | ||||||
|       'mysql/MyBasicResults.cpp', |       'mysql/MyBasicResults.cpp', | ||||||
|       'mysql/MyBoundResults.cpp', |       'mysql/MyBoundResults.cpp', | ||||||
| @ -35,11 +37,12 @@ binary.sources += [ | |||||||
|       'mysql/MyDriver.cpp', |       'mysql/MyDriver.cpp', | ||||||
|       'mysql/MyStatement.cpp', |       'mysql/MyStatement.cpp', | ||||||
|       'extension.cpp' |       'extension.cpp' | ||||||
| ] |     ] | ||||||
|    |    | ||||||
| if binary.compiler.family == 'msvc' and binary.compiler.version >= 1900: |     if binary.compiler.family == 'msvc' and binary.compiler.version >= 1900: | ||||||
|       binary.sources += [ 'msvc15hack.c' ] |       binary.sources += [ 'msvc15hack.c' ] | ||||||
|       binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib'] |       binary.compiler.linkflags += ['legacy_stdio_definitions.lib', 'legacy_stdio_wide_specifiers.lib'] | ||||||
|       binary.compiler.defines += ['HAVE_STRUCT_TIMESPEC'] |       binary.compiler.defines += ['HAVE_STRUCT_TIMESPEC'] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |     SM.extensions += [builder.Add(binary)] | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -1,33 +1,35 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'regex.ext', arch) | for arch in SM.archs: | ||||||
| binary.compiler.cxxincludes += [ |   binary = SM.ExtLibrary(builder, 'regex.ext', arch) | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook'), |     os.path.join(SM.mms_root, 'core', 'sourcehook'), | ||||||
| ] |   ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| if builder.target.platform == 'linux': |   if builder.target.platform == 'linux': | ||||||
|     if arch == 'x86': |     if arch == 'x86': | ||||||
|       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux', 'libpcre.a') |       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux', 'libpcre.a') | ||||||
|     elif arch == 'x64': |     elif arch == 'x64': | ||||||
|       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux64', 'libpcre.a') |       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux64', 'libpcre.a') | ||||||
| elif builder.target.platform == 'windows': |   elif builder.target.platform == 'windows': | ||||||
|     path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_win', 'pcre.lib') |     path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_win', 'pcre.lib') | ||||||
| elif builder.target.platform == 'mac': |   elif builder.target.platform == 'mac': | ||||||
|     if arch == 'x86': |     if arch == 'x86': | ||||||
|       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a') |       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a') | ||||||
|     elif arch == 'x64': |     elif arch == 'x64': | ||||||
|       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin64', 'libpcre.a') |       path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin64', 'libpcre.a') | ||||||
| binary.compiler.postlink += [binary.Dep(path)] |   binary.compiler.postlink += [binary.Dep(path)] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'CRegEx.cpp', |     'CRegEx.cpp', | ||||||
|     '../../public/smsdk_ext.cpp' |     '../../public/smsdk_ext.cpp' | ||||||
| ] |   ] | ||||||
|  | 
 | ||||||
|  |   SM.extensions += [builder.Add(binary)] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |  | ||||||
|  | |||||||
| @ -1,25 +1,26 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'dbi.sqlite.ext', arch) | for arch in SM.archs: | ||||||
| binary.compiler.cxxincludes += [ |   binary = SM.ExtLibrary(builder, 'dbi.sqlite.ext', arch) | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook'), |     os.path.join(SM.mms_root, 'core', 'sourcehook'), | ||||||
| ] |   ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| binary.compiler.defines += [ |   binary.compiler.defines += [ | ||||||
|     'SQLITE_OMIT_LOAD_EXTENSION', |     'SQLITE_OMIT_LOAD_EXTENSION', | ||||||
|     'SQLITE_THREADSAFE', |     'SQLITE_THREADSAFE', | ||||||
|     'SQLITE_USE_URI', |     'SQLITE_USE_URI', | ||||||
|     'SQLITE_ALLOW_URI_AUTHORITY', |     'SQLITE_ALLOW_URI_AUTHORITY', | ||||||
| ] |   ] | ||||||
| if builder.target.platform == 'linux': |   if builder.target.platform == 'linux': | ||||||
|     binary.compiler.postlink += ['-ldl', '-lpthread'] |     binary.compiler.postlink += ['-ldl', '-lpthread'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     '../../public/smsdk_ext.cpp', |     '../../public/smsdk_ext.cpp', | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'driver/SqDatabase.cpp', |     'driver/SqDatabase.cpp', | ||||||
| @ -27,6 +28,7 @@ binary.sources += [ | |||||||
|     'driver/SqQuery.cpp', |     'driver/SqQuery.cpp', | ||||||
|     'driver/SqResults.cpp', |     'driver/SqResults.cpp', | ||||||
|     'sqlite-source/sqlite3.c' |     'sqlite-source/sqlite3.c' | ||||||
| ] |   ] | ||||||
|  | 
 | ||||||
|  |   SM.extensions += [builder.Add(binary)] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |  | ||||||
|  | |||||||
| @ -1,21 +1,22 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'topmenus.ext', arch) | for arch in SM.archs: | ||||||
| binary.compiler.cxxincludes += [ |   binary = SM.ExtLibrary(builder, 'topmenus.ext', arch) | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook'), |     os.path.join(SM.mms_root, 'core', 'sourcehook'), | ||||||
| ] |   ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'smn_topmenus.cpp', |     'smn_topmenus.cpp', | ||||||
|     'TopMenu.cpp', |     'TopMenu.cpp', | ||||||
|     'TopMenuManager.cpp', |     'TopMenuManager.cpp', | ||||||
|     '../../public/smsdk_ext.cpp', |     '../../public/smsdk_ext.cpp', | ||||||
| ] |   ] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |   SM.extensions += [builder.Add(binary)] | ||||||
|  | |||||||
| @ -1,21 +1,23 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os | import os | ||||||
| 
 | 
 | ||||||
| binary = SM.ExtLibrary(builder, 'updater.ext', arch) | for arch in SM.archs: | ||||||
| binary.compiler.cxxincludes += [ |   binary = SM.ExtLibrary(builder, 'updater.ext', arch) | ||||||
|  |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core', 'sourcehook'), |     os.path.join(SM.mms_root, 'core', 'sourcehook'), | ||||||
| ] |   ] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| 
 | 
 | ||||||
| binary.sources += [ |   binary.sources += [ | ||||||
|     'extension.cpp', |     'extension.cpp', | ||||||
|     'MemoryDownloader.cpp', |     'MemoryDownloader.cpp', | ||||||
|     'Updater.cpp', |     'Updater.cpp', | ||||||
|     'md5.cpp', |     'md5.cpp', | ||||||
|     '../../public/smsdk_ext.cpp' |     '../../public/smsdk_ext.cpp' | ||||||
| ] |   ] | ||||||
|  | 
 | ||||||
|  |   SM.extensions += [builder.Add(binary)] | ||||||
| 
 | 
 | ||||||
| SM.extensions += [builder.Add(binary)] |  | ||||||
|  | |||||||
| @ -1,30 +1,31 @@ | |||||||
| # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: | ||||||
| import os.path | import os.path | ||||||
| 
 | 
 | ||||||
| if builder.target.platform in ['windows', 'mac']: | for arch in SM.archs: | ||||||
|  |   if builder.target.platform in ['windows', 'mac']: | ||||||
|     name = 'sourcemod_mm' |     name = 'sourcemod_mm' | ||||||
|     extra_ldflags = [] |     extra_ldflags = [] | ||||||
| elif builder.target.platform == 'linux': |   elif builder.target.platform == 'linux': | ||||||
|     name = 'sourcemod_mm_i486' |     name = 'sourcemod_mm_i486' | ||||||
|     extra_ldflags = ['-ldl'] |     extra_ldflags = ['-ldl'] | ||||||
| 
 | 
 | ||||||
| if arch == 'x64': |   if arch == 'x64': | ||||||
|     name = 'sourcemod_mm.x64' |     name = 'sourcemod_mm.x64' | ||||||
| 
 | 
 | ||||||
| binary = SM.Library(builder, name, arch) |   binary = SM.Library(builder, name, arch) | ||||||
| binary.compiler.cxxincludes += [ |   binary.compiler.cxxincludes += [ | ||||||
|     os.path.join(SM.mms_root, 'core'), |     os.path.join(SM.mms_root, 'core'), | ||||||
|     os.path.join(SM.mms_root, 'sourcehook') |     os.path.join(SM.mms_root, 'sourcehook') | ||||||
| ] |   ] | ||||||
| binary.compiler.defines += ['META_NO_HL2SDK'] |   binary.compiler.defines += ['META_NO_HL2SDK'] | ||||||
| if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': |   if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang': | ||||||
|     binary.compiler.cxxflags += ['-fno-rtti'] |     binary.compiler.cxxflags += ['-fno-rtti'] | ||||||
| elif binary.compiler.family == 'msvc': |   elif binary.compiler.family == 'msvc': | ||||||
|     binary.compiler.cxxflags += ['/GR-'] |     binary.compiler.cxxflags += ['/GR-'] | ||||||
| binary.compiler.linkflags += extra_ldflags |   binary.compiler.linkflags += extra_ldflags | ||||||
| binary.sources = [ |   binary.sources = [ | ||||||
|     'loader.cpp' |     'loader.cpp' | ||||||
| ] |   ] | ||||||
| 
 | 
 | ||||||
| nodes = builder.Add(binary) |   nodes = builder.Add(binary) | ||||||
| SM.binaries += [nodes] |   SM.binaries += [nodes] | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user