Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | PP_TARGETS = properties manifest |
michael@0 | 2 | |
michael@0 | 3 | manifest = AndroidManifest.xml.in |
michael@0 | 4 | |
michael@0 | 5 | include $(topsrcdir)/config/rules.mk |
michael@0 | 6 | |
michael@0 | 7 | GARBAGE = \ |
michael@0 | 8 | AndroidManifest.xml \ |
michael@0 | 9 | proguard-project.txt \ |
michael@0 | 10 | project.properties \ |
michael@0 | 11 | ant.properties \ |
michael@0 | 12 | build.xml \ |
michael@0 | 13 | local.properties \ |
michael@0 | 14 | geckoview_example.apk \ |
michael@0 | 15 | $(NULL) |
michael@0 | 16 | |
michael@0 | 17 | GARBAGE_DIRS = \ |
michael@0 | 18 | assets \ |
michael@0 | 19 | geckoview_library \ |
michael@0 | 20 | gen \ |
michael@0 | 21 | bin \ |
michael@0 | 22 | libs \ |
michael@0 | 23 | res \ |
michael@0 | 24 | src \ |
michael@0 | 25 | binaries \ |
michael@0 | 26 | $(NULL) |
michael@0 | 27 | |
michael@0 | 28 | ANDROID=$(ANDROID_SDK)/../../tools/android |
michael@0 | 29 | |
michael@0 | 30 | TARGET="android-$(ANDROID_TARGET_SDK)" |
michael@0 | 31 | |
michael@0 | 32 | PACKAGE_DEPS = \ |
michael@0 | 33 | assets/libxul.so \ |
michael@0 | 34 | build.xml \ |
michael@0 | 35 | src/org/mozilla/geckoviewexample/GeckoViewExample.java \ |
michael@0 | 36 | $(CURDIR)/res/layout/main.xml \ |
michael@0 | 37 | $(CURDIR)/AndroidManifest.xml \ |
michael@0 | 38 | $(NULL) |
michael@0 | 39 | |
michael@0 | 40 | $(CURDIR)/res/layout/main.xml: $(srcdir)/main.xml |
michael@0 | 41 | $(NSINSTALL) $(srcdir)/main.xml res/layout/ |
michael@0 | 42 | |
michael@0 | 43 | src/org/mozilla/geckoviewexample/GeckoViewExample.java: $(srcdir)/GeckoViewExample.java |
michael@0 | 44 | $(NSINSTALL) $(srcdir)/GeckoViewExample.java src/org/mozilla/geckoviewexample/ |
michael@0 | 45 | |
michael@0 | 46 | assets/libxul.so: $(DIST)/geckoview_library/geckoview_assets.zip FORCE |
michael@0 | 47 | $(UNZIP) -o $(DIST)/geckoview_library/geckoview_assets.zip |
michael@0 | 48 | |
michael@0 | 49 | build.xml: $(CURDIR)/AndroidManifest.xml |
michael@0 | 50 | mv AndroidManifest.xml AndroidManifest.xml.save |
michael@0 | 51 | $(ANDROID) create project --name GeckoViewExample --target $(TARGET) --path $(CURDIR) --activity GeckoViewExample --package org.mozilla.geckoviewexample |
michael@0 | 52 | $(ANDROID) update project --target $(TARGET) --path $(CURDIR) --library $(DEPTH)/mobile/android/geckoview_library |
michael@0 | 53 | $(RM) $(CURDIR)/res/layout/main.xml |
michael@0 | 54 | $(NSINSTALL) $(srcdir)/main.xml res/layout/ |
michael@0 | 55 | $(RM) AndroidManifest.xml |
michael@0 | 56 | mv AndroidManifest.xml.save AndroidManifest.xml |
michael@0 | 57 | echo jar.libs.dir=libs >> project.properties |
michael@0 | 58 | |
michael@0 | 59 | bin/GeckoViewExample-debug.apk: $(PACKAGE_DEPS) |
michael@0 | 60 | ant debug |
michael@0 | 61 | |
michael@0 | 62 | geckoview_example.apk: bin/GeckoViewExample-debug.apk |
michael@0 | 63 | cp $< $@ |
michael@0 | 64 | |
michael@0 | 65 | package: geckoview_example.apk FORCE |