summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--gyp/certificates.gypi3
-rw-r--r--gyp/common.gypi3
-rw-r--r--gyp/fixtures.gypi3
-rw-r--r--gyp/install.gypi23
-rw-r--r--gyp/mbgl-headless.gypi15
-rw-r--r--gyp/mbgl-ios.gypi (renamed from gyp/platform-ios.gypi)6
-rw-r--r--gyp/mbgl-linux.gypi (renamed from gyp/platform-linux.gypi)6
-rw-r--r--gyp/mbgl-osx.gypi (renamed from gyp/platform-osx.gypi)6
-rw-r--r--gyp/mbgl-platform.gypi16
-rw-r--r--gyp/mbgl.gypi (renamed from gyp/library.gypi)5
-rw-r--r--gyp/npm_install.gypi3
-rw-r--r--gyp/platform.gypi16
m---------ios/mapbox-gl-cocoa0
-rw-r--r--linux/mapboxgl-app.gyp4
-rw-r--r--macosx/mapboxgl-app.gyp4
-rw-r--r--mapboxgl.gyp6
-rw-r--r--test/test.gyp20
18 files changed, 96 insertions, 52 deletions
diff --git a/Makefile b/Makefile
index 6ff6103052..2431f7be73 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
BUILDTYPE ?= Release
PYTHON ?= python
V ?= 1
+PREFIX ?= /usr/local
ifeq ($(shell uname -s), Darwin)
PLATFORM ?= osx
@@ -19,7 +20,11 @@ config-ios.gypi: configure
# Builds the regular library
mbgl: config.gypi mapboxgl.gyp
deps/run_gyp mapboxgl.gyp -Iconfig.gypi -Dplatform=$(PLATFORM) --depth=. -Goutput_dir=.. --generator-output=./build/mbgl -f make
- $(MAKE) -C build/mbgl BUILDTYPE=$(BUILDTYPE) V=$(V) mapboxgl
+ $(MAKE) -C build/mbgl BUILDTYPE=$(BUILDTYPE) V=$(V) mbgl
+
+install: config.gypi mapboxgl.gyp
+ deps/run_gyp mapboxgl.gyp -Iconfig.gypi -Dplatform=$(PLATFORM) -Dinstall_prefix=$(PREFIX) --depth=. -Goutput_dir=.. --generator-output=./build/mbgl -f make
+ $(MAKE) -C build/mbgl BUILDTYPE=$(BUILDTYPE) V=$(V) install
##### Test cases ###############################################################
@@ -104,5 +109,5 @@ clean: clear_xcode_cache
distclean: clean
-rm -rf ./mason_packages
-.PHONY: mbgl test linux clear_xcode_cache build/test/Makefile clean distclean
+.PHONY: mbgl install test linux clear_xcode_cache build/test/Makefile clean distclean
# DO NOT DELETE
diff --git a/gyp/certificates.gypi b/gyp/certificates.gypi
index 6a358f0dbf..1d0c2acf86 100644
--- a/gyp/certificates.gypi
+++ b/gyp/certificates.gypi
@@ -1,7 +1,6 @@
{
'targets': [
- {
- 'target_name': 'copy_certificate_bundle',
+ { 'target_name': 'copy_certificate_bundle',
'type': 'none',
'hard_dependency': 1,
'copies': [{
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 89a82fbdb9..6d6b0e6671 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -1,4 +1,7 @@
{
+ 'variables': {
+ 'install_prefix%': '',
+ },
'target_defaults': {
'default_configuration': 'Release',
'conditions': [
diff --git a/gyp/fixtures.gypi b/gyp/fixtures.gypi
index f290da5d53..199865a6f3 100644
--- a/gyp/fixtures.gypi
+++ b/gyp/fixtures.gypi
@@ -1,7 +1,6 @@
{
'targets': [
- {
- 'target_name': 'copy_fixtures',
+ { 'target_name': 'copy_fixtures',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
diff --git a/gyp/install.gypi b/gyp/install.gypi
new file mode 100644
index 0000000000..8b79a45180
--- /dev/null
+++ b/gyp/install.gypi
@@ -0,0 +1,23 @@
+{
+ 'conditions': [
+ ['install_prefix != ""', {
+ 'targets': [
+ { 'target_name': 'install',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'mbgl',
+ 'mbgl-headless',
+ 'mbgl-<(platform)',
+ ],
+ 'copies': [
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl.a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl-headless.a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '<(PRODUCT_DIR)/libmbgl-<(platform).a' ], 'destination': '<(install_prefix)/lib' },
+ { 'files': [ '../include/mbgl' ], 'destination': '<(install_prefix)/include' }
+ ],
+ },
+ ]
+ }],
+ ],
+}
diff --git a/gyp/mbgl-headless.gypi b/gyp/mbgl-headless.gypi
new file mode 100644
index 0000000000..5ffc251d22
--- /dev/null
+++ b/gyp/mbgl-headless.gypi
@@ -0,0 +1,15 @@
+{
+ 'targets': [
+ { 'target_name': 'mbgl-headless',
+ 'product_name': 'mbgl-headless',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../include',
+ ],
+ 'sources': [
+ '../platform/default/headless_view.cpp',
+ '../platform/default/headless_display.cpp',
+ ],
+ },
+ ]
+} \ No newline at end of file
diff --git a/gyp/platform-ios.gypi b/gyp/mbgl-ios.gypi
index d070744925..e6fa50bd5a 100644
--- a/gyp/platform-ios.gypi
+++ b/gyp/mbgl-ios.gypi
@@ -18,10 +18,10 @@
],
},
'targets': [
- {
- 'target_name': 'mapboxgl-ios',
- 'product_name': 'mapboxgl-ios',
+ { 'target_name': 'mbgl-ios',
+ 'product_name': 'mbgl-ios',
'type': 'static_library',
+ 'hard_dependency': 1,
'include_dirs': [
'../include',
],
diff --git a/gyp/platform-linux.gypi b/gyp/mbgl-linux.gypi
index 9126652a7e..39a1755569 100644
--- a/gyp/platform-linux.gypi
+++ b/gyp/mbgl-linux.gypi
@@ -1,9 +1,9 @@
{
'targets': [
- {
- 'target_name': 'mapboxgl-linux',
- 'product_name': 'mapboxgl-linux',
+ { 'target_name': 'mbgl-linux',
+ 'product_name': 'mbgl-linux',
'type': 'static_library',
+ 'hard_dependency': 1,
'include_dirs': [
'../include'
],
diff --git a/gyp/platform-osx.gypi b/gyp/mbgl-osx.gypi
index adc0d3232c..ba117e5a59 100644
--- a/gyp/platform-osx.gypi
+++ b/gyp/mbgl-osx.gypi
@@ -1,9 +1,9 @@
{
'targets': [
- {
- 'target_name': 'mapboxgl-osx',
- 'product_name': 'mapboxgl-osx',
+ { 'target_name': 'mbgl-osx',
+ 'product_name': 'mbgl-osx',
'type': 'static_library',
+ 'hard_dependency': 1,
'include_dirs': [
'../include',
],
diff --git a/gyp/mbgl-platform.gypi b/gyp/mbgl-platform.gypi
new file mode 100644
index 0000000000..74ac9aecc6
--- /dev/null
+++ b/gyp/mbgl-platform.gypi
@@ -0,0 +1,16 @@
+{
+ 'conditions': [
+ ['platform == "osx"', {
+ 'includes': ['mbgl-osx.gypi'],
+ 'variables': { 'platform_library': 'mbgl-osx' },
+ }],
+ ['platform == "ios"', {
+ 'includes': ['mbgl-ios.gypi'],
+ 'variables': { 'platform_library': 'mbgl-ios' },
+ }],
+ ['platform == "linux"', {
+ 'includes': ['mbgl-linux.gypi'],
+ 'variables': { 'platform_library': 'mbgl-linux' },
+ }],
+ ],
+}
diff --git a/gyp/library.gypi b/gyp/mbgl.gypi
index bb86432dac..f268fd6255 100644
--- a/gyp/library.gypi
+++ b/gyp/mbgl.gypi
@@ -1,8 +1,7 @@
{
'targets': [
- {
- 'target_name': 'mapboxgl',
- 'product_name': 'mapboxgl',
+ { 'target_name': 'mbgl',
+ 'product_name': 'mbgl',
'type': 'static_library',
'hard_dependency': 1,
'dependencies': [
diff --git a/gyp/npm_install.gypi b/gyp/npm_install.gypi
index 07d2e3e00e..ddd3081ad5 100644
--- a/gyp/npm_install.gypi
+++ b/gyp/npm_install.gypi
@@ -1,7 +1,6 @@
{
'targets': [
- {
- 'target_name': 'npm_install',
+ { 'target_name': 'npm_install',
'type': 'none',
'hard_dependency': 1,
'actions': [
diff --git a/gyp/platform.gypi b/gyp/platform.gypi
deleted file mode 100644
index 605f3d7127..0000000000
--- a/gyp/platform.gypi
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- 'conditions': [
- ['platform == "osx"', {
- 'includes': ['platform-osx.gypi'],
- 'variables': { 'platform_library': 'mapboxgl-osx' },
- }],
- ['platform == "ios"', {
- 'includes': ['platform-ios.gypi'],
- 'variables': { 'platform_library': 'mapboxgl-ios' },
- }],
- ['platform == "linux"', {
- 'includes': ['platform-linux.gypi'],
- 'variables': { 'platform_library': 'mapboxgl-linux' },
- }],
- ],
-}
diff --git a/ios/mapbox-gl-cocoa b/ios/mapbox-gl-cocoa
-Subproject 3f9579ad3a002433fee2df9b1a88869a5712417
+Subproject 2d8fa07ab7dc1ff93728e656bac4a82da423e8b
diff --git a/linux/mapboxgl-app.gyp b/linux/mapboxgl-app.gyp
index e4dacd9af3..ee38b4b266 100644
--- a/linux/mapboxgl-app.gyp
+++ b/linux/mapboxgl-app.gyp
@@ -44,8 +44,8 @@
}],
],
'dependencies': [
- '../mapboxgl.gyp:mapboxgl',
- '../mapboxgl.gyp:mapboxgl-linux',
+ '../mapboxgl.gyp:mbgl',
+ '../mapboxgl.gyp:mbgl-linux',
'../mapboxgl.gyp:copy_styles',
'../mapboxgl.gyp:copy_certificate_bundle',
],
diff --git a/macosx/mapboxgl-app.gyp b/macosx/mapboxgl-app.gyp
index dc65c37567..fe8d9f7ae1 100644
--- a/macosx/mapboxgl-app.gyp
+++ b/macosx/mapboxgl-app.gyp
@@ -37,8 +37,8 @@
},
'dependencies': [
'../mapboxgl.gyp:bundle_styles',
- '../mapboxgl.gyp:mapboxgl',
- '../mapboxgl.gyp:mapboxgl-osx',
+ '../mapboxgl.gyp:mbgl',
+ '../mapboxgl.gyp:mbgl-osx',
]
}
]
diff --git a/mapboxgl.gyp b/mapboxgl.gyp
index 8b805ae6d7..9126a1a626 100644
--- a/mapboxgl.gyp
+++ b/mapboxgl.gyp
@@ -6,7 +6,9 @@
'./gyp/styles.gypi',
'./gyp/fixtures.gypi',
'./gyp/certificates.gypi',
- './gyp/library.gypi',
- './gyp/platform.gypi',
+ './gyp/mbgl.gypi',
+ './gyp/mbgl-platform.gypi',
+ './gyp/mbgl-headless.gypi',
+ './gyp/install.gypi',
],
}
diff --git a/test/test.gyp b/test/test.gyp
index 04287bd9a8..daf74b3e99 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -1,7 +1,7 @@
{
'includes': [
'../gyp/common.gypi',
- '../gyp/platform.gypi',
+ '../gyp/mbgl-platform.gypi',
],
'targets': [
{ 'target_name': 'rotation_range',
@@ -13,7 +13,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'clip_ids',
@@ -25,7 +25,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'enums',
@@ -37,7 +37,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'style_parser',
@@ -51,7 +51,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
'../mapboxgl.gyp:copy_fixtures',
]
},
@@ -64,7 +64,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'comparisons',
@@ -76,7 +76,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'tile',
@@ -88,7 +88,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'functions',
@@ -100,7 +100,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
]
},
{ 'target_name': 'headless',
@@ -130,7 +130,7 @@
],
'dependencies': [
'../deps/gtest/gtest.gyp:gtest',
- '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mbgl',
'<(platform_library)',
],
},