2014-02-06 23:45:37 +01:00
|
|
|
# We don't automatically set up rules to build packages for both
|
|
|
|
# TARGET_ARCH and TARGET_2ND_ARCH.
|
|
|
|
# By default, an package is built for TARGET_ARCH.
|
2014-03-21 20:29:32 +01:00
|
|
|
# To build it for TARGET_2ND_ARCH in a 64bit product, use "LOCAL_MULTILIB := 32".
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/multilib.mk
|
|
|
|
|
|
|
|
ifndef my_module_multilib
|
|
|
|
# packages default to building for either architecture,
|
|
|
|
# the first if its supported, otherwise the second.
|
|
|
|
my_module_multilib := both
|
|
|
|
endif
|
Add an inherit-package macro to the build system.
This lets you use the source code from one apk to build a new one
with a new module name, a new android package name and optionally,
a new certificate.
To use this, in a makefile, add this:
$(call inherit-package, \
packages/apps/Music/Android.mk, \
Music, \
MusicFork, \
my_cert, \
com.example.music)
You don't need the LOCAL_PATH and CLEAR_VARS stuff. It will override
only the packages that are defined in the makefile name you give, but
if other modules of other types are defined, you will get an error
saying that it's defined twice. In that case, you need to move the
duplicate library (for example a .so) out into a different makefile.
A LOCAL_OVERRIDES_PACKAGES entry is automatically created for the
forked app.
2010-02-05 02:37:21 +01:00
|
|
|
|
2014-02-04 20:16:16 +01:00
|
|
|
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
|
|
|
|
|
2014-03-21 20:29:32 +01:00
|
|
|
# check if first arch is supported
|
2014-02-06 23:45:37 +01:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
2014-03-21 20:29:32 +01:00
|
|
|
# first arch is supported
|
2014-02-06 23:45:37 +01:00
|
|
|
include $(BUILD_SYSTEM)/package_internal.mk
|
|
|
|
else ifneq (,$(TARGET_2ND_ARCH))
|
|
|
|
# check if secondary arch is supported
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
|
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
|
|
|
# secondary arch is supported
|
|
|
|
include $(BUILD_SYSTEM)/package_internal.mk
|
2012-05-25 06:05:19 +02:00
|
|
|
endif
|
2014-02-06 23:45:37 +01:00
|
|
|
endif # TARGET_2ND_ARCH
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2014-02-06 23:45:37 +01:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
2014-02-04 20:16:16 +01:00
|
|
|
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=
|
|
|
|
|
2014-02-06 23:45:37 +01:00
|
|
|
my_module_arch_supported :=
|