forked from accelerator74/Cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AMBuilder
35 lines (27 loc) · 1.07 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
import os.path
import typing
if typing.TYPE_CHECKING:
from ambuild2.frontend.v2_2.context import BuildContext
builder: BuildContext
projectName = 'cleaner'
project = build_info.HL2Project(builder, projectName + '.ext')
project.sources += [
'extension.cpp',
os.path.join(build_info.sm_root, 'public', 'smsdk_ext.cpp'),
os.path.join(build_info.sm_root, 'public', 'CDetour', 'detours.cpp'),
os.path.join(build_info.sm_root, 'public', 'asm', 'asm.c'),
]
# sm1.10+
libudis_folder = os.path.join(build_info.sm_root, 'public', 'libudis86')
if os.path.isdir(libudis_folder):
project.sources += [
os.path.join(libudis_folder, 'decode.c'),
os.path.join(libudis_folder, 'itab.c'),
os.path.join(libudis_folder, 'syn-att.c'),
os.path.join(libudis_folder, 'syn-intel.c'),
os.path.join(libudis_folder, 'syn.c'),
os.path.join(libudis_folder, 'udis86.c'),
]
for sdk in build_info.sdks.values():
build_info.HL2Config(project, projectName + '.ext.2.' + sdk.short_name, sdk)
build_info.extensions += builder.Add(project)