make meta-target for all iOS targets too and split up project.gyp
this will make it easier to add more targets to iOS builds in the future. It'll also help by having Xcode files named after the platform they're for, so it's easier to distinguish windows
This commit is contained in:
24
Makefile
24
Makefile
@@ -46,11 +46,11 @@ KIF:
|
||||
|
||||
.PRECIOUS: Makefile/project
|
||||
Makefile/project: config/$(HOST).gypi styles/styles SMCalloutView
|
||||
deps/run_gyp gyp/project.gyp $(CONFIG_$(HOST)) $(LIBS_$(HOST)) --generator-output=./build/$(HOST) -f make
|
||||
deps/run_gyp gyp/$(HOST).gyp $(CONFIG_$(HOST)) $(LIBS_$(HOST)) --generator-output=./build/$(HOST) -f make
|
||||
|
||||
.PRECIOUS: Xcode/project
|
||||
Xcode/project: config/$(HOST).gypi styles/styles SMCalloutView
|
||||
deps/run_gyp gyp/project.gyp $(CONFIG_$(HOST)) $(LIBS_$(HOST)) --generator-output=./build/$(HOST) -f xcode
|
||||
deps/run_gyp gyp/$(HOST).gyp $(CONFIG_$(HOST)) $(LIBS_$(HOST)) --generator-output=./build/$(HOST) -f xcode
|
||||
|
||||
|
||||
#### Library builds ############################################################
|
||||
@@ -77,7 +77,7 @@ test-%: test
|
||||
.PHONY: xtest
|
||||
xtest: XCPRETTY := $(shell ./scripts/xcpretty.sh)
|
||||
xtest: Xcode/project
|
||||
xcodebuild -project ./build/osx/gyp/project.xcodeproj -configuration $(BUILDTYPE) -target test -jobs $(JOBS) $(XCPRETTY)
|
||||
xcodebuild -project ./build/osx/gyp/osx.xcodeproj -configuration $(BUILDTYPE) -target test -jobs $(JOBS) $(XCPRETTY)
|
||||
|
||||
xtest-%: xtest
|
||||
./scripts/run_tests.sh "build/osx/Build/Products/$(BUILDTYPE)/test" --gtest_filter=$*
|
||||
@@ -94,11 +94,11 @@ run-osx: osx
|
||||
|
||||
.PHONY: xosx-proj xosx run-xosx
|
||||
xosx-proj: Xcode/project
|
||||
open ./build/osx/gyp/project.xcodeproj
|
||||
open ./build/osx/gyp/osx.xcodeproj
|
||||
|
||||
xosx: XCPRETTY := $(shell ./scripts/xcpretty.sh)
|
||||
xosx: Xcode/project
|
||||
xcodebuild -project ./build/osx/gyp/project.xcodeproj -configuration $(BUILDTYPE) -target osxapp -jobs $(JOBS) $(XCPRETTY)
|
||||
xcodebuild -project ./build/osx/gyp/osx.xcodeproj -configuration $(BUILDTYPE) -target osxapp -jobs $(JOBS) $(XCPRETTY)
|
||||
|
||||
run-xosx: xosx
|
||||
"gyp/build/$(BUILDTYPE)/Mapbox GL.app/Contents/MacOS/Mapbox GL"
|
||||
@@ -111,20 +111,20 @@ xproj: xosx-proj
|
||||
#### iOS application builds ####################################################
|
||||
|
||||
.PRECIOUS: Xcode/ios
|
||||
Xcode/ios: ios/app/mapboxgl-app.gyp config/ios.gypi styles/styles SMCalloutView
|
||||
deps/run_gyp ios/app/mapboxgl-app.gyp $(CONFIG_ios) $(LIBS_ios) --generator-output=./build/ios -f xcode
|
||||
Xcode/ios: gyp/ios.gyp config/ios.gypi styles/styles SMCalloutView
|
||||
deps/run_gyp gyp/ios.gyp $(CONFIG_ios) $(LIBS_ios) --generator-output=./build/ios -f xcode
|
||||
|
||||
.PHONY: ios-proj ios isim ipackage
|
||||
ios-proj: Xcode/ios
|
||||
open ./build/ios/ios/app/mapboxgl-app.xcodeproj
|
||||
open ./build/ios/gyp/ios.xcodeproj
|
||||
|
||||
ios: XCPRETTY := $(shell ./scripts/xcpretty.sh)
|
||||
ios: Xcode/ios
|
||||
xcodebuild -sdk iphoneos ARCHS="arm64 armv7 armv7s" PROVISIONING_PROFILE="2b532944-bf3d-4bf4-aa6c-a81676984ae8" -project ./build/ios/ios/app/mapboxgl-app.xcodeproj -configuration Release -target iosapp -jobs $(JOBS) $(XCPRETTY)
|
||||
xcodebuild -sdk iphoneos ARCHS="arm64 armv7 armv7s" PROVISIONING_PROFILE="2b532944-bf3d-4bf4-aa6c-a81676984ae8" -project ./build/ios/gyp/ios.xcodeproj -configuration Release -target iosapp -jobs $(JOBS) $(XCPRETTY)
|
||||
|
||||
isim: XCPRETTY := $(shell ./scripts/xcpretty.sh)
|
||||
isim: Xcode/ios
|
||||
xcodebuild -sdk iphonesimulator ARCHS="x86_64 i386" -project ./build/ios/ios/app/mapboxgl-app.xcodeproj -configuration Debug -target iosapp -jobs $(JOBS) $(XCPRETTY)
|
||||
xcodebuild -sdk iphonesimulator ARCHS="x86_64 i386" -project ./build/ios/gyp/ios.xcodeproj -configuration Debug -target iosapp -jobs $(JOBS) $(XCPRETTY)
|
||||
|
||||
ipackage: clean Xcode/ios
|
||||
./scripts/ios/package.sh
|
||||
@@ -148,7 +148,7 @@ run-linux: linux
|
||||
.PHONY: xlinux run-xlinux
|
||||
xlinux: XCPRETTY := $(shell ./scripts/xcpretty.sh)
|
||||
xlinux: Xcode/project
|
||||
xcodebuild -project ./build/osx/gyp/project.xcodeproj -configuration $(BUILDTYPE) -target linuxapp -jobs $(JOBS) $(XCPRETTY)
|
||||
xcodebuild -project ./build/osx/gyp/osx.xcodeproj -configuration $(BUILDTYPE) -target linuxapp -jobs $(JOBS) $(XCPRETTY)
|
||||
|
||||
run-xlinux: xlinux
|
||||
"gyp/build/$(BUILDTYPE)/mapbox-gl"
|
||||
@@ -191,7 +191,7 @@ render: Makefile/project
|
||||
|
||||
.PHONY: xrender run-xrender
|
||||
xrender: Xcode/project
|
||||
xcodebuild -project ./build/osx/gyp/project.xcodeproj -configuration $(BUILDTYPE) -target mbgl-render -jobs $(JOBS)
|
||||
xcodebuild -project ./build/osx/gyp/osx.xcodeproj -configuration $(BUILDTYPE) -target mbgl-render -jobs $(JOBS)
|
||||
|
||||
|
||||
##### Maintenace operations ####################################################
|
||||
|
||||
5
gyp/ios.gyp
Normal file
5
gyp/ios.gyp
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
'includes': [
|
||||
'../ios/app/mapboxgl-app.gypi',
|
||||
],
|
||||
}
|
||||
7
gyp/linux.gyp
Normal file
7
gyp/linux.gyp
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
'includes': [
|
||||
'../linux/mapboxgl-app.gypi',
|
||||
'../test/test.gypi',
|
||||
'../bin/render.gypi',
|
||||
],
|
||||
}
|
||||
8
gyp/osx.gyp
Normal file
8
gyp/osx.gyp
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
'includes': [
|
||||
'../macosx/mapboxgl-app.gypi',
|
||||
'../linux/mapboxgl-app.gypi',
|
||||
'../test/test.gypi',
|
||||
'../bin/render.gypi',
|
||||
],
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
'conditions': [
|
||||
['host == "osx"', {
|
||||
'includes': [
|
||||
'../macosx/mapboxgl-app.gypi',
|
||||
'../linux/mapboxgl-app.gypi',
|
||||
'../test/test.gypi',
|
||||
'../bin/render.gypi',
|
||||
]
|
||||
}],
|
||||
['host == "linux"', {
|
||||
'includes': [
|
||||
'../linux/mapboxgl-app.gypi',
|
||||
'../test/test.gypi',
|
||||
'../bin/render.gypi',
|
||||
]
|
||||
}],
|
||||
],
|
||||
}
|
||||
@@ -9,18 +9,18 @@
|
||||
'product_extension': 'app',
|
||||
'mac_bundle': 1,
|
||||
'mac_bundle_resources': [
|
||||
'<!@(find ./img -type f)',
|
||||
'<!@(find ../ios/app/img -type f)',
|
||||
'./features.geojson',
|
||||
'./Settings.bundle/'
|
||||
],
|
||||
|
||||
'dependencies': [
|
||||
'../../mbgl.gyp:bundle_styles',
|
||||
'../../mbgl.gyp:core',
|
||||
'../../mbgl.gyp:platform-<(platform_lib)',
|
||||
'../../mbgl.gyp:http-<(http_lib)',
|
||||
'../../mbgl.gyp:asset-<(asset_lib)',
|
||||
'../../mbgl.gyp:cache-<(cache_lib)',
|
||||
'../mbgl.gyp:bundle_styles',
|
||||
'../mbgl.gyp:core',
|
||||
'../mbgl.gyp:platform-<(platform_lib)',
|
||||
'../mbgl.gyp:http-<(http_lib)',
|
||||
'../mbgl.gyp:asset-<(asset_lib)',
|
||||
'../mbgl.gyp:cache-<(cache_lib)',
|
||||
],
|
||||
|
||||
'sources': [
|
||||
@@ -38,7 +38,7 @@
|
||||
'SDKROOT': 'iphoneos',
|
||||
'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
|
||||
'IPHONEOS_DEPLOYMENT_TARGET': '7.0',
|
||||
'INFOPLIST_FILE': 'app-info.plist',
|
||||
'INFOPLIST_FILE': '../ios/app/app-info.plist',
|
||||
'TARGETED_DEVICE_FAMILY': '1,2',
|
||||
'COMBINE_HIDPI_IMAGES': 'NO', # don't merge @2x.png images into .tiff files
|
||||
'CLANG_ENABLE_OBJC_ARC': 'YES',
|
||||
Reference in New Issue
Block a user