summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile28
-rw-r--r--README.md131
-rw-r--r--common.gypi2
-rwxr-xr-xconfigure8
-rw-r--r--gyp/certificates.gypi13
-rw-r--r--gyp/fixtures.gypi18
-rw-r--r--gyp/library.gypi75
-rw-r--r--gyp/npm_install.gypi21
-rw-r--r--gyp/platform-ios.gypi51
-rw-r--r--gyp/platform-linux.gypi53
-rw-r--r--gyp/platform-osx.gypi33
-rw-r--r--gyp/shaders.gypi36
-rw-r--r--gyp/styles.gypi36
-rw-r--r--include/mbgl/platform/darwin/log_nslog.hpp (renamed from common/nslog_log.hpp)0
-rw-r--r--include/mbgl/platform/darwin/reachability.h (renamed from common/Reachability.h)0
-rw-r--r--include/mbgl/platform/darwin/settings_nsuserdefaults.hpp (renamed from common/settings_nsuserdefaults.hpp)0
-rw-r--r--include/mbgl/platform/default/glfw_view.hpp (renamed from common/glfw_view.hpp)0
-rw-r--r--include/mbgl/platform/default/headless_view.hpp (renamed from common/headless_view.hpp)0
-rw-r--r--include/mbgl/platform/default/log_stderr.hpp (renamed from common/stderr_log.hpp)0
-rw-r--r--include/mbgl/platform/default/settings_json.hpp (renamed from common/settings_json.hpp)0
m---------ios/mapbox-gl-cocoa0
-rw-r--r--linux/main.cpp9
-rw-r--r--linux/mapboxgl-app.gyp21
-rw-r--r--macosx/main.mm11
-rw-r--r--macosx/mapboxgl-app.gyp18
-rw-r--r--mapboxgl.gyp254
-rw-r--r--platform/darwin/http_request_baton_cocoa.mm (renamed from common/http_request_baton_cocoa.mm)0
-rw-r--r--platform/darwin/log_nslog.mm (renamed from common/nslog_log.mm)2
-rw-r--r--platform/darwin/reachability.m (renamed from common/Reachability.m)2
-rw-r--r--platform/darwin/settings_nsuserdefaults.mm (renamed from common/settings_nsuserdefaults.mm)2
-rw-r--r--platform/darwin/string_nsstring.mm (renamed from common/platform_nsstring.mm)2
-rw-r--r--platform/default/cache_database_tmp.cpp (renamed from common/linux.cpp)0
-rw-r--r--platform/default/glfw_view.cpp (renamed from common/glfw_view.cpp)2
-rw-r--r--platform/default/headless_view.cpp (renamed from common/headless_view.cpp)0
-rw-r--r--platform/default/http_request_baton_curl.cpp (renamed from common/http_request_baton_curl.cpp)0
-rw-r--r--platform/default/log_stderr.cpp (renamed from common/stderr_log.cpp)2
-rw-r--r--platform/default/settings_json.cpp (renamed from common/settings_json.cpp)2
-rw-r--r--platform/default/string_stdlib.cpp (renamed from common/platform_default.cpp)0
-rw-r--r--platform/ios/cache_database_library.mm (renamed from common/ios.mm)0
-rw-r--r--platform/osx/cache_database_application_support.mm (renamed from common/osx.mm)0
-rw-r--r--test/test.gyp1
41 files changed, 474 insertions, 359 deletions
diff --git a/Makefile b/Makefile
index 95a7d90f34..6ff6103052 100644
--- a/Makefile
+++ b/Makefile
@@ -2,23 +2,29 @@ BUILDTYPE ?= Release
PYTHON ?= python
V ?= 1
+ifeq ($(shell uname -s), Darwin)
+PLATFORM ?= osx
+endif
+PLATFORM ?= linux
+
+
all: mbgl
-config.gypi:
+config.gypi: configure
./configure
-config-ios.gypi:
+config-ios.gypi: configure
MASON_PLATFORM=ios ./configure config-ios.gypi
# Builds the regular library
mbgl: config.gypi mapboxgl.gyp
- deps/run_gyp mapboxgl.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/mbgl -f make
+ 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
##### Test cases ###############################################################
build/test/Makefile: src common config.gypi test/test.gyp
- deps/run_gyp test/test.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/test -f make
+ deps/run_gyp test/test.gyp -Iconfig.gypi -Dplatform=$(PLATFORM) --depth=. -Goutput_dir=.. --generator-output=./build/test -f make
test: build/test/Makefile
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) test
@@ -29,7 +35,7 @@ test_%: build/test/Makefile
# build Mac OS X project for Xcode
xtest: config.gypi clear_xcode_cache
- deps/run_gyp test/test.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build -f xcode
+ deps/run_gyp test/test.gyp -Iconfig.gypi -Dplatform=osx --depth=. -Goutput_dir=.. --generator-output=./build -f xcode
open ./build/test/test.xcodeproj
##### Makefile builds ##########################################################
@@ -37,7 +43,7 @@ xtest: config.gypi clear_xcode_cache
# Builds the linux app with make.
linux: config.gypi linux/mapboxgl-app.gyp
- deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/linux -f make
+ deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=linux --depth=. -Goutput_dir=.. --generator-output=./build/linux -f make
$(MAKE) -C build/linux BUILDTYPE=$(BUILDTYPE) V=$(V) linuxapp
# Executes the Linux binary
@@ -48,7 +54,7 @@ run-linux: linux
# Builds the OS X app with make.
osx: config.gypi macosx/mapboxgl-app.gyp
- deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi --depth=. -Goutput_dir=.. --generator-output=./build/macosx -f make
+ deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=osx --depth=. -Goutput_dir=.. --generator-output=./build/macosx -f make
$(MAKE) -C build/macosx BUILDTYPE=$(BUILDTYPE) V=$(V) osxapp
# Executes the OS X binary
@@ -70,21 +76,21 @@ clear_xcode_cache:
# build Mac OS X project for Xcode
xproj-cli: config.gypi macosx/mapboxgl-app.gyp clear_xcode_cache
- deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi --depth=. --generator-output=./build -f xcode
+ deps/run_gyp macosx/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=osx --depth=. --generator-output=./build -f xcode
xproj: xproj-cli
open ./build/macosx/mapboxgl-app.xcodeproj
# build iOS project for Xcode
iproj-cli: config-ios.gypi ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp clear_xcode_cache
- deps/run_gyp ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp -Iconfig-ios.gypi --depth=. --generator-output=./build -f xcode
+ deps/run_gyp ios/mapbox-gl-cocoa/app/mapboxgl-app.gyp -Iconfig-ios.gypi -Dplatform=ios --depth=. --generator-output=./build -f xcode
iproj: iproj-cli
open ./build/ios/mapbox-gl-cocoa/app/mapboxgl-app.xcodeproj
# build Linux project for Xcode (Runs on Mac OS X too, but without platform-specific code)
lproj: config.gypi linux/mapboxgl-app.gyp clear_xcode_cache
- deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi --depth=. --generator-output=./build -f xcode
+ deps/run_gyp linux/mapboxgl-app.gyp -Iconfig.gypi -Dplatform=linux --depth=. --generator-output=./build -f xcode
open ./build/linux/mapboxgl-app.xcodeproj
@@ -98,5 +104,5 @@ clean: clear_xcode_cache
distclean: clean
-rm -rf ./mason_packages
-.PHONY: mbgl test linux build/test/Makefile clean distclean
+.PHONY: mbgl test linux clear_xcode_cache build/test/Makefile clean distclean
# DO NOT DELETE
diff --git a/README.md b/README.md
index ee9d1bacb0..8d55c2ac3f 100644
--- a/README.md
+++ b/README.md
@@ -6,114 +6,129 @@ implemented in C++11, currently targeting iOS, OS X, and Ubuntu Linux.
# Depends
- Modern C++ compiler that supports `-std=c++11` (On OS X clang++, on Linux g++-4.8 or g++-4.9)
- - Boost headers
- - `libpng`
- - `libuv`
- - `glfw3`
- - `libcurl` (depends on OpenSSL; Linux only)
+ - [Boost headers](http://boost.org/)
+ - [`zlib`](http://www.zlib.net/)
+ - [`libpng`](http://www.libpng.org/pub/png/libpng.html)
+ - [`libuv 0.10+`](https://github.com/joyent/libuv)
+ - [`glfw 3.1+`](http://www.glfw.org/)
+ - [`libcurl`](http://curl.haxx.se/libcurl/) (depends on OpenSSL; Linux only)
- `libboost_regex` (Linux only)
- Apple Command Line Tools (for build on OS X; available at [Apple Developer](https://developer.apple.com/downloads))
+ - `pkg-config` (for build only)
- [Homebrew](http://brew.sh) (for build on OS X)
- Python 2.x (for build only)
- Node.js (for build only)
# Build instructions
-We use [mapnik-packaging](https://github.com/mapnik/mapnik-packaging) to build static libraries of
-dependencies.
+We try to link to as many system-provided libraries as possible. When these are unavailable or too outdated, we run a thin build-script layer called [Mason](https://github.com/mapbox/mason) to automate builds, and load precompiled binary packages when possible.
-First off: if you hit problems during development try:
+## OS X
- make clean
+On OS X, we are using `zlib`, `SQLite3`, `libcurl` and `libpng` provided by the operating system. In addition to that, you need to have the Boost headers installed. To install all prerequisites, use [Homebrew](http://brew.sh/) and type `brew install pkg-config boost`.
-This will clear cached build data and update to the latest versions of dependencies.
+To create projects, you can run:
-### Mapbox API access tokens
+- `make xproj`: Creates an Xcode project with OS X-specific handlers for HTTP downloads and settings storage. It uses [GLFW](http://www.glfw.org) for window handling.
+- `make lproj`: Creates an Xcode project with platform-independent handlers for downloads and settings storage. This is what is also being built on Linux.
+- `make osx run-osx`: Builds and runs the OS X application on the command line with `xcodebuild`.
+- `make linux run-linux`: Builds and runs the Linux application with `make`.
-The demo applications use Mapbox vector tiles, which **require a Mapbox account and API access token**. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/account/apps/).
+Note that you can't have more than one project in Xcode open at a time since they the static library project is shared across the OS X, Linux and iOS project.
-For iOS and OS X use of the demo apps in Xcode, setup the access token by editing the scheme for the application target, then adding an environment variable with the name `MAPBOX_ACCESS_TOKEN`.
+Target OS: 10.9+
-![edit scheme](https://cloud.githubusercontent.com/assets/98601/3647749/30f74f26-1102-11e4-84af-f1be853b4e38.png)
-![setting access token in Xcode scheme](https://cloud.githubusercontent.com/assets/52399/3543326/9e7cfbb8-0860-11e4-8def-3684a9028b61.png)
+## iOS
-## OS X
+iOS makes use of a Cocoa-specific API called [`mapbox-gl-cocoa`](https://github.com/mapbox/mapbox-gl-cocoa). If you are just interested in running Mapbox GL on iOS and not developing with it, head to that project and you can use this library as a pre-built static library instead. A `UIView` interface to the map view and bundle resources are provided there.
-Run:
+If you intend to develop here, `mapbox-gl-cocoa` is included as a submodule of the overall build setup.
- make setup
+To pull down the submodule(s), run:
-This downloads all required dependencies, builds them and creates universal libraries that can be used on both OS X and iOS.
+ git submodule init
+ git submodule update
-To create projects, you can run:
-- `make xproj`: Creates an Xcode project with OS X-specific handlers for HTTP downloads and
- settings storage. It uses [GLFW](http://www.glfw.org) for window handling.
-- `make lproj`: Creates an Xcode project with platform-independent handlers for downloads
- and settings storage. This is what is also being built on Linux.
-- `make linux`: Builds the Linux GLFW application with `make`.
+Then, you can run `make iproj` to create and open an Xcode project with an iOS-specific view controller housing. This will automatically install required dependencies as well.
-Note that if you are doing iOS development as well, to toggle from iOS back to OS X, you will need to `make xproj` again.
+Note that if you are doing OS X development as well, to toggle from OS X back to iOS, you will need to `make iproj` again.
-Target OS: 10.9+
+Target devices: iPhone 4S and above (5, 5c, 5s, 6, 6 Plus) and iPad 2 and above (3, 4, Mini , Air, Mini 2, Air 2).
-## iOS
+Target OS: 7.0+
-iOS makes use of a Cocoa-specific API called [`mapbox-gl-cocoa`](https://github.com/mapbox/mapbox-gl-cocoa). If you are just interested in running Mapbox GL on iOS and not developing with it, head to that project and you can use this library as a pre-built static library instead. A `UIView` interface to the map view and bundle resources are provided there.
+## Linux
-If you intend to develop here, `mapbox-gl-cocoa` is included as a submodule of the overall build setup.
+We are using Ubuntu for development. While the software should work on other distributions as well, we are not providing explicit build instructions here.
-First, pull down the submodule(s):
+Install GCC 4.8+ if you are running Ubuntu 13.10 or older. Alternatively, you can also use Clang 3.4+.
- git submodule init
- git submodule update
+ sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
+ sudo apt-get update
+ sudo apt-get install gcc-4.8 g++-4.8
-Then run:
+Ensure you have git and other build essentials:
- make setup
+ sudo apt-get install git build-essential zlib1g-dev automake \
+ libtool xutils-dev make cmake pkg-config python-pip \
+ libcurl4-openssl-dev libpng-dev libsqlite3-dev
-This downloads all required dependencies, builds them and creates universal libraries that can be used on both OS X and iOS.
+Install glfw3 dependencies:
-Lastly, `make iproj` to create and open an Xcode project with an iOS-specific view controller housing.
+ sudo apt-get install libxi-dev libglu1-mesa-dev x11proto-randr-dev \
+ x11proto-xext-dev libxrandr-dev \
+ x11proto-xf86vidmode-dev libxxf86vm-dev \
+ libxcursor-dev libxinerama-dev
-Note that if you are doing OS X development as well, to toggle from OS X back to iOS, you will need to `make iproj` again.
+Finally, install Boost. If you're running Ubuntu 12.04 or older, you need to install a backport PPA since the version provided by APT doesn't contain Boost Geometry:
-Target devices: iPhone 4 and above (4S, 5, 5c, 5s) and iPad 2 and above (3, 4, mini and/or retina).
+ sudo add-apt-repository --yes ppa:boost-latest/ppa
+ sudo apt-get update
+ sudo apt-get install libboost1.55-dev libboost-regex1.55-dev
-Target OS: 7.0+
+Otherwise, you can just install
-## Ubuntu
+ sudo apt-get install libboost-dev libboost-regex-dev
-Set the environment variable `MAPBOX_ACCESS_TOKEN` to your token.
+Once you're done installing the build dependencies, you can get started by running
-Ensure you have git and other build essentials:
+ ./configure
- sudo apt-get update
- sudo apt-get install git build-essential zlib1g-dev automake libtool xutils-dev make cmake pkg-config nodejs-legacy curl libuv-dev
+which downloads all other dependencies that we need to build manually with [Mason](https://github.com/mapbox/mason). There's a good chance that there already are binary files and that you don't need to compile anything.
-If you are running Ubuntu 13.10 or older, install a `-std=c++11` capable compiler:
+Then, you can then proceed to build the library like:
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get install gcc-4.8 g++-4.8
+ make mbgl
-Install glfw3 dependencies:
+Or proceed to building the debug application with:
+
+ make linux
- sudo apt-get install libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev
-Then run:
+# Troubleshooting
- make setup
+To trigger a complete rebuild, run `make clean` and then start over generating the Xcode projects or Makefiles as described above.
-This downloads all required dependencies, builds them and creates universal libraries that can be used on both OS X and iOS.
+If you are having trouble getting the dependencies right, you can blow away the `mason_packages` directory, or run `make distclean`. This means the Makefile and configure script will automatically install the dependencies again on the next try.
-You can then proceed to build the library like:
+On OS X, you can also try clearing the Xcode cache with `make clear_xcode_cache`.
+
+# Mapbox API access tokens
+
+The demo applications use Mapbox vector tiles, which **require a Mapbox account and API access token**. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/account/apps/).
+
+For iOS and OS X use of the demo apps in Xcode, setup the access token by editing the scheme for the application target, then adding an environment variable with the name `MAPBOX_ACCESS_TOKEN`.
+
+![edit scheme](https://cloud.githubusercontent.com/assets/98601/3647749/30f74f26-1102-11e4-84af-f1be853b4e38.png)
+
+![setting access token in Xcode scheme](https://cloud.githubusercontent.com/assets/52399/3543326/9e7cfbb8-0860-11e4-8def-3684a9028b61.png)
- make linux
+For Linux, set the environment variable `MAPBOX_ACCESS_TOKEN` to your token.
# Style
-Some styles in JSON format are included at `./styles`. See the [style spec](https://github.com/mapbox/mapbox-gl-style-spec) for more details.
+Some styles in JSON format are included at `./styles`. See the [style spec](https://github.com/mapbox/mapbox-gl-style-spec) for more details.
# Usage
@@ -136,4 +151,4 @@ Some styles in JSON format are included at `./styles`. See the [style spec](http
# Other notes
-Under early development, this project was called LLMR (Low-Level Map Renderer), in case you see any lingering references to it.
+Under early development, this project was called LLMR (Low-Level Map Renderer), in case you see any lingering references to it.
diff --git a/common.gypi b/common.gypi
index 627c186689..89a82fbdb9 100644
--- a/common.gypi
+++ b/common.gypi
@@ -44,6 +44,6 @@
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO'
}
},
- }
+ },
}
}
diff --git a/configure b/configure
index 2fffd59206..ef289ac5d2 100755
--- a/configure
+++ b/configure
@@ -2,6 +2,7 @@
set -e
set -o pipefail
+shopt -s expand_aliases
CONFIG_FILE=${1:-config.gypi}
@@ -26,6 +27,13 @@ else
>&2 echo -en "\033[0m";
fi
+# Install mason
+if [[ ! -d ~/.mason ]]; then
+ >&2 echo -e "\033[1m\033[32m* Installing Mason\033[0m"
+ git clone https://github.com/mapbox/mason.git ~/.mason
+fi
+alias mason='~/.mason/mason'
+
case $MASON_PLATFORM in
'ios')
diff --git a/gyp/certificates.gypi b/gyp/certificates.gypi
new file mode 100644
index 0000000000..6a358f0dbf
--- /dev/null
+++ b/gyp/certificates.gypi
@@ -0,0 +1,13 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'copy_certificate_bundle',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'copies': [{
+ 'files': [ '../common/ca-bundle.crt' ],
+ 'destination': '<(PRODUCT_DIR)'
+ }],
+ },
+ ]
+}
diff --git a/gyp/fixtures.gypi b/gyp/fixtures.gypi
new file mode 100644
index 0000000000..f290da5d53
--- /dev/null
+++ b/gyp/fixtures.gypi
@@ -0,0 +1,18 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'copy_fixtures',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'bundle_styles'
+ ],
+ 'copies': [
+ {
+ 'files': [ '../styles' ],
+ 'destination': '../test/fixtures/style_parser'
+ }
+ ]
+ },
+ ]
+}
diff --git a/gyp/library.gypi b/gyp/library.gypi
new file mode 100644
index 0000000000..bb86432dac
--- /dev/null
+++ b/gyp/library.gypi
@@ -0,0 +1,75 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'mapboxgl',
+ 'product_name': 'mapboxgl',
+ 'type': 'static_library',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'shaders',
+ ],
+ 'sources': [
+ '<!@(find src -name "*.cpp")',
+ '<!@(test -f "config/constants_local.cpp" && echo "config/constants_local.cpp" || echo "config/constants.cpp")',
+ '<!@(find src -name "*.c")',
+ '<!@(find src -name "*.h")',
+ '<!@(find include -name "*.hpp")',
+ '<!@(find include -name "*.h")',
+ '<!@(find src -name "*.glsl")',
+ 'bin/style.json'
+ ],
+ 'include_dirs': [
+ '../include'
+ ],
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'PUBLIC_HEADERS_FOLDER_PATH': 'include',
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ '<@(sqlite3_cflags)',
+ '<@(zlib_cflags)',
+ '-I<(boost_root)/include',
+ ],
+ 'OTHER_CFLAGS': [
+ '<@(uv_cflags)',
+ ],
+ },
+ }, {
+ 'cflags': [
+ '<@(png_cflags)',
+ '<@(uv_cflags)',
+ '<@(sqlite3_cflags)',
+ '<@(zlib_cflags)',
+ '-I<(boost_root)/include',
+ ],
+ }]
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../include',
+ ],
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '<@(png_libraries)',
+ '<@(uv_libraries)',
+ '<@(sqlite3_libraries)',
+ '<@(zlib_libraries)',
+ ]
+ }
+ }, {
+ 'libraries': [
+ '<@(png_libraries)',
+ '<@(uv_libraries)',
+ '<@(sqlite3_libraries)',
+ '<@(zlib_libraries)',
+ ]
+ }]
+ ]
+ }
+ }
+ ]
+}
diff --git a/gyp/npm_install.gypi b/gyp/npm_install.gypi
new file mode 100644
index 0000000000..07d2e3e00e
--- /dev/null
+++ b/gyp/npm_install.gypi
@@ -0,0 +1,21 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'npm_install',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'actions': [
+ {
+ 'action_name': 'npm install',
+ 'inputs': [
+ '../bin/package.json',
+ ],
+ 'outputs': [
+ '../bin/node_modules',
+ ],
+ 'action': ['./scripts/npm_install.sh', '<@(npm)']
+ }
+ ],
+ },
+ ]
+}
diff --git a/gyp/platform-ios.gypi b/gyp/platform-ios.gypi
new file mode 100644
index 0000000000..d070744925
--- /dev/null
+++ b/gyp/platform-ios.gypi
@@ -0,0 +1,51 @@
+{
+ 'target_defaults': {
+ 'target_conditions': [
+ ['_type == "static_library"', {
+ 'xcode_settings': {
+ 'SDKROOT': 'iphoneos',
+ 'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
+ 'CLANG_CXX_LIBRARY': 'libc++',
+ 'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
+ 'IPHONEOS_DEPLOYMENT_TARGET':'7.0',
+ 'TARGETED_DEVICE_FAMILY': '1,2',
+ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
+ 'CLANG_ENABLE_OBJC_ARC': 'YES',
+ 'CODE_SIGN_IDENTITY': 'iPhone Developer',
+ 'PUBLIC_HEADERS_FOLDER_PATH': 'include',
+ }
+ }],
+ ],
+ },
+ 'targets': [
+ {
+ 'target_name': 'mapboxgl-ios',
+ 'product_name': 'mapboxgl-ios',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../include',
+ ],
+ 'sources': [
+ '../platform/ios/cache_database_library.mm',
+ '../platform/darwin/log_nslog.mm',
+ '../platform/darwin/string_nsstring.mm',
+ '../platform/darwin/http_request_baton_cocoa.mm',
+ ],
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '<@(uv_cflags)',
+ ],
+ },
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../include',
+ ],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '<@(uv_libraries)',
+ ],
+ },
+ },
+ },
+ ],
+}
diff --git a/gyp/platform-linux.gypi b/gyp/platform-linux.gypi
new file mode 100644
index 0000000000..4288def7fc
--- /dev/null
+++ b/gyp/platform-linux.gypi
@@ -0,0 +1,53 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'mapboxgl-linux',
+ 'product_name': 'mapboxgl-linux',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../include'
+ ],
+ 'sources': [
+ '../platform/default/cache_database_tmp.cpp',
+ '../platform/default/log_stderr.cpp',
+ '../platform/default/string_stdlib.cpp',
+ '../platform/default/http_request_baton_curl.cpp',
+ ],
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '<@(uv_cflags)',
+ '<@(curl_cflags)',
+ ],
+ }
+ }, {
+ 'cflags': [
+ '<@(uv_cflags)',
+ '<@(curl_cflags)',
+ ],
+ }]
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../include',
+ ],
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '<@(uv_libraries)',
+ '<@(curl_libraries)',
+ ]
+ }
+ }, {
+ 'libraries': [
+ '<@(uv_libraries)',
+ '<@(curl_libraries)',
+ ]
+ }]
+ ]
+ }
+ },
+ ]
+}
diff --git a/gyp/platform-osx.gypi b/gyp/platform-osx.gypi
new file mode 100644
index 0000000000..adc0d3232c
--- /dev/null
+++ b/gyp/platform-osx.gypi
@@ -0,0 +1,33 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'mapboxgl-osx',
+ 'product_name': 'mapboxgl-osx',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../include',
+ ],
+ 'sources': [
+ '../platform/osx/cache_database_application_support.mm',
+ '../platform/darwin/log_nslog.mm',
+ '../platform/darwin/string_nsstring.mm',
+ '../platform/darwin/http_request_baton_cocoa.mm',
+ ],
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '<@(uv_cflags)',
+ ],
+ },
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../include',
+ ],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '<@(uv_libraries)',
+ ],
+ },
+ },
+ },
+ ],
+}
diff --git a/gyp/shaders.gypi b/gyp/shaders.gypi
new file mode 100644
index 0000000000..9435bd7d9c
--- /dev/null
+++ b/gyp/shaders.gypi
@@ -0,0 +1,36 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'shaders',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'npm_install'
+ ],
+ 'actions': [
+ {
+ 'action_name': 'Build Shaders',
+ 'inputs': [
+ '<!@(find src -name "*.glsl")'
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
+ '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp',
+ ],
+ 'action': ['<@(node)', 'bin/build-shaders.js', '<(SHARED_INTERMEDIATE_DIR)'],
+ }
+ ],
+ 'direct_dependent_settings': {
+ 'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
+ '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp'
+ ],
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/include/',
+ ]
+ }
+ },
+ ]
+}
diff --git a/gyp/styles.gypi b/gyp/styles.gypi
new file mode 100644
index 0000000000..31bf530c5f
--- /dev/null
+++ b/gyp/styles.gypi
@@ -0,0 +1,36 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'touch_styles',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'actions': [
+ {
+ 'action_name': 'Touch Stylesheet Directory',
+ 'inputs': ['../styles'],
+ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/'], # need to specify a distinct directory
+ 'action': ['touch', '../styles'],
+ }
+ ],
+ },
+ {
+ 'target_name': 'bundle_styles',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
+ 'direct_dependent_settings': {
+ 'mac_bundle_resources': [ '../styles' ],
+ }
+ },
+ {
+ 'target_name': 'copy_styles',
+ 'type': 'none',
+ 'hard_dependency': 1,
+ 'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
+ 'copies': [{
+ 'files': [ '../styles' ],
+ 'destination': '<(PRODUCT_DIR)'
+ }],
+ },
+ ]
+}
diff --git a/common/nslog_log.hpp b/include/mbgl/platform/darwin/log_nslog.hpp
index d40f963036..d40f963036 100644
--- a/common/nslog_log.hpp
+++ b/include/mbgl/platform/darwin/log_nslog.hpp
diff --git a/common/Reachability.h b/include/mbgl/platform/darwin/reachability.h
index 1cf7d2ecea..1cf7d2ecea 100644
--- a/common/Reachability.h
+++ b/include/mbgl/platform/darwin/reachability.h
diff --git a/common/settings_nsuserdefaults.hpp b/include/mbgl/platform/darwin/settings_nsuserdefaults.hpp
index 3533e3da35..3533e3da35 100644
--- a/common/settings_nsuserdefaults.hpp
+++ b/include/mbgl/platform/darwin/settings_nsuserdefaults.hpp
diff --git a/common/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp
index 6e91c1125e..6e91c1125e 100644
--- a/common/glfw_view.hpp
+++ b/include/mbgl/platform/default/glfw_view.hpp
diff --git a/common/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp
index c0baddb884..c0baddb884 100644
--- a/common/headless_view.hpp
+++ b/include/mbgl/platform/default/headless_view.hpp
diff --git a/common/stderr_log.hpp b/include/mbgl/platform/default/log_stderr.hpp
index 45f76f0d1a..45f76f0d1a 100644
--- a/common/stderr_log.hpp
+++ b/include/mbgl/platform/default/log_stderr.hpp
diff --git a/common/settings_json.hpp b/include/mbgl/platform/default/settings_json.hpp
index 25c2179ba0..25c2179ba0 100644
--- a/common/settings_json.hpp
+++ b/include/mbgl/platform/default/settings_json.hpp
diff --git a/ios/mapbox-gl-cocoa b/ios/mapbox-gl-cocoa
-Subproject dd4f4cac252e0e9af5fbf73980370fc1528079a
+Subproject cfbd1cfad47802ee5489aef24a59e340b841e49
diff --git a/linux/main.cpp b/linux/main.cpp
index a4f9a6298d..604e471dd1 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -1,15 +1,16 @@
#include <mbgl/mbgl.hpp>
-#include <mbgl/platform/platform.hpp>
#include <mbgl/util/uv.hpp>
+#include <mbgl/platform/platform.hpp>
+#include <mbgl/platform/default/settings_json.hpp>
+#include <mbgl/platform/default/glfw_view.hpp>
+#include <mbgl/platform/default/log_stderr.hpp>
#include <signal.h>
#include <getopt.h>
#include <fstream>
#include <sstream>
-#include "../common/settings_json.hpp"
-#include "../common/glfw_view.hpp"
-#include "../common/stderr_log.hpp"
+
GLFWView *view = nullptr;
diff --git a/linux/mapboxgl-app.gyp b/linux/mapboxgl-app.gyp
index 05716dd11c..09734fc1c4 100644
--- a/linux/mapboxgl-app.gyp
+++ b/linux/mapboxgl-app.gyp
@@ -1,7 +1,6 @@
{
'includes': [
'../common.gypi',
- '../config.gypi',
],
'targets': [
{
@@ -10,15 +9,9 @@
'type': 'executable',
'sources': [
'./main.cpp',
- '../common/settings_json.cpp',
- '../common/settings_json.hpp',
- '../common/platform_default.cpp',
- '../common/glfw_view.hpp',
- '../common/glfw_view.cpp',
- '../common/http_request_baton_curl.cpp',
- '../common/linux.cpp',
- '../common/stderr_log.hpp',
- '../common/stderr_log.cpp',
+ '../platform/default/settings_json.cpp',
+ '../platform/default/glfw_view.cpp',
+ '../platform/default/log_stderr.cpp',
],
'conditions': [
@@ -29,11 +22,9 @@
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS':[
'<@(glfw3_cflags)',
- '<@(curl_cflags)',
],
'OTHER_LDFLAGS': [
'<@(glfw3_libraries)',
- '<@(curl_libraries)',
],
}
},
@@ -42,19 +33,19 @@
{
'cflags': [
'<@(glfw3_cflags)',
- '<@(curl_cflags)',
],
'link_settings': {
'libraries': [
'<@(glfw3_libraries)',
- '<@(curl_libraries)',
- '-lboost_regex'
+ '-L<(boost_root)/lib',
+ '-lboost_regex',
],
},
}],
],
'dependencies': [
'../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mapboxgl-linux',
'../mapboxgl.gyp:copy_styles',
'../mapboxgl.gyp:copy_certificate_bundle',
],
diff --git a/macosx/main.mm b/macosx/main.mm
index 8cf3cc81c3..81494821cf 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -1,12 +1,10 @@
-#include "../common/settings_nsuserdefaults.hpp"
-#include "../common/glfw_view.hpp"
-#include "../common/nslog_log.hpp"
-#include "../common/Reachability.h"
+#include <mbgl/platform/darwin/settings_nsuserdefaults.hpp>
+#include <mbgl/platform/darwin/log_nslog.hpp>
+#include <mbgl/platform/darwin/Reachability.h>
+#include <mbgl/platform/default/glfw_view.hpp>
#import <Foundation/Foundation.h>
-#include <uv.h>
-
@interface URLHandler : NSObject
@property (nonatomic) mbgl::Map *map;
@@ -71,7 +69,6 @@
@end
int main() {
- fprintf(stderr, "main thread: 0x%lx\n", uv_thread_self());
mbgl::Log::Set<mbgl::NSLogBackend>();
GLFWView view;
diff --git a/macosx/mapboxgl-app.gyp b/macosx/mapboxgl-app.gyp
index 51f591fdd0..4451a207b4 100644
--- a/macosx/mapboxgl-app.gyp
+++ b/macosx/mapboxgl-app.gyp
@@ -1,7 +1,6 @@
{
'includes': [
'../common.gypi',
- '../config.gypi'
],
'targets': [
{
@@ -10,17 +9,11 @@
'type': 'executable',
'sources': [
'./main.mm',
- '../common/settings_nsuserdefaults.hpp',
- '../common/settings_nsuserdefaults.mm',
- '../common/platform_nsstring.mm',
- '../common/glfw_view.hpp',
- '../common/glfw_view.cpp',
- '../common/reachability.h',
- '../common/reachability.m',
- '../common/http_request_baton_cocoa.mm',
- '../common/osx.mm',
- '../common/nslog_log.hpp',
- '../common/nslog_log.mm',
+ '../platform/darwin/settings_nsuserdefaults.hpp',
+ '../platform/darwin/settings_nsuserdefaults.mm',
+ '../platform/darwin/reachability.m',
+ '../platform/default/glfw_view.hpp',
+ '../platform/default/glfw_view.cpp',
],
'product_extension': 'app',
'mac_bundle': 1,
@@ -45,6 +38,7 @@
'dependencies': [
'../mapboxgl.gyp:bundle_styles',
'../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:mapboxgl-osx',
]
}
]
diff --git a/mapboxgl.gyp b/mapboxgl.gyp
index bdecb94d06..64c0ccc0c7 100644
--- a/mapboxgl.gyp
+++ b/mapboxgl.gyp
@@ -1,248 +1,16 @@
{
'includes': [
'./common.gypi',
+ './gyp/shaders.gypi',
+ './gyp/npm_install.gypi',
+ './gyp/styles.gypi',
+ './gyp/fixtures.gypi',
+ './gyp/certificates.gypi',
+ './gyp/library.gypi',
+ ],
+ 'conditions': [
+ ['platform == "osx"', { 'includes': ['./gyp/platform-osx.gypi'] }],
+ ['platform == "ios"', { 'includes': ['./gyp/platform-ios.gypi'] }],
+ ['platform == "linux"', { 'includes': ['./gyp/platform-linux.gypi'] }],
],
- 'targets': [
- {
- 'target_name': 'shaders',
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [
- 'npm_install'
- ],
- 'actions': [
- {
- 'action_name': 'Build Shaders',
- 'inputs': [
- '<!@(find src -name "*.glsl")'
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
- '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp',
- ],
- 'action': ['<@(node)', 'bin/build-shaders.js', '<(SHARED_INTERMEDIATE_DIR)'],
- }
- ],
- 'direct_dependent_settings': {
- 'sources': [
- '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp',
- '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp'
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/include/',
- ]
- }
- },
- {
- 'target_name': 'npm_install',
- 'type': 'none',
- 'hard_dependency': 1,
- 'actions': [
- {
- 'action_name': 'npm install',
- 'inputs': [
- 'bin/package.json',
- ],
- 'outputs': [
- 'bin/node_modules',
- ],
- 'action': ['./scripts/npm_install.sh', '<@(npm)']
- }
- ],
- },
- {
- 'target_name': 'touch_styles',
- 'type': 'none',
- 'hard_dependency': 1,
- 'actions': [
- {
- 'action_name': 'Touch Stylesheet Directory',
- 'inputs': ['styles'],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/'], # need to specify a distinct directory
- 'action': ['touch', 'styles'],
- }
- ],
- },
- {
- 'target_name': 'bundle_styles',
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
- 'direct_dependent_settings': {
- 'mac_bundle_resources': [ 'styles' ],
- }
- },
- {
- 'target_name': 'copy_styles',
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
- 'copies': [{
- 'files': [ 'styles' ],
- 'destination': '<(PRODUCT_DIR)'
- }],
- },
- {
- 'target_name': 'copy_fixtures',
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [
- 'bundle_styles'
- ],
- 'copies': [
- {
- 'files': [ 'styles' ],
- 'destination': 'test/fixtures/style_parser'
- }
- ]
- },
- {
- 'target_name': 'copy_certificate_bundle',
- 'type': 'none',
- 'hard_dependency': 1,
- 'copies': [{
- 'files': [ 'common/ca-bundle.crt' ],
- 'destination': '<(PRODUCT_DIR)'
- }],
- },
- {
- 'target_name': 'mapboxgl',
- 'product_name': 'mapboxgl',
- 'type': 'static_library',
- 'hard_dependency': 1,
- 'dependencies': [
- 'shaders',
- ],
- 'sources': [
- '<!@(find src -name "*.cpp")',
- '<!@(test -f "config/constants_local.cpp" && echo "config/constants_local.cpp" || echo "config/constants.cpp")',
- '<!@(find src -name "*.c")',
- '<!@(find src -name "*.h")',
- '<!@(find include -name "*.hpp")',
- '<!@(find include -name "*.h")',
- '<!@(find src -name "*.glsl")',
- 'bin/style.json'
- ],
- 'include_dirs': [
- './include'
- ],
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'SDKROOT': 'macosx',
- 'SUPPORTED_PLATFORMS': ['macosx'],
- 'MACOSX_DEPLOYMENT_TARGET': '10.9',
- 'PUBLIC_HEADERS_FOLDER_PATH': 'include',
- 'OTHER_CPLUSPLUSFLAGS': [
- '<@(png_cflags)',
- '<@(uv_cflags)',
- '<@(sqlite3_cflags)',
- '<@(zlib_cflags)',
- '-I<(boost_root)/include',
- ],
- 'OTHER_CFLAGS': [
- '<@(uv_cflags)',
- ],
- },
- }, {
- 'cflags': [
- '<@(png_cflags)',
- '<@(uv_cflags)',
- '<@(sqlite3_cflags)',
- '<@(zlib_cflags)',
- '-I<(boost_root)/include',
- ],
- }]
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- './include',
- ],
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS': [
- '<@(uv_cflags)',
- ],
- 'OTHER_LDFLAGS': [
- '<@(png_libraries)',
- '<@(uv_libraries)',
- '<@(sqlite3_libraries)',
- '<@(zlib_libraries)',
- ]
- }
- }, {
- 'cflags': [
- '<@(uv_cflags)',
- ],
- 'libraries': [
- '<@(png_libraries)',
- '<@(uv_libraries)',
- '<@(sqlite3_libraries)',
- '<@(zlib_libraries)',
- ]
- }]
- ]
- }
- },
- {
- 'target_name': 'mapboxgl-ios',
- 'product_name': 'mapboxgl-ios',
- 'type': 'static_library',
- 'hard_dependency': 1,
- 'dependencies': [
- 'shaders',
- ],
- 'sources': [
- '<!@(find src/ \( -name "*.cpp" ! -name shaders.hpp ! -name shaders_gles2.cpp ! -name shaders_gl.cpp \))',
- '<!@(test -f "config/constants_local.cpp" && echo "config/constants_local.cpp" || echo "config/constants.cpp")',
- '<!@(find src -name "*.c")',
- '<!@(find src -name "*.h")',
- '<!@(find include -name "*.hpp")',
- '<!@(find include -name "*.h")',
- '<!@(find src -name "*.glsl")',
- 'bin/style.json'
- ],
- 'xcode_settings': {
- 'SDKROOT': 'iphoneos',
- 'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
- 'TARGETED_DEVICE_FAMILY': '1,2',
- 'CODE_SIGN_IDENTITY': 'iPhone Developer',
- 'IPHONEOS_DEPLOYMENT_TARGET': '7.0',
- 'PUBLIC_HEADERS_FOLDER_PATH': 'include',
- 'GCC_INPUT_FILETYPE': 'sourcecode.cpp.cpp',
- 'OTHER_CPLUSPLUSFLAGS': [
- '<@(png_cflags)',
- '<@(uv_cflags)',
- '<@(sqlite3_cflags)',
- '<@(zlib_cflags)',
- '-I<(boost_root)/include',
- ],
- },
- 'include_dirs': [
- './include'
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- './include',
- ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '<@(png_libraries)',
- '<@(uv_libraries)',
- '<@(sqlite3_libraries)',
- '<@(zlib_libraries)',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '<@(uv_cflags)',
- ],
- 'OTHER_CFLAGS': [
- '<@(uv_cflags)',
- ],
- }
- }
- }
- ]
}
diff --git a/common/http_request_baton_cocoa.mm b/platform/darwin/http_request_baton_cocoa.mm
index a9992fad8c..a9992fad8c 100644
--- a/common/http_request_baton_cocoa.mm
+++ b/platform/darwin/http_request_baton_cocoa.mm
diff --git a/common/nslog_log.mm b/platform/darwin/log_nslog.mm
index 12230143ac..231037b2dd 100644
--- a/common/nslog_log.mm
+++ b/platform/darwin/log_nslog.mm
@@ -1,4 +1,4 @@
-#include "nslog_log.hpp"
+#include "log_nslog.hpp"
#import <Foundation/Foundation.h>
diff --git a/common/Reachability.m b/platform/darwin/reachability.m
index c6f6388f52..8234659402 100644
--- a/common/Reachability.m
+++ b/platform/darwin/reachability.m
@@ -25,7 +25,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-#import "Reachability.h"
+#import <mbgl/platform/darwin/reachability.h>
NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification";
diff --git a/common/settings_nsuserdefaults.mm b/platform/darwin/settings_nsuserdefaults.mm
index dfc601bddb..b9b0e134bf 100644
--- a/common/settings_nsuserdefaults.mm
+++ b/platform/darwin/settings_nsuserdefaults.mm
@@ -1,6 +1,6 @@
#import <Foundation/Foundation.h>
-#include "settings_nsuserdefaults.hpp"
+#include <mbgl/platform/darwin/settings_nsuserdefaults.hpp>
using namespace mbgl;
diff --git a/common/platform_nsstring.mm b/platform/darwin/string_nsstring.mm
index 9119f2a8fe..9b1dc745cb 100644
--- a/common/platform_nsstring.mm
+++ b/platform/darwin/string_nsstring.mm
@@ -18,4 +18,4 @@ std::string lowercase(const std::string &string) {
}
}
-} \ No newline at end of file
+}
diff --git a/common/linux.cpp b/platform/default/cache_database_tmp.cpp
index 6132ace692..6132ace692 100644
--- a/common/linux.cpp
+++ b/platform/default/cache_database_tmp.cpp
diff --git a/common/glfw_view.cpp b/platform/default/glfw_view.cpp
index 92d1e19085..baacfbfd9c 100644
--- a/common/glfw_view.cpp
+++ b/platform/default/glfw_view.cpp
@@ -1,4 +1,4 @@
-#include "glfw_view.hpp"
+#include <mbgl/platform/default/glfw_view.hpp>
#include <mbgl/util/string.hpp>
diff --git a/common/headless_view.cpp b/platform/default/headless_view.cpp
index d1d13db5f8..d1d13db5f8 100644
--- a/common/headless_view.cpp
+++ b/platform/default/headless_view.cpp
diff --git a/common/http_request_baton_curl.cpp b/platform/default/http_request_baton_curl.cpp
index 0c3d2b43fc..0c3d2b43fc 100644
--- a/common/http_request_baton_curl.cpp
+++ b/platform/default/http_request_baton_curl.cpp
diff --git a/common/stderr_log.cpp b/platform/default/log_stderr.cpp
index bcb84447bb..62938b6d63 100644
--- a/common/stderr_log.cpp
+++ b/platform/default/log_stderr.cpp
@@ -1,4 +1,4 @@
-#include "stderr_log.hpp"
+#include <mbgl/platform/default/log_stderr.hpp>
#include <iostream>
#include <cstdarg>
diff --git a/common/settings_json.cpp b/platform/default/settings_json.cpp
index f2f1248aa6..f81c75115e 100644
--- a/common/settings_json.cpp
+++ b/platform/default/settings_json.cpp
@@ -1,4 +1,4 @@
-#include "settings_json.hpp"
+#include <mbgl/platform/default/settings_json.hpp>
#include <rapidjson/prettywriter.h>
#include <rapidjson/filestream.h>
#include <rapidjson/document.h>
diff --git a/common/platform_default.cpp b/platform/default/string_stdlib.cpp
index 1acbfa8508..1acbfa8508 100644
--- a/common/platform_default.cpp
+++ b/platform/default/string_stdlib.cpp
diff --git a/common/ios.mm b/platform/ios/cache_database_library.mm
index 7989e73a4e..7989e73a4e 100644
--- a/common/ios.mm
+++ b/platform/ios/cache_database_library.mm
diff --git a/common/osx.mm b/platform/osx/cache_database_application_support.mm
index 974ea537cb..974ea537cb 100644
--- a/common/osx.mm
+++ b/platform/osx/cache_database_application_support.mm
diff --git a/test/test.gyp b/test/test.gyp
index 8bf1dffdfb..49cc33739d 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -1,7 +1,6 @@
{
'includes': [
'../common.gypi',
- '../config.gypi'
],
'targets': [
{