2013-11-18 09:46:46 -08:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
2010-05-14 00:34:36 -05:00
|
|
|
import os
|
|
|
|
|
2013-11-18 09:46:46 -08:00
|
|
|
for sdk_name in MMS.sdks:
|
2020-08-19 13:34:12 -07:00
|
|
|
for cxx in MMS.all_targets:
|
2017-12-20 01:11:57 -06:00
|
|
|
sdk = MMS.sdks[sdk_name]
|
2010-05-14 00:34:36 -05:00
|
|
|
|
2020-08-19 13:34:12 -07:00
|
|
|
if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]:
|
2017-12-20 01:11:57 -06:00
|
|
|
continue
|
2010-05-14 00:34:36 -05:00
|
|
|
|
2017-12-20 01:11:57 -06:00
|
|
|
name = 'metamod.' + sdk.ext
|
2020-08-19 13:34:12 -07:00
|
|
|
binary = MMS.HL2Library(builder, cxx, name, sdk)
|
2016-07-22 13:59:58 -04:00
|
|
|
|
2017-12-20 01:11:57 -06:00
|
|
|
binary.sources += [
|
|
|
|
'metamod.cpp',
|
|
|
|
'metamod_console.cpp',
|
|
|
|
'metamod_oslink.cpp',
|
|
|
|
'metamod_plugins.cpp',
|
|
|
|
'metamod_util.cpp',
|
|
|
|
'provider/console.cpp',
|
2023-03-31 23:32:21 -04:00
|
|
|
'provider/provider_base.cpp',
|
2017-12-20 01:11:57 -06:00
|
|
|
'sourcehook/sourcehook.cpp',
|
|
|
|
'sourcehook/sourcehook_impl_chookidman.cpp',
|
|
|
|
'sourcehook/sourcehook_impl_chookmaninfo.cpp',
|
|
|
|
'sourcehook/sourcehook_impl_cproto.cpp',
|
|
|
|
'sourcehook/sourcehook_impl_cvfnptr.cpp',
|
|
|
|
'gamedll_bridge.cpp',
|
|
|
|
'vsp_bridge.cpp'
|
|
|
|
]
|
|
|
|
|
2023-04-01 00:19:34 -04:00
|
|
|
if sdk_name in ['dota', 'cs2']:
|
2023-04-01 00:02:45 -04:00
|
|
|
binary.sources += ['provider/source2/provider_source2.cpp']
|
|
|
|
else:
|
|
|
|
binary.sources += ['provider/source/provider_source.cpp']
|
|
|
|
|
2017-12-20 01:11:57 -06:00
|
|
|
# Source2 hack. TODO: check this more deterministically, "are we doing an x64 build?"
|
2020-08-19 13:34:12 -07:00
|
|
|
if binary.compiler.target.arch == 'x86':
|
2017-12-20 01:11:57 -06:00
|
|
|
binary.sources += ['sourcehook/sourcehook_hookmangen.cpp']
|
|
|
|
nodes = builder.Add(binary)
|
|
|
|
MMS.binaries += [nodes]
|