Arquivos
chromium/third_party/sqlite/sqlite.gyp
T
sgk@google.com 0cde7e2694 Basic underpinnings of the gyp equivalent of the Linux SHARED=1 build:
parameterize the 'type' setting of the various library targets, with a
default of 'static_library'.
(Hat tip to Craig Schlenter.)
Review URL: http://codereview.chromium.org/62127

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13345 0039d316-1c4b-4281-b951-d872f2087c98
2009-04-08 12:55:49 +00:00

221 linhas
6.3 KiB
Python

# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'use_system_sqlite%': 0,
},
'includes': [
'../../build/common.gypi',
],
'target_defaults': {
'defines': [
'SQLITE_ENABLE_FTS2',
'SQLITE_ENABLE_BROKEN_FTS2',
'SQLITE_ENABLE_ICU',
'SQLITE_SECURE_DELETE',
'THREADSAFE',
'_HAS_EXCEPTIONS=0',
],
},
'targets': [
{
'target_name': 'sqlite',
'conditions': [
['OS=="linux" and use_system_sqlite', {
'type': 'settings',
'direct_dependent_settings': {
'cflags': [
'<!@(python ../../build/linux/pkg_config_wrapper.py --cflags sqlite)',
],
},
'link_settings': {
'libraries': [
'<!@(python ../../build/linux/pkg_config_wrapper.py --libs sqlite)',
],
},
}, { # else: OS != "linux" or ! use_system_sqlite
'product_name': 'sqlite3',
'type': '<(library)',
'msvs_guid': '6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9',
'sources': [
# This list contains all .h, .c, and .cc files in the directories
# ext, preprocessed, and src, with the exception of src/shell* and
# src/test*. Exclusions are applied below in the sources/ and
# sources! sections.
'ext/fts1/ft_hash.c',
'ext/fts1/ft_hash.h',
'ext/fts1/fts1.c',
'ext/fts1/fts1.h',
'ext/fts1/fts1_hash.c',
'ext/fts1/fts1_hash.h',
'ext/fts1/fts1_porter.c',
'ext/fts1/fts1_tokenizer.h',
'ext/fts1/fts1_tokenizer1.c',
'ext/fts1/fulltext.c',
'ext/fts1/fulltext.h',
'ext/fts1/simple_tokenizer.c',
'ext/fts1/tokenizer.h',
'ext/fts2/fts2.c',
'ext/fts2/fts2.h',
'ext/fts2/fts2_hash.c',
'ext/fts2/fts2_hash.h',
'ext/fts2/fts2_icu.c',
'ext/fts2/fts2_porter.c',
'ext/fts2/fts2_tokenizer.c',
'ext/fts2/fts2_tokenizer.h',
'ext/fts2/fts2_tokenizer1.c',
'ext/fts3/fts3.c',
'ext/fts3/fts3.h',
'ext/fts3/fts3_hash.c',
'ext/fts3/fts3_hash.h',
'ext/fts3/fts3_icu.c',
'ext/fts3/fts3_porter.c',
'ext/fts3/fts3_tokenizer.c',
'ext/fts3/fts3_tokenizer.h',
'ext/fts3/fts3_tokenizer1.c',
'ext/icu/icu.c',
'ext/rtree/rtree.c',
'ext/rtree/rtree.h',
'preprocessed/keywordhash.h',
'preprocessed/opcodes.c',
'preprocessed/opcodes.h',
'preprocessed/parse.c',
'preprocessed/parse.h',
'preprocessed/sqlite3.h',
'src/alter.c',
'src/analyze.c',
'src/attach.c',
'src/auth.c',
'src/bitvec.c',
'src/btmutex.c',
'src/btree.c',
'src/btree.h',
'src/btreeInt.h',
'src/build.c',
'src/callback.c',
'src/complete.c',
'src/date.c',
'src/delete.c',
'src/expr.c',
'src/fault.c',
'src/func.c',
'src/global.c',
'src/hash.c',
'src/hash.h',
'src/hwtime.h',
'src/insert.c',
'src/journal.c',
'src/legacy.c',
'src/loadext.c',
'src/main.c',
'src/malloc.c',
'src/md5.c',
'src/mem1.c',
'src/mem2.c',
'src/mem3.c',
'src/mem4.c',
'src/mem5.c',
'src/mem6.c',
'src/mutex.c',
'src/mutex.h',
'src/mutex_os2.c',
'src/mutex_unix.c',
'src/mutex_w32.c',
'src/os.c',
'src/os.h',
'src/os_common.h',
'src/os_os2.c',
'src/os_symbian.cc',
'src/os_unix.c',
'src/os_win.c',
'src/pager.c',
'src/pager.h',
'src/pragma.c',
'src/prepare.c',
'src/printf.c',
'src/random.c',
'src/select.c',
'src/sqlite3ext.h',
'src/sqliteInt.h',
'src/sqliteLimit.h',
'src/status.c',
'src/table.c',
'src/tclsqlite.c',
'src/tokenize.c',
'src/trigger.c',
'src/update.c',
'src/utf.c',
'src/util.c',
'src/vacuum.c',
'src/vdbe.c',
'src/vdbe.h',
'src/vdbeInt.h',
'src/vdbeapi.c',
'src/vdbeaux.c',
'src/vdbeblob.c',
'src/vdbefifo.c',
'src/vdbemem.c',
'src/vtab.c',
'src/where.c',
],
'sources/': [
['exclude', '^ext/(fts[13]|rtree)/'],
['exclude', '(symbian|os2)\\.cc?$'],
],
'sources!': [
'src/journal.c',
'src/md5.c',
'src/tclsqlite.c',
],
'include_dirs': [
'preprocessed',
'src',
],
'dependencies': [
'../icu38/icu38.gyp:icui18n',
'../icu38/icu38.gyp:icuuc',
],
'direct_dependent_settings': {
'include_dirs': [
'preprocessed',
],
},
'conditions': [
['OS=="win"', {
'sources/': [['exclude', '_unix\\.cc?$']],
}, { # else: OS!="win"
'sources/': [['exclude', '_(w32|win)\\.cc?$']],
}],
],
}],
],
},
],
'conditions': [
['OS=="linux" and not use_system_sqlite', {
'targets': [
{
'target_name': 'sqlite_shell',
'type': 'executable',
'dependencies': [
'../icu38/icu38.gyp:icuuc',
'sqlite',
],
'sources': [
'src/shell.c',
'src/shell_icu_linux.c',
],
'link_settings': {
'link_languages': ['c++'],
'libraries': [
'-ldl',
],
},
},
],
},]
],
}