1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/build.mk Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 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 +include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk 1.9 + 1.10 +installer: 1.11 + @$(MAKE) -C mobile/android/installer installer 1.12 + 1.13 +package: 1.14 + @$(MAKE) -C mobile/android/installer 1.15 + 1.16 +ifeq ($(OS_TARGET),Android) 1.17 +ifneq ($(MOZ_ANDROID_INSTALL_TARGET),) 1.18 +ANDROID_SERIAL = $(MOZ_ANDROID_INSTALL_TARGET) 1.19 +endif 1.20 +ifneq ($(ANDROID_SERIAL),) 1.21 +export ANDROID_SERIAL 1.22 +else 1.23 +# Determine if there's more than one device connected 1.24 +android_devices=$(filter device,$(shell $(ADB) devices)) 1.25 +ifeq ($(android_devices),) 1.26 +install:: 1.27 + @echo 'No devices are connected. Connect a device or start an emulator.' 1.28 + @exit 1 1.29 +else 1.30 +ifneq ($(android_devices),device) 1.31 +install:: 1.32 + @echo 'Multiple devices are connected. Define ANDROID_SERIAL to specify the install target.' 1.33 + $(ADB) devices 1.34 + @exit 1 1.35 +endif 1.36 +endif 1.37 +endif 1.38 + 1.39 +install:: 1.40 + $(ADB) install -r $(DIST)/$(PKG_PATH)$(PKG_BASENAME).apk 1.41 +else 1.42 + @echo 'Mobile can't be installed directly.' 1.43 + @exit 1 1.44 +endif 1.45 + 1.46 +deb: package 1.47 + @$(MAKE) -C mobile/android/installer deb 1.48 + 1.49 +upload:: 1.50 + @$(MAKE) -C mobile/android/installer upload 1.51 + 1.52 +ifdef ENABLE_TESTS 1.53 +# Implemented in testing/testsuite-targets.mk 1.54 + 1.55 +mochitest-browser-chrome: 1.56 + $(RUN_MOCHITEST) --browser-chrome 1.57 + $(CHECK_TEST_ERROR) 1.58 + 1.59 +mochitest:: mochitest-browser-chrome 1.60 + 1.61 +.PHONY: mochitest-browser-chrome 1.62 +endif 1.63 + 1.64 +ifeq ($(OS_TARGET),Linux) 1.65 +deb: installer 1.66 +endif