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

30 lines
949 B
Plaintext
Raw Normal View History

# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
import os.path
2020-08-19 22:34:12 +02:00
def configure_library(cxx, name, linux_defines):
libname = name
2020-08-19 22:34:12 +02:00
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',
]
2020-08-19 22:34:12 +02:00
if binary.compiler.target.platform == 'linux':
binary.compiler.defines += linux_defines
nodes = builder.Add(binary)
MMS.binaries += [nodes]
2020-08-19 22:34:12 +02:00
for cxx in MMS.all_targets:
if cxx.target.platform == 'linux':
if cxx.target.arch == 'x86_64':
2020-08-19 22:34:12 +02:00
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', [])