forked from Jonathan-Lara-Hurtado/latino-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sconstruct.py
40 lines (22 loc) · 896 Bytes
/
Sconstruct.py
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
import platform
import os
sistema = platform.system()
ruta_Absoluta = GetLaunchDir()
ruta_include_latino = "C:\\Program Files\\Latino\\include"
ruta_librerias = "C:\\Program Files\\Latino\\bin"
ruta_regex = os.path.join( ruta_Absoluta,"latino-regex/src/")
ruta_sqlite = os.path.join(ruta_Absoluta,"sqlite/")
ruta_sqlite_construccion = os.path.join(ruta_Absoluta,"sqlite/build/")
CambioArquitectura = False
if CambioArquitectura:
arquitectura = 'x86_64'
else:
arquitectura = 'x86'
#Se crea el entorno scons
entorno = Environment(TARGET_ARCH=arquitectura)
entorno.Append(CPPPATH=[ruta_include_latino,ruta_regex,ruta_sqlite])
Export('entorno')
SConscript(['sqlite/Sconscript'])
entorno.Append(LIBPATH=[ruta_librerias,ruta_sqlite_construccion])
entorno.Append(LIBS = ['latino','sqlite'])
entorno.SharedLibrary(target = "build/latino-sqlite", source = "src/latino-sqlite.c")