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: INSTALL_TARGETS += GECKOVIEW_LIBRARY michael@0: GECKOVIEW_LIBRARY_DEST = $(CURDIR) michael@0: GECKOVIEW_LIBRARY_FILES := \ michael@0: .classpath \ michael@0: .project \ michael@0: build.xml \ michael@0: $(NULL) michael@0: michael@0: PP_TARGETS = properties manifest project michael@0: michael@0: properties = local.properties.in michael@0: project = project.properties.in michael@0: manifest = AndroidManifest.xml.in michael@0: michael@0: GARBAGE = $(GECKOVIEW_LIBRARY_FILES) local.properties project.properties AndroidManifest.xml michael@0: michael@0: GARBAGE_DIRS = \ michael@0: bin \ michael@0: libs \ michael@0: src \ michael@0: .deps \ michael@0: gen \ michael@0: res \ michael@0: $(NULL) michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: _ABS_DIST = $(abspath $(DIST)) michael@0: michael@0: package: local.properties project.properties AndroidManifest.xml FORCE michael@0: # Make directory for the zips michael@0: $(MKDIR) -p $(_ABS_DIST)/geckoview_library michael@0: michael@0: # Zip the assets into $(DIST)/geckoview_library/geckoview_assets.zip michael@0: cd $(_ABS_DIST)/$(MOZ_APP_NAME) && \ michael@0: $(ZIP) -q -r $(_ABS_DIST)/geckoview_library/geckoview_assets.zip assets michael@0: michael@0: # Make empty directories to fit an Android project structure michael@0: $(MKDIR) -p bin gen libs/$(ANDROID_CPU_ARCH) src michael@0: michael@0: # Copy the JARs, except for the jar containing org.mozilla.gecko.R. michael@0: # org.mozilla.gecko.R will be provided by the embedding application. michael@0: cp $(DEPTH)/mobile/android/base/*.jar libs/ michael@0: $(RM) libs/gecko-R.jar michael@0: michael@0: # Copy the SOs michael@0: cp $(_ABS_DIST)/bin/libmozglue.so $(_ABS_DIST)/bin/lib/libplugin-container.so libs/$(ANDROID_CPU_ARCH)/ michael@0: michael@0: # Copy the resources michael@0: $(RM) -rf res michael@0: $(MKDIR) -p res michael@0: cd res && \ michael@0: $(UNZIP) -q -u -o $(_ABS_DIST)/bin/geckoview_resources.zip michael@0: michael@0: # Zip the directory michael@0: cd $(DEPTH)/mobile/android && \ michael@0: $(ZIP) -q -r $(_ABS_DIST)/geckoview_library/geckoview_library.zip geckoview_library -x geckoview_library/backend.mk geckoview_library/Makefile