2016-05-08 22:12:08 +02:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os
|
|
|
|
|
|
|
|
if not "SM" in globals():
|
2025-02-22 15:43:48 +01:00
|
|
|
SM = Extension
|
2016-05-08 22:12:08 +02:00
|
|
|
|
|
|
|
projectName = 'connect'
|
|
|
|
|
2025-02-22 15:43:48 +01:00
|
|
|
project = builder.LibraryProject(projectName)
|
2016-05-08 22:12:08 +02:00
|
|
|
project.sources += [
|
|
|
|
'extension.cpp',
|
2025-02-22 15:43:48 +01:00
|
|
|
os.path.join(SM.sm_root, 'public', 'smsdk_ext.cpp')
|
2016-05-08 22:12:08 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
for sdk_name in SM.sdks:
|
|
|
|
sdk = SM.sdks[sdk_name]
|
2025-02-22 15:43:48 +01:00
|
|
|
if sdk['name'] in ['mock']:
|
|
|
|
continue
|
2016-05-08 22:12:08 +02:00
|
|
|
|
2025-02-22 15:43:48 +01:00
|
|
|
for cxx in builder.targets:
|
|
|
|
cxx.defines += ['HAVE_STRING_H'];
|
|
|
|
if not cxx.target.arch in sdk['platforms'][cxx.target.platform]:
|
|
|
|
continue
|
|
|
|
|
|
|
|
binary = Extension.HL2ExtConfig(project, builder, cxx, projectName + '.ext.' + sdk['extension'], sdk)
|
|
|
|
|
|
|
|
SM.AddCDetour(binary)
|
|
|
|
|
|
|
|
binary.compiler.cxxflags += [
|
|
|
|
'-Wno-dangling-else',
|
|
|
|
'-Wno-unknown-pragmas',
|
|
|
|
'-Wno-unused-result',
|
|
|
|
'-Wno-sign-compare',
|
|
|
|
]
|
2016-05-08 22:12:08 +02:00
|
|
|
|
|
|
|
SM.extensions += builder.Add(project)
|