[core] Merge SQLiteCache into the platform library
OfflineFileSource will depend on SQLite too.
This commit is contained in:
6
Makefile
6
Makefile
@@ -96,16 +96,16 @@ apackage: android-lib-mips
|
||||
|
||||
# Builds the Node.js library
|
||||
.PHONY: node
|
||||
node: ; $(RUN) HTTP=none ASSET=none CACHE=none Makefile/node
|
||||
node: ; $(RUN) HTTP=none ASSET=none Makefile/node
|
||||
|
||||
|
||||
.PHONY: Xcode/node
|
||||
Xcode/node: ; $(RUN) HTTP=none ASSET=none CACHE=none Xcode/node
|
||||
Xcode/node: ; $(RUN) HTTP=none ASSET=none Xcode/node
|
||||
|
||||
.PHONY: xnode
|
||||
xnode: Xcode/node ; @open ./build/binding.xcodeproj
|
||||
nproj:
|
||||
$(RUN) HTTP=none ASSET=none CACHE=none node/xproj
|
||||
$(RUN) HTTP=none ASSET=none node/xproj
|
||||
@open ./build/binding.xcodeproj
|
||||
|
||||
.PHONY: test
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
'mbgl.gyp:headless-<(headless_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
'mbgl.gyp:copy_certificate_bundle',
|
||||
],
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
{
|
||||
'targets': [
|
||||
{ 'target_name': 'cache-sqlite',
|
||||
'product_name': 'mbgl-cache-sqlite',
|
||||
'type': 'static_library',
|
||||
'standalone_static_library': 1,
|
||||
'hard_dependency': 1,
|
||||
|
||||
'sources': [
|
||||
'../platform/default/sqlite_cache.cpp',
|
||||
'../platform/default/sqlite3.hpp',
|
||||
'../platform/default/sqlite3.cpp',
|
||||
],
|
||||
|
||||
'include_dirs': [
|
||||
'../include',
|
||||
'../src',
|
||||
],
|
||||
|
||||
'variables': {
|
||||
'cflags_cc': [
|
||||
'<@(sqlite_cflags)',
|
||||
],
|
||||
'ldflags': [
|
||||
'<@(sqlite_ldflags)',
|
||||
'<@(zlib_ldflags)',
|
||||
],
|
||||
'libraries': [
|
||||
'<@(sqlite_static_libs)',
|
||||
'<@(zlib_static_libs)',
|
||||
],
|
||||
},
|
||||
|
||||
'conditions': [
|
||||
['OS == "mac"', {
|
||||
'xcode_settings': {
|
||||
'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
|
||||
},
|
||||
}, {
|
||||
'cflags_cc': [ '<@(cflags_cc)' ],
|
||||
}],
|
||||
],
|
||||
|
||||
'link_settings': {
|
||||
'conditions': [
|
||||
['OS == "mac"', {
|
||||
'libraries': [ '<@(libraries)' ],
|
||||
'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] }
|
||||
}, {
|
||||
'libraries': [ '<@(libraries)', '<@(ldflags)' ],
|
||||
}]
|
||||
],
|
||||
},
|
||||
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [ '../include' ],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -8,7 +8,6 @@
|
||||
'platform-<(platform_lib)',
|
||||
'http-<(http_lib)',
|
||||
'asset-<(asset_lib)',
|
||||
'cache-<(cache_lib)',
|
||||
'headless-<(headless_lib)',
|
||||
'standalone',
|
||||
],
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
['http_lib == "android" and host == "android"', { 'includes': [ 'http-android.gypi' ] } ],
|
||||
['asset_lib == "fs"', { 'includes': [ 'asset-fs.gypi' ] } ],
|
||||
['asset_lib == "zip"', { 'includes': [ 'asset-zip.gypi' ] } ],
|
||||
['cache_lib == "sqlite"', { 'includes': [ 'cache-sqlite.gypi' ] } ],
|
||||
|
||||
['install_prefix != ""', { 'includes': ['install.gypi' ] } ],
|
||||
],
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
'../platform/default/timer.cpp',
|
||||
'../platform/default/default_file_source.cpp',
|
||||
'../platform/default/online_file_source.cpp',
|
||||
'../platform/default/sqlite_cache.cpp',
|
||||
'../platform/default/sqlite3.hpp',
|
||||
'../platform/default/sqlite3.cpp',
|
||||
],
|
||||
|
||||
'variables': {
|
||||
@@ -32,18 +35,23 @@
|
||||
'<@(nunicode_cflags)',
|
||||
'<@(boost_cflags)',
|
||||
'<@(variant_cflags)',
|
||||
'<@(sqlite_cflags)',
|
||||
],
|
||||
'ldflags': [
|
||||
'<@(libpng_ldflags)',
|
||||
'<@(jpeg_ldflags)',
|
||||
'<@(libuv_ldflags)',
|
||||
'<@(nunicode_ldflags)',
|
||||
'<@(sqlite_ldflags)',
|
||||
'<@(zlib_ldflags)',
|
||||
],
|
||||
'libraries': [
|
||||
'<@(libpng_static_libs)',
|
||||
'<@(jpeg_static_libs)',
|
||||
'<@(libuv_static_libs)',
|
||||
'<@(nunicode_static_libs)',
|
||||
'<@(sqlite_static_libs)',
|
||||
'<@(zlib_static_libs)',
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
'../platform/default/timer.cpp',
|
||||
'../platform/default/default_file_source.cpp',
|
||||
'../platform/default/online_file_source.cpp',
|
||||
'../platform/default/sqlite_cache.cpp',
|
||||
'../platform/default/sqlite3.hpp',
|
||||
'../platform/default/sqlite3.cpp',
|
||||
'../platform/darwin/log_nslog.mm',
|
||||
'../platform/darwin/string_nsstring.mm',
|
||||
'../platform/darwin/application_root.mm',
|
||||
@@ -85,9 +88,13 @@
|
||||
'<@(libuv_cflags)',
|
||||
'<@(boost_cflags)',
|
||||
'<@(variant_cflags)',
|
||||
'<@(sqlite_cflags)',
|
||||
'<@(zlib_cflags)',
|
||||
],
|
||||
'libraries': [
|
||||
'<@(libuv_static_libs)',
|
||||
'<@(sqlite_static_libs)',
|
||||
'<@(zlib_static_libs)',
|
||||
],
|
||||
'ldflags': [
|
||||
'-framework CoreLocation',
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
'../platform/default/timer.cpp',
|
||||
'../platform/default/default_file_source.cpp',
|
||||
'../platform/default/online_file_source.cpp',
|
||||
'../platform/default/sqlite_cache.cpp',
|
||||
'../platform/default/sqlite3.hpp',
|
||||
'../platform/default/sqlite3.cpp',
|
||||
],
|
||||
|
||||
'variables': {
|
||||
@@ -32,18 +35,23 @@
|
||||
'<@(libuv_cflags)',
|
||||
'<@(nunicode_cflags)',
|
||||
'<@(boost_cflags)',
|
||||
'<@(sqlite_cflags)',
|
||||
],
|
||||
'ldflags': [
|
||||
'<@(libpng_ldflags)',
|
||||
'<@(jpeg_ldflags)',
|
||||
'<@(libuv_ldflags)',
|
||||
'<@(nunicode_ldflags)',
|
||||
'<@(sqlite_ldflags)',
|
||||
'<@(zlib_ldflags)',
|
||||
],
|
||||
'libraries': [
|
||||
'<@(libpng_static_libs)',
|
||||
'<@(jpeg_static_libs)',
|
||||
'<@(libuv_static_libs)',
|
||||
'<@(nunicode_static_libs)',
|
||||
'<@(sqlite_static_libs)',
|
||||
'<@(zlib_static_libs)',
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
'../platform/default/timer.cpp',
|
||||
'../platform/default/default_file_source.cpp',
|
||||
'../platform/default/online_file_source.cpp',
|
||||
'../platform/default/sqlite_cache.cpp',
|
||||
'../platform/default/sqlite3.hpp',
|
||||
'../platform/default/sqlite3.cpp',
|
||||
'../platform/darwin/log_nslog.mm',
|
||||
'../platform/darwin/string_nsstring.mm',
|
||||
'../platform/darwin/application_root.mm',
|
||||
@@ -59,9 +62,16 @@
|
||||
'<@(libuv_cflags)',
|
||||
'<@(boost_cflags)',
|
||||
'<@(variant_cflags)',
|
||||
'<@(sqlite_cflags)',
|
||||
'<@(zlib_cflags)',
|
||||
],
|
||||
'ldflags': [
|
||||
'<@(zlib_ldflags)',
|
||||
],
|
||||
'libraries': [
|
||||
'<@(libuv_static_libs)',
|
||||
'<@(sqlite_static_libs)',
|
||||
'<@(zlib_static_libs)',
|
||||
'$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/CoreLocation.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
|
||||
@@ -85,6 +95,9 @@
|
||||
|
||||
'link_settings': {
|
||||
'libraries': [ '<@(libraries)' ],
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [ '<@(ldflags)' ],
|
||||
},
|
||||
},
|
||||
|
||||
'direct_dependent_settings': {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
'platform-<(platform_lib)',
|
||||
'http-<(http_lib)',
|
||||
'asset-<(asset_lib)',
|
||||
'cache-<(cache_lib)',
|
||||
'headless-<(headless_lib)',
|
||||
],
|
||||
},
|
||||
@@ -24,7 +23,6 @@
|
||||
'platform-<(platform_lib)',
|
||||
'http-<(http_lib)',
|
||||
'asset-<(asset_lib)',
|
||||
'cache-<(cache_lib)',
|
||||
'headless-<(headless_lib)',
|
||||
],
|
||||
},
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
'mbgl.gyp:platform-<(platform_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
],
|
||||
|
||||
'sources': [
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
'mbgl.gyp:platform-<(platform_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
],
|
||||
|
||||
'sources': [
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
'mbgl.gyp:platform-<(platform_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
],
|
||||
|
||||
'include_dirs': [
|
||||
|
||||
@@ -2,7 +2,6 @@ HEADLESS ?= none
|
||||
PLATFORM ?= android
|
||||
ASSET ?= zip
|
||||
HTTP ?= android
|
||||
CACHE ?= sqlite
|
||||
|
||||
GYP_FLAVOR_SUFFIX=-android
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ HEADLESS = none
|
||||
PLATFORM ?= ios
|
||||
ASSET ?= fs
|
||||
HTTP ?= nsurl
|
||||
CACHE ?= sqlite
|
||||
|
||||
HOST_VERSION = all
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
|
||||
|
||||
|
||||
step "Building static library..."
|
||||
LIBS=(core.a platform-ios.a asset-fs.a cache-sqlite.a http-nsurl.a)
|
||||
LIBS=(core.a platform-ios.a asset-fs.a http-nsurl.a)
|
||||
if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
|
||||
libtool -static -no_warning_for_no_symbols \
|
||||
`find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` \
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
'mbgl.gyp:platform-<(platform_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
'mbgl.gyp:copy_certificate_bundle',
|
||||
],
|
||||
|
||||
|
||||
@@ -2,4 +2,3 @@ HEADLESS ?= glx
|
||||
PLATFORM ?= linux
|
||||
ASSET ?= fs
|
||||
HTTP ?= curl
|
||||
CACHE ?= sqlite
|
||||
|
||||
@@ -2,4 +2,3 @@ HEADLESS ?= cgl
|
||||
PLATFORM ?= osx
|
||||
ASSET ?= fs
|
||||
HTTP ?= nsurl
|
||||
CACHE ?= sqlite
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
'mbgl.gyp:platform-<(platform_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
],
|
||||
|
||||
'xcode_settings': {
|
||||
|
||||
@@ -75,7 +75,6 @@ GYP_FLAGS += -Iconfig/$(HOST_SLUG).gypi
|
||||
GYP_FLAGS += -Dplatform_lib=$(PLATFORM)
|
||||
GYP_FLAGS += -Dhttp_lib=$(HTTP)
|
||||
GYP_FLAGS += -Dasset_lib=$(ASSET)
|
||||
GYP_FLAGS += -Dcache_lib=$(CACHE)
|
||||
GYP_FLAGS += -Dheadless_lib=$(HEADLESS)
|
||||
GYP_FLAGS += -Dtest=$(BUILD_TEST)
|
||||
GYP_FLAGS += -Drender=$(BUILD_RENDER)
|
||||
@@ -177,7 +176,7 @@ print-env: $(SUBMODULES)
|
||||
@printf "platform=$(COLOR_CYAN)%s$(FORMAT_END) " $(PLATFORM)
|
||||
@printf "asset=$(COLOR_CYAN)%s$(FORMAT_END) " $(ASSET)
|
||||
@printf "http=$(COLOR_CYAN)%s$(FORMAT_END) " $(HTTP)
|
||||
@printf "cache=$(COLOR_CYAN)%s$(FORMAT_END)\n" $(CACHE)
|
||||
@printf "\n"
|
||||
|
||||
# Never remove intermediate files
|
||||
.SECONDARY:
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
'mbgl.gyp:platform-<(platform_lib)',
|
||||
'mbgl.gyp:http-<(http_lib)',
|
||||
'mbgl.gyp:asset-<(asset_lib)',
|
||||
'mbgl.gyp:cache-<(cache_lib)',
|
||||
'mbgl.gyp:headless-<(headless_lib)',
|
||||
],
|
||||
'sources': [
|
||||
|
||||
Reference in New Issue
Block a user