|
1 # |
|
2 # This Source Code Form is subject to the terms of the Mozilla Public |
|
3 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 |
|
6 LIB_IS_C_ONLY = 1 |
|
7 |
|
8 ifeq ($(OS_ARCH),WINNT) |
|
9 DEFFILE = $(CURDIR)/sqlite-processed.def |
|
10 |
|
11 GARBAGE += \ |
|
12 sqlite-version.h \ |
|
13 $(DEFFILE) \ |
|
14 $(NULL) |
|
15 |
|
16 # We generate the appropriate version header file with our python script. |
|
17 sqlite-version.h: sqlite-version.py sqlite3.h |
|
18 $(PYTHON) $^ > $@ |
|
19 |
|
20 # We have to preprocess our def file because we need different symbols in debug |
|
21 # builds exposed that are not built in non-debug builds. |
|
22 $(DEFFILE): sqlite.def |
|
23 @$(call py_action,preprocessor,$(DEFINES) \ |
|
24 $(srcdir)/sqlite.def -o $(DEFFILE)) |
|
25 |
|
26 export:: sqlite-version.h |
|
27 endif |
|
28 |
|
29 ifeq (Darwin,$(OS_TARGET)) |
|
30 # On OSX, with jemalloc enabled, having sqlite linked against mozglue |
|
31 # causes crashes in NSS standalone tools. |
|
32 MOZ_GLUE_LDFLAGS = |
|
33 endif |
|
34 |
|
35 # XXX Force -O2 optimisation on Mac because using the default -O3 causes |
|
36 # crashes. See bug 676499. |
|
37 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) |
|
38 MODULE_OPTIMIZE_FLAGS = -O2 |
|
39 endif |
|
40 |
|
41 # Force /O2 optimisation on Windows because using the default /O1 causes |
|
42 # crashes with MSVC2005 and PGO. See bug 719584. |
|
43 ifeq ($(OS_ARCH),WINNT) |
|
44 MODULE_OPTIMIZE_FLAGS = -O2 |
|
45 endif |
|
46 |
|
47 include $(topsrcdir)/config/rules.mk |