add xcode project target
Use locally installed node-pre-gyp if there's no global one. This is necessary to be able to run make outside of npm. Make example executable. Change path to the request include file. Bump mbgl to master.
This commit is contained in:
committed by
Mike Morris
parent
417741b13f
commit
f2c9e9fb67
29
Makefile
29
Makefile
@@ -19,6 +19,11 @@ JOBS = $(shell nproc)
|
||||
endif
|
||||
endif
|
||||
|
||||
NODE_PRE_GYP = $(shell which node-pre-gyp)
|
||||
ifeq ($(NODE_PRE_GYP),)
|
||||
NODE_PRE_GYP = $(shell npm bin)/node-pre-gyp
|
||||
endif
|
||||
|
||||
# Explicitly disable the default FileSource implementation
|
||||
ASSET = none
|
||||
HTTP = none
|
||||
@@ -30,20 +35,28 @@ global: build
|
||||
|
||||
.PHONY: build
|
||||
build: build/Makefile
|
||||
@node-pre-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
||||
@$(NODE_PRE_GYP) build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
||||
|
||||
vendor/mbgl:
|
||||
git submodule update --init
|
||||
|
||||
GYP_SETTINGS = -Dmbgl=$(MBGL) \
|
||||
-Dhost=$(HOST) \
|
||||
-I$(MBGL)/config/$(HOST).gypi \
|
||||
$(LIBS_$(HOST)) \
|
||||
-Duv_static_libs= -Duv_ldflags=
|
||||
|
||||
.PHONY: build/Makefile
|
||||
build/Makefile: $(MBGL)/config/$(HOST).gypi
|
||||
@node-pre-gyp configure --clang -- \
|
||||
-Dmbgl=$(MBGL) \
|
||||
-Dhost=$(HOST) \
|
||||
-I$(MBGL)/config/$(HOST).gypi \
|
||||
$(LIBS_$(HOST)) \
|
||||
-Duv_static_libs= -Duv_ldflags= \
|
||||
-Goutput_dir=.
|
||||
@$(NODE_PRE_GYP) configure --clang -- $(GYP_SETTINGS) -f make
|
||||
|
||||
.PHONY: build/binding.xcodeproj
|
||||
build/binding.xcodeproj: $(MBGL)/config/$(HOST).gypi
|
||||
@$(NODE_PRE_GYP) configure --clang -- $(GYP_SETTINGS) -f xcode
|
||||
|
||||
.PHONY: xproj
|
||||
xproj: build/binding.xcodeproj
|
||||
open build/binding.xcodeproj
|
||||
|
||||
$(MBGL)/config/%.gypi: $(MBGL) $(MBGL)/configure
|
||||
make -C $(MBGL) config/$*.gypi
|
||||
|
||||
0
examples/load-from-fs.js
Normal file → Executable file
0
examples/load-from-fs.js
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
#include "node_file_source.hpp"
|
||||
#include "node_request.hpp"
|
||||
|
||||
#include <mbgl/storage/default/request.hpp>
|
||||
#include <mbgl/storage/request.hpp>
|
||||
#include <mbgl/util/async_queue.hpp>
|
||||
|
||||
namespace node_mbgl {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "node_request.hpp"
|
||||
#include "node_file_source.hpp"
|
||||
#include <mbgl/storage/default/request.hpp>
|
||||
#include <mbgl/storage/request.hpp>
|
||||
#include <mbgl/storage/response.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
2
vendor/mbgl
vendored
2
vendor/mbgl
vendored
Submodule vendor/mbgl updated: f221fc7af5...7827d4954c
Reference in New Issue
Block a user