2013-11-18 18:46:46 +01:00
|
|
|
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
2010-05-14 07:34:36 +02:00
|
|
|
import os.path
|
|
|
|
|
2020-08-19 22:34:12 +02:00
|
|
|
def configure_library(cxx, name, linux_defines):
|
2017-12-20 08:11:57 +01:00
|
|
|
libname = name
|
2020-08-19 22:34:12 +02:00
|
|
|
binary = MMS.Library(cxx, libname)
|
2013-11-18 18:46:46 +01:00
|
|
|
binary.compiler.cxxincludes += [os.path.join(builder.sourcePath, 'core', 'sourcehook')]
|
|
|
|
binary.sources += [
|
|
|
|
'loader.cpp',
|
|
|
|
'gamedll.cpp',
|
|
|
|
'serverplugin.cpp',
|
|
|
|
'utility.cpp',
|
|
|
|
]
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2020-08-19 22:34:12 +02:00
|
|
|
if binary.compiler.target.platform == 'linux':
|
2013-11-18 18:46:46 +01:00
|
|
|
binary.compiler.defines += linux_defines
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
nodes = builder.Add(binary)
|
|
|
|
MMS.binaries += [nodes]
|
2010-05-14 07:34:36 +02:00
|
|
|
|
2020-08-19 22:34:12 +02:00
|
|
|
for cxx in MMS.all_targets:
|
|
|
|
if cxx.target.platform == 'linux':
|
2023-09-29 04:42:30 +02:00
|
|
|
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"'])
|
2023-09-29 04:42:30 +02:00
|
|
|
configure_library(cxx, 'server', ['LIB_PREFIX=""', 'LIB_SUFFIX=".so"'])
|
|
|
|
else:
|
|
|
|
configure_library(cxx, 'server', [])
|