forked from srcdslab/sm-ext-socket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AMBuilder
45 lines (37 loc) · 1.42 KB
/
AMBuilder
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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)]