1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/config/android-common.mk Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +# Ensure JAVA_CLASSPATH and ANDROID_SDK are defined before including this file. 1.9 +# We use common android defaults for boot class path and java version. 1.10 +ifndef ANDROID_SDK 1.11 + $(error ANDROID_SDK must be defined before including android-common.mk) 1.12 +endif 1.13 + 1.14 +ifndef JAVA_CLASSPATH 1.15 + $(error JAVA_CLASSPATH must be defined before including android-common.mk) 1.16 +endif 1.17 + 1.18 +# DEBUG_JARSIGNER always debug signs. 1.19 +DEBUG_JARSIGNER=$(PYTHON) $(abspath $(topsrcdir)/mobile/android/debug_sign_tool.py) \ 1.20 + --keytool=$(KEYTOOL) \ 1.21 + --jarsigner=$(JARSIGNER) \ 1.22 + $(NULL) 1.23 + 1.24 +# For Android, this defaults to $(ANDROID_SDK)/android.jar 1.25 +ifndef JAVA_BOOTCLASSPATH 1.26 + JAVA_BOOTCLASSPATH = $(ANDROID_SDK)/android.jar:$(ANDROID_COMPAT_LIB) 1.27 +endif 1.28 + 1.29 +# For Android, we default to 1.5 1.30 +ifndef JAVA_VERSION 1.31 + JAVA_VERSION = 1.5 1.32 +endif 1.33 + 1.34 +JAVAC_FLAGS = \ 1.35 + -target $(JAVA_VERSION) \ 1.36 + -source $(JAVA_VERSION) \ 1.37 + -classpath $(JAVA_CLASSPATH) \ 1.38 + -bootclasspath $(JAVA_BOOTCLASSPATH) \ 1.39 + -encoding UTF8 \ 1.40 + -g:source,lines \ 1.41 + -Werror \ 1.42 + $(NULL)