1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-29 11:24:19 +01:00
HLMetaModOfficial/loader/AMBuilder
GAMMACASE 62dd3dd4fa
Fix Source2 linux packaging layout (#120)
* Fix linux packaging layout
* Split binary layouts per sdk
2023-09-28 19:42:30 -07:00

30 lines
949 B
Python

# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
import os.path
def configure_library(cxx, name, linux_defines):
libname = name
binary = MMS.Library(cxx, libname)
binary.compiler.cxxincludes += [os.path.join(builder.sourcePath, 'core', 'sourcehook')]
binary.sources += [
'loader.cpp',
'gamedll.cpp',
'serverplugin.cpp',
'utility.cpp',
]
if binary.compiler.target.platform == 'linux':
binary.compiler.defines += linux_defines
nodes = builder.Add(binary)
MMS.binaries += [nodes]
for cxx in MMS.all_targets:
if cxx.target.platform == 'linux':
if cxx.target.arch == 'x86_64':
configure_library(cxx, 'libserver', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'])
elif cxx.target.arch == 'x86':
configure_library(cxx, 'server_i486', ['LIB_PREFIX=""', 'LIB_SUFFIX="_i486.so"'])
configure_library(cxx, 'server', ['LIB_PREFIX=""', 'LIB_SUFFIX=".so"'])
else:
configure_library(cxx, 'server', [])