46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
import os
|
|
|
|
projectName = 'socket'
|
|
|
|
for cxx in builder.targets:
|
|
binary = SM.ExtLibrary(builder, cxx, projectName + ".ext")
|
|
|
|
binary.compiler.defines += [
|
|
'HAVE_STRING_H',
|
|
]
|
|
|
|
if cxx.target.platform == 'linux':
|
|
cxx.postlink += ['-lpthread', '-lrt']
|
|
elif cxx.target.platform == 'mac':
|
|
cxx.cflags += ['-Wno-deprecated-declarations']
|
|
cxx.postlink += ['-framework', 'CoreServices']
|
|
|
|
if cxx.family == 'gcc' or cxx.family == 'clang':
|
|
cxx.cxxflags += ['-fno-rtti']
|
|
elif cxx.family == 'msvc':
|
|
cxx.cxxflags += ['/GR-']
|
|
|
|
binary.compiler.postlink += [
|
|
os.path.join(SM.libboost_root, 'build', 'lib', 'libboost_thread.a'),
|
|
os.path.join(SM.libboost_root, 'build', 'lib', 'libboost_system.a'),
|
|
]
|
|
|
|
binary.sources += [
|
|
'Extension.cpp',
|
|
'Socket.cpp',
|
|
'SocketHandler.cpp',
|
|
'Callback.cpp',
|
|
'CallbackHandler.cpp',
|
|
os.path.join(SM.sm_root, 'public', 'smsdk_ext.cpp'),
|
|
os.path.join(SM.sm_root, 'public', 'asm', 'asm.c'),
|
|
os.path.join(SM.sm_root, 'public', 'libudis86', 'decode.c'),
|
|
os.path.join(SM.sm_root, 'public', 'libudis86', 'itab.c'),
|
|
os.path.join(SM.sm_root, 'public', 'libudis86', 'syn-att.c'),
|
|
os.path.join(SM.sm_root, 'public', 'libudis86', 'syn-intel.c'),
|
|
os.path.join(SM.sm_root, 'public', 'libudis86', 'syn.c'),
|
|
os.path.join(SM.sm_root, 'public', 'libudis86', 'udis86.c'),
|
|
]
|
|
|
|
SM.extensions += [builder.Add(binary)]
|