Bug 306907 - Build libsqlite as a standard name separate shared library. Patch by Michael Wu <michael.wu@mozilla.com>, Robert Relyea <rrelyea@redhat.com>, Ryan VanderMeulen <ryanvm@gmail.com>, and Shawn Wilsher <me@shawnwilsher.com>. r=benjamin

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-07-18 09:20:12 -07:00
parent a5b168b6fe
commit bef3969f5f
7 changed files with 27 additions and 13 deletions

View File

@ -105,6 +105,10 @@ ifdef MOZ_ENABLE_PANGO
STATIC_EXTRA_LIBS += $(MOZ_PANGO_LIBS)
endif
ifdef MOZ_STORAGE
EXTRA_DSO_LIBS += sqlite3
endif
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
STATIC_EXTRA_LIBS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
endif

View File

@ -608,6 +608,8 @@ SIOUX.h
size_t.h
someincludefile.h
Sound.h
sqlite3.h
sqlite3file.h
ssdef.h
sslerr.h
ssl.h

View File

@ -45,9 +45,16 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = sqlite3
LIBRARY_NAME = sqlite3_s
MODULE_NAME = sqlite3
FORCE_STATIC_LIB = 1
LIBRARY_NAME = sqlite3
FORCE_SHARED_LIB = 1
VISIBILITY_FLAGS =
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
ifndef GNU_CC
MAPFILE = $(LIBRARY_NAME).map
DEFFILE = $(win_srcdir)/sqlite.def
endif
endif
ifdef GNU_CC
MODULE_OPTIMIZE_FLAGS = -O3
@ -77,15 +84,7 @@ DEFINES += -DOS2_HIGH_MEMORY
endif
endif
ifdef ENABLE_TESTS
##LIBS = $(DIST)/lib/$(LIB_PREFIX)sqlite3_s.$(LIB_SUFFIX)
##SIMPLE_PROGRAMS = sqlite-shell
endif
include $(topsrcdir)/config/rules.mk
sqlite-shell.$(OBJ_SUFFIX): shell.c
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
# next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others
LOCAL_INCLUDES += -I$(srcdir)

View File

@ -200,7 +200,11 @@ struct sqlite3OsVtbl {
/*
** Files other than os.c just reference the global virtual function table.
*/
#ifdef XP_WIN
extern __declspec(dllimport) struct sqlite3OsVtbl sqlite3Os;
#else
extern struct sqlite3OsVtbl sqlite3Os;
#endif // windows symbol ifdef
#endif /* _SQLITE_OS_C_ */
} // extern "C"

View File

@ -21,6 +21,7 @@
#
# Contributor(s):
# Vladimir Vukicevic <vladimir.vukicevic@oracle.com>
# Shawn Wilsher <me@shawnwilsher.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -69,9 +70,10 @@ LOCAL_INCLUDES = \
SHARED_LIBRARY_LIBS = \
../src/$(LIB_PREFIX)storage_s.$(LIB_SUFFIX) \
$(DEPTH)/db/sqlite3/src/$(LIB_PREFIX)sqlite3_s.$(LIB_SUFFIX) \
$(NULL)
EXTRA_DSO_LIBS += sqlite3
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \

View File

@ -21,6 +21,7 @@
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Shawn Wilsher <me@shawnwilsher.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
@ -206,6 +207,7 @@ endif
ifdef MOZ_STORAGE
COMPONENT_LIBS += storagecomps
EXTRA_DSO_LIBS += sqlite3
endif
ifdef MOZ_PLACES

View File

@ -95,6 +95,7 @@ DEPENDENT_LIBS_LIST += \
$(LIB_PREFIX)nss3$(DLL_SUFFIX) \
$(LIB_PREFIX)ssl3$(DLL_SUFFIX) \
$(LIB_PREFIX)smime3$(DLL_SUFFIX) \
$(LIB_PREFIX)sqlite3$(DLL_SUFFIX) \
$(NULL)
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))