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
|
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
def configure_library(name, linux_defines):
|
|
|
|
binary = MMS.Library(builder, name)
|
|
|
|
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
|
|
|
|
2016-07-24 03:39:12 +02:00
|
|
|
if builder.target.platform == 'linux':
|
2013-11-18 18:46:46 +01:00
|
|
|
binary.compiler.defines += linux_defines
|
2016-07-22 20:01:34 +02:00
|
|
|
# Temporary Source2 hack. Always build linux with -m64
|
|
|
|
binary.compiler.cflags.remove('-m32')
|
|
|
|
binary.compiler.cflags += ['-m64', '-fPIC']
|
|
|
|
binary.compiler.linkflags.remove('-m32')
|
|
|
|
binary.compiler.linkflags += ['-m64']
|
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
|
|
|
|
2013-11-18 18:46:46 +01:00
|
|
|
configure_library('server', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'])
|
2016-07-24 03:39:12 +02:00
|
|
|
if builder.target.platform == 'linux':
|
2013-11-18 18:46:46 +01:00
|
|
|
configure_library('server_i486', ['LIB_PREFIX=""', 'LIB_SUFFIX="_i486.so"'])
|