add iam template with mapbox-gl-testing and mapbox-node-binary permissions add travis build scripts and .travis.yml rm -f platform gypi map.resize is private now, called by view.resize set stdlib and c++11 per platform, link glfw3 ldflags on linux pass --clang to node-gyp per https://github.com/mapbox/mapbox-gl-native/pull/364#issuecomment-51735692
60 lines
1.0 KiB
Makefile
60 lines
1.0 KiB
Makefile
BUILDTYPE ?= Release
|
|
MBGL ?= vendor/mbgl
|
|
|
|
DEBUG_FLAG =
|
|
ifeq ($(BUILDTYPE), Debug)
|
|
DEBUG_FLAG = -d
|
|
endif
|
|
|
|
ifeq ($(shell uname -s), Darwin)
|
|
HOST ?= osx
|
|
ifeq ($(JOBS),)
|
|
JOBS = $(shell sysctl -n hw.ncpu)
|
|
endif
|
|
endif
|
|
ifeq ($(shell uname -s), Linux)
|
|
HOST ?= linux
|
|
ifeq ($(JOBS),)
|
|
JOBS = $(shell nproc)
|
|
endif
|
|
endif
|
|
|
|
# Explicitly disable the default FileSource implementation
|
|
ASSET = none
|
|
HTTP = none
|
|
CACHE = none
|
|
|
|
include $(MBGL)/config/defaults.mk
|
|
|
|
global: build
|
|
|
|
.PHONY: build
|
|
build: build/Makefile
|
|
@node-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
|
|
|
.PHONY: vendor/mbgl
|
|
vendor/mbgl:
|
|
git submodule update --init
|
|
|
|
.PHONY: build/Makefile
|
|
build/Makefile: $(MBGL)/config/$(HOST).gypi
|
|
@node-gyp configure --clang -- \
|
|
-Dmbgl=$(MBGL) \
|
|
-Dhost=$(HOST) \
|
|
-I$(MBGL)/config/$(HOST).gypi \
|
|
$(LIBS_$(HOST)) \
|
|
-Duv_static_libs= -Duv_ldflags= \
|
|
-Goutput_dir=.
|
|
|
|
$(MBGL)/config/%.gypi: $(MBGL) $(MBGL)/configure
|
|
make -C $(MBGL) config/$*.gypi
|
|
|
|
.PHONY: test
|
|
test: build
|
|
@`npm bin`/mocha -R spec
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf build
|
|
rm -f $(MBGL)/config/$(HOST).gypi
|