Files
MapLibreParticleLab/platform/android/platform.gyp
John Firebaugh f964e40e7e [build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp.
* Each platform gyp file defines appropriate loop_lib and headless_lib variables.
* Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms.
* CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`.
* Renamed the "linux" test app to "glfw". It's now built in OS X CI.
* Android build flakiness is fixed.
* iOS CI builds the bench and iosapp targets.
* Mesa version is now in one place.
* CI scripts use bash "strict mode" and correct error handling.
* All build output goes to the build directory.
* Removed vestigial iOS/OS X/Android Travis scripts.
2016-04-07 18:01:02 -07:00

152 lines
4.0 KiB
Python

{
'variables': {
'loop_lib': 'android',
'headless_lib': 'none',
},
'includes': [
'../../mbgl.gypi',
],
'targets': [
{
'target_name': 'platform-lib',
'product_name': 'mapbox-gl',
'type': 'shared_library',
'hard_dependency': 1,
'dependencies': [
'core',
],
'include_dirs': [
'../default',
'../../include',
'../../src', # TODO: eliminate
],
'sources': [
'src/native_map_view.cpp',
'src/jni.cpp',
'src/attach_env.cpp',
'src/log_android.cpp',
'src/http_request_android.cpp',
'src/asset_file_source.cpp',
'../default/thread.cpp',
'../default/string_stdlib.cpp',
'../default/image.cpp',
'../default/png_reader.cpp',
'../default/jpeg_reader.cpp',
'../default/default_file_source.cpp',
'../default/online_file_source.cpp',
'../default/mbgl/storage/offline.hpp',
'../default/mbgl/storage/offline.cpp',
'../default/mbgl/storage/offline_database.hpp',
'../default/mbgl/storage/offline_database.cpp',
'../default/mbgl/storage/offline_download.hpp',
'../default/mbgl/storage/offline_download.cpp',
'../default/sqlite3.hpp',
'../default/sqlite3.cpp',
],
'cflags_cc': [
'<@(boost_cflags)',
'<@(rapidjson_cflags)',
'<@(nunicode_cflags)',
'<@(sqlite_cflags)',
'<@(variant_cflags)',
'<@(jni.hpp_cflags)',
'<@(libzip_cflags)',
'<@(libpng_cflags)',
'<@(libjpeg-turbo_cflags)',
],
'link_settings': {
'libraries': [
'-llog',
'-landroid',
'-lEGL',
'-lGLESv2',
'-lstdc++',
'-latomic',
'<@(nunicode_ldflags)',
'<@(nunicode_static_libs)',
'<@(sqlite_ldflags)',
'<@(sqlite_static_libs)',
'<@(zlib_ldflags)',
'<@(zlib_static_libs)',
'<@(libzip_ldflags)',
'<@(libzip_static_libs)',
'<@(libpng_ldflags)',
'<@(libpng_static_libs)',
'<@(libjpeg-turbo_ldflags)',
'<@(libjpeg-turbo_static_libs)',
],
},
},
{
'target_name': 'example-custom-layer-lib',
'product_name': 'example-custom-layer',
'type': 'shared_library',
'hard_dependency': 1,
'sources': [
'./src/example_custom_layer.cpp',
],
'include_dirs': [
'../../include',
],
'link_settings': {
'libraries': [
'-llog',
'-landroid',
'-lEGL',
'-lGLESv2',
'-lstdc++',
'-latomic',
],
},
},
{
'target_name': 'all',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'platform-lib',
'example-custom-layer-lib',
],
'variables': {
'pwd': '<!(pwd)',
},
'copies': [
{
'files': [
'../../common/ca-bundle.crt',
'../default/resources/api_mapbox_com-digicert.der',
'../default/resources/api_mapbox_com-geotrust.der',
'../default/resources/star_tilestream_net.der',
],
'destination': '<(DEPTH)/platform/android/MapboxGLAndroidSDK/src/main/assets'
},
],
'actions': [
{
'action_name': 'Strip mapbox library',
'inputs': [ '<(PRODUCT_DIR)/lib.target/libmapbox-gl.so' ],
'outputs': [ '<(DEPTH)/platform/android/MapboxGLAndroidSDK/src/main/jniLibs/$(JNIDIR)/libmapbox-gl.so' ],
'action': [ '$(STRIP)', '<@(_inputs)', '-o', '<@(_outputs)' ]
},
{
'action_name': 'Strip example custom layer library',
'inputs': [ '<(PRODUCT_DIR)/lib.target/libexample-custom-layer.so' ],
'outputs': [ '<(DEPTH)/platform/android//MapboxGLAndroidSDKTestApp/src/main/jniLibs/$(JNIDIR)/libexample-custom-layer.so' ],
'action': [ '$(STRIP)', '<@(_inputs)', '-o', '<@(_outputs)' ]
}
],
},
],
}