feat: github ci (#1)
This commit is contained in:
@@ -1,30 +1,45 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os, sys
|
||||
import os
|
||||
|
||||
projectName = 'socket'
|
||||
|
||||
# smsdk_ext.cpp will be automatically added later
|
||||
sourceFiles = [
|
||||
'Extension.cpp',
|
||||
'Callback.cpp',
|
||||
'CallbackHandler.cpp',
|
||||
'Socket.cpp',
|
||||
'SocketHandler.cpp',
|
||||
]
|
||||
for cxx in builder.targets:
|
||||
binary = SM.ExtLibrary(builder, cxx, projectName + ".ext")
|
||||
|
||||
###############
|
||||
# Make sure to edit PackageScript, which copies your files to their appropriate locations
|
||||
# Simple extensions do not need to modify past this point.
|
||||
binary.compiler.defines += [
|
||||
'HAVE_STRING_H',
|
||||
]
|
||||
|
||||
project = Extension.Library(builder, projectName + '.ext')
|
||||
if cxx.target.platform == 'linux':
|
||||
cxx.postlink += ['-lpthread', '-lrt']
|
||||
elif cxx.target.platform == 'mac':
|
||||
cxx.cflags += ['-Wno-deprecated-declarations']
|
||||
cxx.postlink += ['-framework', 'CoreServices']
|
||||
|
||||
if os.path.isfile(os.path.join(builder.currentSourcePath, 'sdk', 'smsdk_ext.cpp')):
|
||||
# Use the copy included in the project
|
||||
project.sources += [os.path.join('sdk', 'smsdk_ext.cpp')]
|
||||
else:
|
||||
# Use the copy included with SM 1.6 and newer
|
||||
project.sources += [os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')]
|
||||
if cxx.family == 'gcc' or cxx.family == 'clang':
|
||||
cxx.cxxflags += ['-fno-rtti']
|
||||
elif cxx.family == 'msvc':
|
||||
cxx.cxxflags += ['/GR-']
|
||||
|
||||
project.sources += sourceFiles
|
||||
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'),
|
||||
]
|
||||
|
||||
Extension.extensions = [builder.Add(project)]
|
||||
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)]
|
||||
|
||||
Reference in New Issue
Block a user