michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: LIB_IS_C_ONLY = 1 michael@0: michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: DEFFILE = $(CURDIR)/sqlite-processed.def michael@0: michael@0: GARBAGE += \ michael@0: sqlite-version.h \ michael@0: $(DEFFILE) \ michael@0: $(NULL) michael@0: michael@0: # We generate the appropriate version header file with our python script. michael@0: sqlite-version.h: sqlite-version.py sqlite3.h michael@0: $(PYTHON) $^ > $@ michael@0: michael@0: # We have to preprocess our def file because we need different symbols in debug michael@0: # builds exposed that are not built in non-debug builds. michael@0: $(DEFFILE): sqlite.def michael@0: @$(call py_action,preprocessor,$(DEFINES) \ michael@0: $(srcdir)/sqlite.def -o $(DEFFILE)) michael@0: michael@0: export:: sqlite-version.h michael@0: endif michael@0: michael@0: ifeq (Darwin,$(OS_TARGET)) michael@0: # On OSX, with jemalloc enabled, having sqlite linked against mozglue michael@0: # causes crashes in NSS standalone tools. michael@0: MOZ_GLUE_LDFLAGS = michael@0: endif michael@0: michael@0: # XXX Force -O2 optimisation on Mac because using the default -O3 causes michael@0: # crashes. See bug 676499. michael@0: ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) michael@0: MODULE_OPTIMIZE_FLAGS = -O2 michael@0: endif michael@0: michael@0: # Force /O2 optimisation on Windows because using the default /O1 causes michael@0: # crashes with MSVC2005 and PGO. See bug 719584. michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: MODULE_OPTIMIZE_FLAGS = -O2 michael@0: endif michael@0: michael@0: include $(topsrcdir)/config/rules.mk