diff options
-rw-r--r-- | Makefile | 33 | ||||
-rw-r--r-- | platform/ios/platform.gyp | 2 | ||||
-rw-r--r-- | platform/osx/platform.gyp | 2 | ||||
-rw-r--r-- | scripts/main.mk | 17 |
4 files changed, 31 insertions, 23 deletions
@@ -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 \ diff --git a/platform/ios/platform.gyp b/platform/ios/platform.gyp index 6ef980cf08..0f744691c4 100644 --- a/platform/ios/platform.gyp +++ b/platform/ios/platform.gyp @@ -2,8 +2,10 @@ 'variables': { 'loop_lib': 'darwin', 'headless_lib': 'eagl', + 'coverage': 0, }, 'includes': [ + '../../build/ios-all/config.gypi', '../../mbgl.gypi', '../../test/test.gypi', ], diff --git a/platform/osx/platform.gyp b/platform/osx/platform.gyp index ed6b66ab73..6279f8ca6a 100644 --- a/platform/osx/platform.gyp +++ b/platform/osx/platform.gyp @@ -2,8 +2,10 @@ 'variables': { 'loop_lib': 'darwin', 'headless_lib': 'cgl', + 'coverage': 0, }, 'includes': [ + '../../build/osx-x86_64/config.gypi', '../../mbgl.gypi', '../../test/test.gypi', '../../bin/glfw.gypi', diff --git a/scripts/main.mk b/scripts/main.mk index 8791f3a2df..4c7f0d4794 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -77,13 +77,6 @@ Makefile/__project__: $(PLATFORM_CONFIG_OUTPUT) @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Recreating project...$(FORMAT_END)\n" $(ENV) deps/run_gyp platform/$(PLATFORM)/platform.gyp $(GYP_FLAGS) -f make$(GYP_FLAVOR_SUFFIX) -.PHONY: Xcode/__project__ -Xcode/__project__: $(PLATFORM_CONFIG_OUTPUT) - @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Exporting gyp variables to xcconfig...$(FORMAT_END)\n" - $(ENV) ./scripts/export-xcconfig.py $(PLATFORM_CONFIG_OUTPUT) $(PLATFORM_OUTPUT)/mbgl.xcconfig - @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Recreating project...$(FORMAT_END)\n" - $(ENV) deps/run_gyp platform/$(PLATFORM)/platform.gyp $(GYP_FLAGS) -f xcode$(GYP_FLAVOR_SUFFIX) - .PHONY: Ninja/__project__ Ninja/__project__: $(PLATFORM_CONFIG_OUTPUT) @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Recreating project...$(FORMAT_END)\n" @@ -108,16 +101,6 @@ Makefile/%: Makefile/__project__ @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target $*...$(FORMAT_END)\n" $(ENV) $(MAKE) -j$(JOBS) -C $(PLATFORM_OUTPUT) BUILDTYPE=$(BUILDTYPE) $* -Xcode/%: Xcode/__project__ - @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target $*...$(FORMAT_END)\n" - set -o pipefail && xcodebuild \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGN_IDENTITY= \ - -project $(PLATFORM_OUTPUT)/platform/$(PLATFORM)/platform.xcodeproj \ - -configuration $(BUILDTYPE) \ - -target $* \ - -jobs $(JOBS) | xcpretty - Ninja/%: Ninja/__project__ @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target $*...$(FORMAT_END)\n" $(ENV) deps/ninja/ninja-$(PLATFORM) -C $(PLATFORM_OUTPUT)/$(BUILDTYPE) $* |