embedding/android/geckoview_example/Makefile.in
author J. Ryan Stinnett <jryans@gmail.com>
Fri, 16 Oct 2015 00:38:43 -0500
changeset 301213 34fb2f92a8ce1614ceeeca51d438e8248476f29d
parent 228408 7a22772c00f17a2e148c8499419f5d4e7a094176
permissions -rw-r--r--
Bug 1203159 - Update each product's DevTools inclusion. r=glandium A new configure option --with-devtools (which sets MOZ_DEVTOOLS) is added to control whether all DevTools, just the server, or no DevTools are included. This defaults to just the server. Applications should also include /devtools within their moz.build tree, so that DIST_SUBDIR is in effect for all DevTools files if it is used by the app.

PP_TARGETS = properties manifest

manifest = AndroidManifest.xml.in

include $(topsrcdir)/config/rules.mk

GARBAGE = \
	AndroidManifest.xml \
	proguard-project.txt \
	project.properties \
	ant.properties \
	build.xml \
	local.properties \
	geckoview_example.apk \
	$(NULL)

GARBAGE_DIRS = \
	assets \
	geckoview_library \
	gen \
	bin \
	libs \
	res \
	src \
	binaries \
	$(NULL)

ANDROID=$(ANDROID_TOOLS)/android

TARGET="android-$(ANDROID_TARGET_SDK)"

PACKAGE_DEPS = \
	assets/libxul.so \
	build.xml \
	src/org/mozilla/geckoviewexample/GeckoViewExample.java \
	$(CURDIR)/res/layout/main.xml \
	$(CURDIR)/AndroidManifest.xml \
	$(NULL)

$(CURDIR)/res/layout/main.xml: $(srcdir)/main.xml
	$(NSINSTALL) $(srcdir)/main.xml res/layout/

src/org/mozilla/geckoviewexample/GeckoViewExample.java: $(srcdir)/GeckoViewExample.java
	$(NSINSTALL) $(srcdir)/GeckoViewExample.java src/org/mozilla/geckoviewexample/

assets/libxul.so: $(DIST)/geckoview_library/geckoview_assets.zip FORCE
	$(UNZIP) -o $(DIST)/geckoview_library/geckoview_assets.zip

build.xml: $(CURDIR)/AndroidManifest.xml
	mv AndroidManifest.xml AndroidManifest.xml.save
	$(ANDROID) create project --name GeckoViewExample --target $(TARGET) --path $(CURDIR) --activity GeckoViewExample --package org.mozilla.geckoviewexample
	$(ANDROID) update project --target $(TARGET) --path $(CURDIR) --library $(DEPTH)/mobile/android/geckoview_library
	$(RM) $(CURDIR)/res/layout/main.xml
	$(NSINSTALL) $(srcdir)/main.xml res/layout/
	$(RM) AndroidManifest.xml
	mv AndroidManifest.xml.save AndroidManifest.xml
	echo jar.libs.dir=libs >> project.properties

bin/GeckoViewExample-debug.apk: $(PACKAGE_DEPS)
	ant debug

geckoview_example.apk: bin/GeckoViewExample-debug.apk
	cp $< $@

package: geckoview_example.apk FORCE