1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-26 19:54:14 +01:00
David Anderson b31f504fe3
Switch to a manifest-based build model. (#132)
Rather than hardcode a bunch of SDK stuff, this is an attempt to move
SDK information to a declarative model. Each SDK gets a manifest, and
the manifests are stored in a shared repository.

Manifests encode stuff like "what platforms does this SDK build on" and
"what link flags do I need on each architecture".

This will hopefully reduce the complexity of the build scripts, since
going forward we only have to add new manifests, rather than figure out
how to attach more gunk into the build logic.
2023-10-10 22:23:38 -07:00

30 lines
915 B
Python

# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os
for sdk, cxx in MMS.sdk_targets:
name = 'metamod.' + sdk['extension']
binary = MMS.HL2Library(builder, cxx, name, sdk)
binary.sources += [
'metamod.cpp',
'metamod_console.cpp',
'metamod_oslink.cpp',
'metamod_plugins.cpp',
'metamod_util.cpp',
'provider/console.cpp',
'provider/provider_ep2.cpp',
'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'
]
# Source2 hack. TODO: check this more deterministically, "are we doing an x64 build?"
if binary.compiler.target.arch == 'x86':
binary.sources += ['sourcehook/sourcehook_hookmangen.cpp']
nodes = builder.Add(binary)
MMS.binaries += [nodes]