extensions/sqlite/AMBuilder
author Nicholas Hastings <skamonkey@gmail.com>
Mon Mar 18 11:47:55 2013 -0400 (2013-03-18)
changeset 3846 dc3ed0c7422c
parent 3835 ac5919d50903
child 4182 8ef93b2feddf
permissions -rw-r--r--
Fixed errors with SendConVarValue on CS:GO (bug 5638, r=asherkin).
     1 # vim: set ts=2 sw=2 tw=99 noet ft=python: 
     2 import os
     3 
     4 compiler = SM.DefaultExtCompiler('extensions/sqlite')
     5 compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
     6 
     7 compiler['CDEFINES'].extend(['SQLITE_OMIT_LOAD_EXTENSION', 'SQLITE_THREADSAFE'])
     8 if AMBuild.target['platform'] == 'linux':
     9 	compiler['POSTLINKFLAGS'].extend(['-ldl', '-lpthread'])
    10 
    11 extension = AMBuild.AddJob('dbi.sqlite.ext')
    12 binary = Cpp.LibraryBuilder('dbi.sqlite.ext', AMBuild, extension, compiler)
    13 files = [
    14 	'sdk/smsdk_ext.cpp', 'sdk/sm_memtable.cpp', 'extension.cpp',
    15 	'driver/SqDatabase.cpp', 'driver/SqDriver.cpp', 'driver/SqQuery.cpp',
    16 	'driver/SqResults.cpp', 'sqlite-source/sqlite3.c'
    17 	]
    18 binary.AddSourceFiles('extensions/sqlite', files)
    19 SM.AutoVersion('extensions/sqlite', binary)
    20 SM.ExtractDebugInfo(extension, binary)
    21 binary.SendToJob()
    22