michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # Ensure JAVA_CLASSPATH and ANDROID_SDK are defined before including this file. michael@0: # We use common android defaults for boot class path and java version. michael@0: ifndef ANDROID_SDK michael@0: $(error ANDROID_SDK must be defined before including android-common.mk) michael@0: endif michael@0: michael@0: ifndef JAVA_CLASSPATH michael@0: $(error JAVA_CLASSPATH must be defined before including android-common.mk) michael@0: endif michael@0: michael@0: # DEBUG_JARSIGNER always debug signs. michael@0: DEBUG_JARSIGNER=$(PYTHON) $(abspath $(topsrcdir)/mobile/android/debug_sign_tool.py) \ michael@0: --keytool=$(KEYTOOL) \ michael@0: --jarsigner=$(JARSIGNER) \ michael@0: $(NULL) michael@0: michael@0: # For Android, this defaults to $(ANDROID_SDK)/android.jar michael@0: ifndef JAVA_BOOTCLASSPATH michael@0: JAVA_BOOTCLASSPATH = $(ANDROID_SDK)/android.jar:$(ANDROID_COMPAT_LIB) michael@0: endif michael@0: michael@0: # For Android, we default to 1.5 michael@0: ifndef JAVA_VERSION michael@0: JAVA_VERSION = 1.5 michael@0: endif michael@0: michael@0: JAVAC_FLAGS = \ michael@0: -target $(JAVA_VERSION) \ michael@0: -source $(JAVA_VERSION) \ michael@0: -classpath $(JAVA_CLASSPATH) \ michael@0: -bootclasspath $(JAVA_BOOTCLASSPATH) \ michael@0: -encoding UTF8 \ michael@0: -g:source,lines \ michael@0: -Werror \ michael@0: $(NULL)