summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--binding.gyp4
-rw-r--r--scripts/main.mk14
3 files changed, 20 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 44fdbd5678..166fea9d81 100644
--- a/Makefile
+++ b/Makefile
@@ -84,6 +84,9 @@ apackage: android-lib-mips
.PHONY: node
node: ; $(RUN) HTTP=none ASSET=none CACHE=none Makefile/node
+.PHONY: xnode
+xnode: ; $(RUN) HTTP=none ASSET=none CACHE=none Xcode/node
+
.PHONY: test
test: ; $(RUN) Makefile/test
test-%: ; $(RUN) test-$*
diff --git a/binding.gyp b/binding.gyp
index e9f0d6edcd..13114cd424 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -10,7 +10,9 @@
'mbgl.gyp:headless-<(headless_lib)',
],
- 'include_dirs': [ "<!(node -e \"require('nan')\")" ],
+ 'include_dirs': [
+ "<!(node -e \"require('nan')\")",
+ ],
'sources': [
'platform/node/src/node_mapbox_gl_native.cpp',
diff --git a/scripts/main.mk b/scripts/main.mk
index 3639a780a7..bdd861fecb 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -97,6 +97,10 @@ node/configure:
$(QUIET)$(ENV) $(NODE_PRE_GYP) configure --clang -- \
$(GYP_FLAGS) -Dlibuv_ldflags= -Dlibuv_static_libs=
+node/xproj:
+ $(QUIET)$(ENV) $(NODE_PRE_GYP) configure --clang -- \
+ $(GYP_FLAGS) -f xcode -Dlibuv_ldflags= -Dlibuv_static_libs=
+
Makefile/node: Makefile/__project__ node/configure
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target node...$(FORMAT_END)\n"
$(QUIET)$(ENV) $(NODE_PRE_GYP) build --clang -- \
@@ -106,6 +110,16 @@ Makefile/%: Makefile/__project__
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target $*...$(FORMAT_END)\n"
$(QUIET)$(ENV) $(MAKE) -C build/$(HOST_SLUG) BUILDTYPE=$(BUILDTYPE) $*
+Xcode/node: Xcode/__project__ node/xproj
+ @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target node...$(FORMAT_END)\n"
+ $(QUIET)$(ENV) set -o pipefail && xcodebuild \
+ $(XCODEBUILD_ARGS) \
+ -project ./build/binding.xcodeproj \
+ -configuration $(BUILDTYPE) \
+ -target mapbox-gl-native \
+ -jobs $(JOBS) \
+ $(XCPRETTY)
+
Xcode/%: Xcode/__project__
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target $*...$(FORMAT_END)\n"
$(QUIET)$(ENV) set -o pipefail && xcodebuild \