2009-08-30 09:46:56 +02:00
|
|
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
|
|
|
import os
|
|
|
|
|
|
|
|
compiler = SM.DefaultExtCompiler('extensions/sqlite')
|
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
|
|
|
|
|
|
|
compiler['CDEFINES'].extend(['SQLITE_OMIT_LOAD_EXTENSION', 'SQLITE_THREADSAFE'])
|
|
|
|
if AMBuild.target['platform'] == 'linux':
|
|
|
|
compiler['POSTLINKFLAGS'].extend(['-ldl', '-lpthread'])
|
|
|
|
|
|
|
|
extension = AMBuild.AddJob('dbi.sqlite.ext')
|
|
|
|
binary = Cpp.LibraryBuilder('dbi.sqlite.ext', AMBuild, extension, compiler)
|
|
|
|
files = [
|
|
|
|
'sdk/smsdk_ext.cpp', 'sdk/sm_memtable.cpp', 'extension.cpp',
|
|
|
|
'driver/SqDatabase.cpp', 'driver/SqDriver.cpp', 'driver/SqQuery.cpp',
|
2012-08-03 22:10:28 +02:00
|
|
|
'driver/SqResults.cpp', 'sqlite-source/sqlite3.c'
|
2009-08-30 09:46:56 +02:00
|
|
|
]
|
|
|
|
binary.AddSourceFiles('extensions/sqlite', files)
|
|
|
|
SM.AutoVersion('extensions/sqlite', binary)
|
2013-03-17 22:00:28 +01:00
|
|
|
SM.ExtractDebugInfo(extension, binary)
|
2009-08-30 09:46:56 +02:00
|
|
|
binary.SendToJob()
|
2012-04-14 02:12:24 +02:00
|
|
|
|