diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-23 21:33:17 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-23 21:33:17 -0700 |
commit | 1f8de2be5ce39d878d4fd9e3d77ea55c7dacd619 (patch) | |
tree | d379aa41afd312b4fcf3374e4f6154f71b64659e /Makefile | |
parent | d5840beb4719caab9e1e890796992182fa03bfae (diff) | |
download | qtlocation-mapboxgl-1f8de2be5ce39d878d4fd9e3d77ea55c7dacd619.tar.gz |
[build] Inline main.mk Android targets into Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 21 insertions, 16 deletions
@@ -24,8 +24,6 @@ else .mason: ; endif -RUN = +$(MAKE) -f scripts/main.mk - default: @printf "You must specify a valid target\n" @@ -146,27 +144,34 @@ idocument: #### Android targets ##################################################### -# Builds a particular android architecture. -android-lib-%: - $(RUN) PLATFORM=android SUBPLATFORM=$* Makefile/all +ANDROID_ENV = platform/android/scripts/toolchain.sh +ANDROID_ABIS = arm-v5 arm-v7 arm-v8 x86 x86-64 mips -# Builds the default Android library -.PHONY: android-lib -android-lib: android-lib-arm-v7 +define ANDROID_RULES +build/android-$1/config.gypi: platform/android/scripts/configure.sh .mason configure + $$(shell $(ANDROID_ENV) $1) ./configure $$< $$@ android $1 -# Builds the selected/default Android library -.PHONY: android -android: android-lib - cd platform/android && ./gradlew --parallel --max-workers=$(JOBS) assemble$(BUILDTYPE) +build/android-$1/Makefile: build/android-$1/config.gypi + $$(shell $(ANDROID_ENV) $1) deps/run_gyp platform/android/platform.gyp -I$$< \ + -Dcoverage= -Goutput_dir=. --depth=. --generator-output=build/android-$1 -f make-android -# Builds all android architectures for distribution. -.PHONY: apackage -apackage: android-lib-arm-v5 android-lib-arm-v7 android-lib-arm-v8 android-lib-x86 android-lib-x86-64 android-lib-mips - cd platform/android && ./gradlew --parallel-threads=$(JOBS) assemble$(BUILDTYPE) +android-lib-$1: build/android-$1/Makefile + $$(shell $(ANDROID_ENV) $1) $(MAKE) -j$(JOBS) -C build/android-$1 all + +apackage: android-lib-$1 +endef + +$(foreach abi,$(ANDROID_ABIS),$(eval $(call ANDROID_RULES,$(abi)))) + +android: android-lib-arm-v7 + cd platform/android && ./gradlew --parallel --max-workers=$(JOBS) assemble$(BUILDTYPE) test-android: cd platform/android && ./gradlew testReleaseUnitTest --continue +apackage: + cd platform/android && ./gradlew --parallel-threads=$(JOBS) assemble$(BUILDTYPE) + #### Node targets ##################################################### NODE_PRE_GYP = $(shell npm bin)/node-pre-gyp |