1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-01 13:24:25 +01:00
HLMetaModOfficial/loader/AMBuilder

32 lines
941 B
Plaintext
Raw Normal View History

# vim: set ts=2 sw=2 tw=99 noet ft=python:
import os.path
compiler = MMS.DefaultCompiler()
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'core', 'sourcehook'))
compiler2 = compiler.Clone()
files = [
'loader.cpp',
'gamedll.cpp',
'serverplugin.cpp',
'utility.cpp'
]
name = 'server'
loader = AMBuild.AddJob(name)
binary = Cpp.LibraryBuilder(name, AMBuild, loader, compiler)
if AMBuild.target['platform'] == 'linux':
compiler['CDEFINES'].extend(['LIB_PREFIX=\"lib\"', 'LIB_SUFFIX=\".so\"'])
binary.AddSourceFiles('loader', files)
MMS.AutoVersion('loader', binary)
binary.SendToJob()
if AMBuild.target['platform'] == 'linux':
name = 'server_i486'
loader = AMBuild.AddJob(name)
binary = Cpp.LibraryBuilder(name, AMBuild, loader, compiler2)
compiler2['CDEFINES'].extend(['LIB_PREFIX=\"\"', 'LIB_SUFFIX=\"_i486.so\"'])
binary.AddSourceFiles('loader', files)
MMS.AutoVersion('loader', binary)
binary.SendToJob()