OLD | NEW |
| (Empty) |
1 # Copyright (c) 2008 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # Ripped and modded from chrome. | |
6 | |
7 Import('env') | |
8 | |
9 env = env.Clone( | |
10 ) | |
11 | |
12 env.Replace( | |
13 SQLITE_DIR = '$THIRD_PARTY_DIR/sqlite_google', | |
14 CPPPATH = [ | |
15 # from Chrome | |
16 # '$ICU38_DIR/public/common', | |
17 # '$ICU38_DIR/public/i18n', | |
18 | |
19 '$SQLITE_DIR/src', | |
20 '$SQLITE_DIR/preprocessed', | |
21 '$VC80_CPPPATH', | |
22 ], | |
23 ) | |
24 | |
25 env.Append( | |
26 # from Chrome | |
27 # CPPDEFINES = [ | |
28 # 'U_STATIC_IMPLEMENTATION', | |
29 # 'SQLITE_ENABLE_FTS2', | |
30 # 'SQLITE_ENABLE_BROKEN_FTS2', | |
31 # 'SQLITE_ENABLE_ICU', | |
32 # 'SQLITE_SECURE_DELETE', | |
33 # 'THREADSAFE', | |
34 # ['_HAS_EXCEPTIONS', '0'], | |
35 # ], | |
36 | |
37 CPPDEFINES = [ | |
38 'SQLITE_CORE', | |
39 'SQLITE_ENABLE_FTS1', | |
40 'SQLITE_ENABLE_BROKEN_FTS1', | |
41 'SQLITE_ENABLE_FTS2', | |
42 'SQLITE_ENABLE_BROKEN_FTS2', | |
43 'THREADSAFE=1', | |
44 'SQLITE_DEFAULT_FILE_PERMISSIONS=0600', | |
45 'SQLITE_OMIT_LOAD_EXTENSION=1', | |
46 'SQLITE_TRANSACTION_DEFAULT_IMMEDIATE=1', | |
47 'SQLITE_GEARS_DISABLE_SHELL_ICU', | |
48 ], | |
49 ) | |
50 | |
51 if env['OS'] in ['win32', 'wince']: | |
52 env.Append( | |
53 CPPFLAGS = [ | |
54 # from Chrome | |
55 '/TC', | |
56 '/wd4800', | |
57 '/wd4244', | |
58 | |
59 # from Gears | |
60 '/wd4018', | |
61 '/wd4146', | |
62 ], | |
63 ) | |
64 env.Append(CPPFLAGS = ['/wd4146']) | |
65 elif env['OS'] == 'linux': | |
66 env.Append( | |
67 CPPFLAGS = [ | |
68 '-Wno-uninitialized', | |
69 '-Wno-unused-value', | |
70 ], | |
71 CPPDEFINES = [ | |
72 'HAVE_USLEEP=1', | |
73 ], | |
74 ) | |
75 elif env['OS'] == 'osx': | |
76 env.Append( | |
77 CCFLAGS = [ | |
78 '-Wno-uninitialized', | |
79 '-Wno-pointer-sign', | |
80 ], | |
81 CPPDEFINES = [ | |
82 'HAVE_USLEEP=1', | |
83 ], | |
84 ) | |
85 | |
86 input_files = [ | |
87 '$SQLITE_DIR/src/alter.c', | |
88 '$SQLITE_DIR/src/analyze.c', | |
89 '$SQLITE_DIR/src/attach.c', | |
90 '$SQLITE_DIR/src/auth.c', | |
91 '$SQLITE_DIR/src/bitvec.c', | |
92 '$SQLITE_DIR/src/btree.c', | |
93 '$SQLITE_DIR/src/btmutex.c', | |
94 '$SQLITE_DIR/src/build.c', | |
95 '$SQLITE_DIR/src/callback.c', | |
96 '$SQLITE_DIR/src/complete.c', | |
97 '$SQLITE_DIR/src/date.c', | |
98 '$SQLITE_DIR/src/delete.c', | |
99 '$SQLITE_DIR/src/expr.c', | |
100 '$SQLITE_DIR/src/fault.c', | |
101 '$SQLITE_DIR/src/global.c', | |
102 '$SQLITE_DIR/src/journal.c', | |
103 '$SQLITE_DIR/ext/fts1/fts1.c', | |
104 '$SQLITE_DIR/ext/fts1/fts1_hash.c', | |
105 # '$SQLITE_DIR/ext/fts1/fts1_icu.c', | |
106 '$SQLITE_DIR/ext/fts1/fts1_porter.c', | |
107 # '$SQLITE_DIR/ext/fts1/fts1_tokenizer.c', | |
108 '$SQLITE_DIR/ext/fts1/fts1_tokenizer1.c', | |
109 '$SQLITE_DIR/ext/fts2/fts2.c', | |
110 '$SQLITE_DIR/ext/fts2/fts2_hash.c', | |
111 # '$SQLITE_DIR/ext/fts2/fts2_icu.c', | |
112 '$SQLITE_DIR/ext/fts2/fts2_porter.c', | |
113 '$SQLITE_DIR/ext/fts2/fts2_tokenizer.c', | |
114 '$SQLITE_DIR/ext/fts2/fts2_tokenizer1.c', | |
115 '$SQLITE_DIR/src/func.c', | |
116 '$SQLITE_DIR/src/hash.c', | |
117 '$SQLITE_DIR/src/insert.c', | |
118 '$SQLITE_DIR/src/legacy.c', | |
119 '$SQLITE_DIR/src/loadext.c', | |
120 '$SQLITE_DIR/src/main.c', | |
121 '$SQLITE_DIR/src/malloc.c', | |
122 '$SQLITE_DIR/src/mem1.c', | |
123 '$SQLITE_DIR/src/mem2.c', | |
124 '$SQLITE_DIR/src/mem3.c', | |
125 '$SQLITE_DIR/src/mem4.c', | |
126 '$SQLITE_DIR/src/mem5.c', | |
127 '$SQLITE_DIR/src/mem6.c', | |
128 '$SQLITE_DIR/src/sqlite_mutex.c', | |
129 '$SQLITE_DIR/src/mutex_os2.c', | |
130 '$SQLITE_DIR/src/mutex_unix.c', | |
131 '$SQLITE_DIR/src/mutex_w32.c', | |
132 '$SQLITE_DIR/preprocessed/opcodes.c', | |
133 '$SQLITE_DIR/src/os.c', | |
134 '$SQLITE_DIR/src/os_os2.c', | |
135 '$SQLITE_DIR/src/os_unix.c', | |
136 '$SQLITE_DIR/src/os_win.c', | |
137 '$SQLITE_DIR/src/pager.c', | |
138 '$SQLITE_DIR/preprocessed/parse.c', | |
139 '$SQLITE_DIR/src/pragma.c', | |
140 '$SQLITE_DIR/src/prepare.c', | |
141 '$SQLITE_DIR/src/printf.c', | |
142 '$SQLITE_DIR/src/random.c', | |
143 '$SQLITE_DIR/src/select.c', | |
144 '$SQLITE_DIR/src/status.c', | |
145 # '$SQLITE_DIR/src/shell.c', | |
146 '$SQLITE_DIR/src/table.c', | |
147 '$SQLITE_DIR/src/tokenize.c', | |
148 '$SQLITE_DIR/src/trigger.c', | |
149 '$SQLITE_DIR/src/update.c', | |
150 '$SQLITE_DIR/src/utf.c', | |
151 '$SQLITE_DIR/src/util.c', | |
152 '$SQLITE_DIR/src/vacuum.c', | |
153 '$SQLITE_DIR/src/vdbe.c', | |
154 '$SQLITE_DIR/src/vdbeapi.c', | |
155 '$SQLITE_DIR/src/vdbeaux.c', | |
156 '$SQLITE_DIR/src/vdbeblob.c', | |
157 '$SQLITE_DIR/src/vdbefifo.c', | |
158 '$SQLITE_DIR/src/vdbemem.c', | |
159 '$SQLITE_DIR/src/vtab.c', | |
160 '$SQLITE_DIR/src/where.c', | |
161 ] | |
162 | |
163 if env['OS'] == 'symbian': | |
164 input_files += ['os_symbian.cc'] | |
165 | |
166 env.GearsStaticLibrary('sqlite-gears', input_files) | |
OLD | NEW |