summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-18 17:38:51 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-19 16:28:30 -0700
commit2d33ae5ed77cbea3dc7352c23fa6a6fa91dc8a02 (patch)
treed838d39e7dd58ee0c72530af2946371e24a207cd /Makefile
parent24a9d4794483ad3dfebfbbcea6c4330c779a4c48 (diff)
downloadqtlocation-mapboxgl-2d33ae5ed77cbea3dc7352c23fa6a6fa91dc8a02.tar.gz
[ios, osx] Eliminate use of main.mk
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 27 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 8e83120cae..2a8e23b941 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,13 @@ else
$(error Cannot determine host platform)
endif
+ifneq (,$(wildcard .git/.))
+.mason:
+ git submodule update --init
+else
+.mason: ;
+endif
+
RUN = +$(MAKE) -f scripts/main.mk
default:
@@ -16,12 +23,19 @@ default:
#### OS X targets ##############################################################
-OSX_PROJ_PATH = build/osx-x86_64/platform/osx/platform.xcodeproj
+OSX_OUTPUT_PATH = build/osx-x86_64
+OSX_PROJ_PATH = $(OSX_OUTPUT_PATH)/platform/osx/platform.xcodeproj
OSX_WORK_PATH = platform/osx/osx.xcworkspace
OSX_DERIVED_DATA_PATH = build/DerivedData/osx
-$(OSX_PROJ_PATH): platform/osx/platform.gyp platform/osx/scripts/configure.sh mbgl.gypi test/test.gypi bin/*.gypi
- $(RUN) PLATFORM=osx Xcode/__project__
+$(OSX_OUTPUT_PATH)/config.gypi: platform/osx/scripts/configure.sh .mason configure
+ MASON_PLATFORM=osx ./configure $< $@
+
+$(OSX_OUTPUT_PATH)/mbgl.xcconfig: $(OSX_OUTPUT_PATH)/config.gypi
+ ./scripts/export-xcconfig.py $< $@
+
+$(OSX_PROJ_PATH): platform/osx/platform.gyp $(OSX_OUTPUT_PATH)/config.gypi $(OSX_OUTPUT_PATH)/mbgl.xcconfig mbgl.gypi test/test.gypi bin/*.gypi
+ ./deps/run_gyp -f xcode --depth=. --generator-output=$(OSX_OUTPUT_PATH) $<
osx: $(OSX_PROJ_PATH)
set -o pipefail && xcodebuild \
@@ -42,12 +56,19 @@ test-osx: osx node_modules/express
#### iOS targets ##############################################################
-IOS_PROJ_PATH = build/ios-all/platform/ios/platform.xcodeproj
+IOS_OUTPUT_PATH = build/ios-all
+IOS_PROJ_PATH = $(IOS_OUTPUT_PATH)/platform/ios/platform.xcodeproj
IOS_WORK_PATH = platform/ios/ios.xcworkspace
IOS_DERIVED_DATA_PATH = build/DerivedData/ios
-$(IOS_PROJ_PATH): platform/ios/platform.gyp platform/ios/scripts/configure.sh mbgl.gypi test/test.gypi
- $(RUN) PLATFORM=ios Xcode/__project__
+$(IOS_OUTPUT_PATH)/config.gypi: platform/ios/scripts/configure.sh .mason configure
+ MASON_PLATFORM=ios ./configure $< $@
+
+$(IOS_OUTPUT_PATH)/mbgl.xcconfig: $(IOS_OUTPUT_PATH)/config.gypi
+ ./scripts/export-xcconfig.py $< $@
+
+$(IOS_PROJ_PATH): platform/ios/platform.gyp $(IOS_OUTPUT_PATH)/config.gypi $(IOS_OUTPUT_PATH)/mbgl.xcconfig mbgl.gypi test/test.gypi
+ ./deps/run_gyp -f xcode --depth=. --generator-output=$(IOS_OUTPUT_PATH) $<
ios: $(IOS_PROJ_PATH)
set -o pipefail && xcodebuild \