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-16 21:23:30 +00:00
Родитель 888713a706
Коммит 6853438bb1
7 изменённых файлов: 184 добавлений и 13 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

159
db/sqlite3/src/sqlite.def Normal file
Просмотреть файл

@ -0,0 +1,159 @@
; ***** BEGIN LICENSE BLOCK *****
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
;
; The contents of this file are subject to the Mozilla Public License Version
; 1.1 (the "License"); you may not use this file except in compliance with
; the License. You may obtain a copy of the License at
; http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
; for the specific language governing rights and limitations under the
; License.
;
; The Initial Developer of this code is Robert Relyea <rrelyea@redhat.com>
;
; Portions created by the Initial Developer are Copyright (C) 2007
; the Initial Developer. All Rights Reserved.
;
; Contributor(s): Shawn Wilsher <me@shawnwilsher.com>
; Ryan VanderMeulen <ryanvm@gmail.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"),
; or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
; in which case the provisions of the GPL or the LGPL are applicable instead
; of those above. If you wish to allow use of your version of this file only
; under the terms of either the GPL or the LGPL, and not to allow others to
; use your version of this file under the terms of the MPL, indicate your
; decision by deleting the provisions above and replace them with the notice
; and other provisions required by the GPL or the LGPL. If you do not delete
; the provisions above, a recipient may use your version of this file under
; the terms of any one of the MPL, the GPL or the LGPL.
;
; ***** END LICENSE BLOCK *****
LIBRARY sqlite3.dll
EXPORTS sqlite3_aggregate_context
sqlite3_aggregate_count
sqlite3_apis
sqlite3_auto_extension
sqlite3_bind_blob
sqlite3_bind_double
sqlite3_bind_int
sqlite3_bind_int64
sqlite3_bind_null
sqlite3_bind_parameter_count
sqlite3_bind_parameter_index
sqlite3_bind_parameter_name
sqlite3_bind_text
sqlite3_bind_text16
sqlite3_bind_value
sqlite3_busy_handler
sqlite3_busy_timeout
sqlite3_changes
sqlite3_clear_bindings
sqlite3_close
sqlite3_collation_needed
sqlite3_collation_needed16
sqlite3_column_blob
sqlite3_column_bytes
sqlite3_column_bytes16
sqlite3_column_count
sqlite3_column_decltype
sqlite3_column_decltype16
sqlite3_column_double
sqlite3_column_int
sqlite3_column_int64
sqlite3_column_name
sqlite3_column_name16
sqlite3_column_text
sqlite3_column_text16
sqlite3_column_type
sqlite3_column_value
sqlite3_commit_hook
sqlite3_complete
sqlite3_complete16
sqlite3_create_collation
sqlite3_create_collation16
sqlite3_create_function
sqlite3_create_function16
sqlite3_create_module
sqlite3_data_count
sqlite3_db_handle
sqlite3_declare_vtab
sqlite3_enable_load_extension
sqlite3_enable_shared_cache
sqlite3_errcode
sqlite3_errmsg
sqlite3_errmsg16
sqlite3_exec
sqlite3_expired
sqlite3_extended_result_codes
sqlite3_finalize
sqlite3_free
sqlite3_free_table
sqlite3_get_autocommit
sqlite3_get_auxdata
sqlite3_get_table
sqlite3_global_recover
sqlite3_interrupt
sqlite3_last_insert_rowid
sqlite3_libversion
sqlite3_libversion_number
sqlite3_load_extension
sqlite3_malloc
sqlite3_mprintf
sqlite3_open
sqlite3_open16
sqlite3_overload_function
sqlite3_prepare
sqlite3_prepare16
sqlite3_prepare16_v2
sqlite3_prepare_v2
sqlite3_profile
sqlite3_progress_handler
sqlite3_realloc
sqlite3_reset
sqlite3_reset_auto_extension
sqlite3_result_blob
sqlite3_result_double
sqlite3_result_error
sqlite3_result_error16
sqlite3_result_int
sqlite3_result_int64
sqlite3_result_null
sqlite3_result_text
sqlite3_result_text16
sqlite3_result_text16be
sqlite3_result_text16le
sqlite3_result_value
sqlite3_rollback_hook
sqlite3_set_authorizer
sqlite3_set_auxdata
sqlite3_sleep
sqlite3_snprintf
sqlite3_step
sqlite3_thread_cleanup
sqlite3_total_changes
sqlite3_trace
sqlite3_transfer_bindings
sqlite3_update_hook
sqlite3_user_data
sqlite3_value_blob
sqlite3_value_bytes
sqlite3_value_bytes16
sqlite3_value_double
sqlite3_value_int
sqlite3_value_int64
sqlite3_value_numeric_type
sqlite3_value_text
sqlite3_value_text16
sqlite3_value_text16be
sqlite3_value_text16le
sqlite3_value_type
sqlite3_version
sqlite3_vmprintf
sqlite3ApiExit ;needed by mozStorage
sqlite3Os DATA ;needed by mozStorage

Просмотреть файл

@ -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"

Просмотреть файл

@ -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) \

Просмотреть файл

@ -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"),
@ -201,6 +202,7 @@ endif
ifdef MOZ_STORAGE
COMPONENT_LIBS += storagecomps
EXTRA_DSO_LIBS += sqlite3
endif
ifdef MOZ_PLACES

Просмотреть файл

@ -93,6 +93,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)))