2014-02-08 09:14:15 +00:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
binary = AMXX.MetaModule(builder, 'sqlite')
|
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(builder.currentSourcePath, 'sqlitepp'),
|
|
|
|
os.path.join(builder.currentSourcePath, 'thread'),
|
2014-02-09 00:09:29 +00:00
|
|
|
os.path.join(builder.currentSourcePath, 'sqlite-source'),
|
2014-02-08 09:14:15 +00:00
|
|
|
]
|
|
|
|
binary.compiler.defines += [
|
|
|
|
'SM_DEFAULT_THREADER',
|
2014-08-10 15:24:38 +00:00
|
|
|
'HAVE_STDINT_H',
|
2014-02-08 09:14:15 +00:00
|
|
|
]
|
|
|
|
|
2015-01-06 22:27:51 +00:00
|
|
|
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
2014-12-06 12:59:13 +00:00
|
|
|
binary.compiler.defines += ['stricmp=strcasecmp']
|
2014-02-08 09:14:15 +00:00
|
|
|
binary.compiler.postlink += ['-lpthread']
|
|
|
|
|
2014-02-09 00:09:29 +00:00
|
|
|
binary.sources += [
|
2014-02-08 09:14:15 +00:00
|
|
|
'basic_sql.cpp',
|
|
|
|
'handles.cpp',
|
|
|
|
'module.cpp',
|
|
|
|
'threading.cpp',
|
2014-08-10 15:24:38 +00:00
|
|
|
'../../public/sdk/amxxmodule.cpp',
|
2014-02-08 09:14:15 +00:00
|
|
|
'oldcompat_sql.cpp',
|
|
|
|
'thread/BaseWorker.cpp',
|
|
|
|
'thread/ThreadWorker.cpp',
|
|
|
|
'sqlitepp/SqliteQuery.cpp',
|
|
|
|
'sqlitepp/SqliteResultSet.cpp',
|
|
|
|
'sqlitepp/SqliteDatabase.cpp',
|
|
|
|
'sqlitepp/SqliteDriver.cpp',
|
|
|
|
'sqlite-source/alter.c',
|
|
|
|
'sqlite-source/analyze.c',
|
|
|
|
'sqlite-source/attach.c',
|
|
|
|
'sqlite-source/auth.c',
|
|
|
|
'sqlite-source/btree.c',
|
|
|
|
'sqlite-source/build.c',
|
|
|
|
'sqlite-source/callback.c',
|
|
|
|
'sqlite-source/complete.c',
|
|
|
|
'sqlite-source/date.c',
|
|
|
|
'sqlite-source/delete.c',
|
|
|
|
'sqlite-source/expr.c',
|
|
|
|
'sqlite-source/func.c',
|
|
|
|
'sqlite-source/hash.c',
|
|
|
|
'sqlite-source/insert.c',
|
|
|
|
'sqlite-source/legacy.c',
|
|
|
|
'sqlite-source/loadext.c',
|
|
|
|
'sqlite-source/main.c',
|
|
|
|
'sqlite-source/opcodes.c',
|
|
|
|
'sqlite-source/os.c',
|
|
|
|
'sqlite-source/pager.c',
|
|
|
|
'sqlite-source/parse.c',
|
|
|
|
'sqlite-source/pragma.c',
|
|
|
|
'sqlite-source/prepare.c',
|
|
|
|
'sqlite-source/printf.c',
|
|
|
|
'sqlite-source/random.c',
|
|
|
|
'sqlite-source/select.c',
|
|
|
|
'sqlite-source/table.c',
|
|
|
|
'sqlite-source/tokenize.c',
|
|
|
|
'sqlite-source/trigger.c',
|
|
|
|
'sqlite-source/update.c',
|
|
|
|
'sqlite-source/utf.c',
|
|
|
|
'sqlite-source/util.c',
|
|
|
|
'sqlite-source/vacuum.c',
|
|
|
|
'sqlite-source/vdbe.c',
|
|
|
|
'sqlite-source/vdbeapi.c',
|
|
|
|
'sqlite-source/vdbeaux.c',
|
|
|
|
'sqlite-source/vdbefifo.c',
|
|
|
|
'sqlite-source/vdbemem.c',
|
|
|
|
'sqlite-source/vtab.c',
|
|
|
|
'sqlite-source/where.c',
|
|
|
|
]
|
|
|
|
|
2014-02-09 00:09:29 +00:00
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.sources += [
|
|
|
|
'thread/WinThreads.cpp',
|
|
|
|
'sqlite-source/os_win.c',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
binary.sources += [
|
|
|
|
'thread/PosixThreads.cpp',
|
|
|
|
'sqlite-source/os_unix.c',
|
|
|
|
]
|
|
|
|
|
2014-12-08 00:44:27 +00:00
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.sources += ['version.rc']
|
2014-02-09 00:09:29 +00:00
|
|
|
|
2014-02-08 09:14:15 +00:00
|
|
|
AMXX.modules += [builder.Add(binary)]
|