gecko/mobile/android/geckoview_library/Makefile.in
Nick Alexander c50facf8d3 Bug 978587 - Make GeckoView package org.mozilla.gecko; don't include org.mozilla.gecko.R. r=blassey
This builds a new Java JAR containing only org.mozilla.gecko.R.  This
new JAR file is included in Fennec, but not included in
geckoview_library.  (Usually ant, gradle, or Eclipse arranges to produce
org.mozilla.gecko.R but not include it in the classes.jar output as part
of a library project.  This mimics that.)

Changing the GeckoView package to org.mozilla.gecko declares to
consuming applications that they should produce org.mozilla.gecko.R,
replacing what was removed above (but with correct resource IDs).
2014-03-05 08:57:09 -08:00

64 lines
1.8 KiB
Makefile

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
INSTALL_TARGETS += GECKOVIEW_LIBRARY
GECKOVIEW_LIBRARY_DEST = $(CURDIR)
GECKOVIEW_LIBRARY_FILES := \
.classpath \
.project \
AndroidManifest.xml \
project.properties \
build.xml \
$(NULL)
PP_TARGETS = properties
properties = local.properties.in
properties_PATH = .
properties_deps := $(patsubst %.in,%,$(properties))
GARBAGE = $(GECKOVIEW_LIBRARY_FILES) $(properties_deps)
GARBAGE_DIRS = \
bin \
libs \
src \
.deps \
gen \
res \
$(NULL)
include $(topsrcdir)/config/rules.mk
_ABS_DIST = $(abspath $(DIST))
package: $(properties_deps) FORCE
# Make directory for the zips
$(MKDIR) -p $(_ABS_DIST)/geckoview_library
# Zip the assets into $(DIST)/geckoview_library/geckoview_assets.zip
cd $(_ABS_DIST)/fennec && \
$(ZIP) -q -r $(_ABS_DIST)/geckoview_library/geckoview_assets.zip assets
# Make empty directories to fit an Android project structure
$(MKDIR) -p bin gen libs/$(ANDROID_CPU_ARCH) src
# Copy the JARs, except for the jar containing org.mozilla.gecko.R.
# org.mozilla.gecko.R will be provided by the embedding application.
cp $(DEPTH)/mobile/android/base/*.jar libs/
$(RM) libs/gecko-R.jar
# Copy the SOs
cp $(_ABS_DIST)/bin/libmozglue.so $(_ABS_DIST)/bin/lib/libplugin-container.so libs/$(ANDROID_CPU_ARCH)/
# Copy the resources
$(RM) -rf res
$(MKDIR) -p res
cd res && \
$(UNZIP) -q -u -o $(_ABS_DIST)/bin/geckoview_resources.zip
# Zip the directory
cd $(DEPTH)/mobile/android && \
$(ZIP) -q -r $(_ABS_DIST)/geckoview_library/geckoview_library.zip geckoview_library -x geckoview_library/backend.mk geckoview_library/Makefile