Dan Willemsen | 1684b32 | 2016-07-25 16:03:53 -0700 | [diff] [blame] | 1 | $(call record-module-type,SHARED_LIBRARY) |
Dmitriy Ivanov | 38bba06 | 2014-05-21 16:38:03 -0700 | [diff] [blame] | 2 | my_prefix := TARGET_ |
| 3 | include $(BUILD_SYSTEM)/multilib.mk |
| 4 | |
| 5 | ifndef my_module_multilib |
| 6 | # libraries default to building for both architecturess |
| 7 | my_module_multilib := both |
| 8 | endif |
| 9 | |
| 10 | ifeq ($(my_module_multilib),both) |
Colin Cross | d0378b3 | 2014-01-24 19:30:27 -0800 | [diff] [blame] | 11 | ifneq ($(LOCAL_MODULE_PATH),) |
| 12 | ifneq ($(TARGET_2ND_ARCH),) |
Dan Willemsen | 7cc88b7 | 2015-09-24 13:05:53 -0700 | [diff] [blame] | 13 | $(error $(LOCAL_MODULE): LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds, use LOCAL_MODULE_RELATIVE_PATH instead) |
Colin Cross | d0378b3 | 2014-01-24 19:30:27 -0800 | [diff] [blame] | 14 | endif |
| 15 | endif |
| 16 | |
| 17 | ifneq ($(LOCAL_UNSTRIPPED_PATH),) |
| 18 | ifneq ($(TARGET_2ND_ARCH),) |
Dan Willemsen | 7cc88b7 | 2015-09-24 13:05:53 -0700 | [diff] [blame] | 19 | $(error $(LOCAL_MODULE): LOCAL_UNSTRIPPED_PATH for shared libraries is unsupported in multiarch builds) |
Colin Cross | d0378b3 | 2014-01-24 19:30:27 -0800 | [diff] [blame] | 20 | endif |
| 21 | endif |
Dmitriy Ivanov | 38bba06 | 2014-05-21 16:38:03 -0700 | [diff] [blame] | 22 | endif # my_module_multilib == both |
Colin Cross | d0378b3 | 2014-01-24 19:30:27 -0800 | [diff] [blame] | 23 | |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 24 | |
Ying Wang | dd814bf | 2014-01-17 16:17:28 -0800 | [diff] [blame] | 25 | LOCAL_2ND_ARCH_VAR_PREFIX := |
Colin Cross | 8e40412 | 2014-02-06 14:45:37 -0800 | [diff] [blame] | 26 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
| 27 | |
| 28 | ifeq ($(my_module_arch_supported),true) |
Ying Wang | 4d2cc66 | 2014-01-16 12:36:34 -0800 | [diff] [blame] | 29 | include $(BUILD_SYSTEM)/shared_library_internal.mk |
Ying Wang | dd814bf | 2014-01-17 16:17:28 -0800 | [diff] [blame] | 30 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 31 | |
Ying Wang | 4d2cc66 | 2014-01-16 12:36:34 -0800 | [diff] [blame] | 32 | ifdef TARGET_2ND_ARCH |
Colin Cross | 8e40412 | 2014-02-06 14:45:37 -0800 | [diff] [blame] | 33 | |
| 34 | LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) |
| 35 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
| 36 | |
| 37 | ifeq ($(my_module_arch_supported),true) |
Ying Wang | dd814bf | 2014-01-17 16:17:28 -0800 | [diff] [blame] | 38 | # Build for TARGET_2ND_ARCH |
Ying Wang | 4d2cc66 | 2014-01-16 12:36:34 -0800 | [diff] [blame] | 39 | OVERRIDE_BUILT_MODULE_PATH := |
| 40 | LOCAL_BUILT_MODULE := |
| 41 | LOCAL_INSTALLED_MODULE := |
Ying Wang | 4d2cc66 | 2014-01-16 12:36:34 -0800 | [diff] [blame] | 42 | LOCAL_INTERMEDIATE_TARGETS := |
| 43 | |
Ying Wang | 4d2cc66 | 2014-01-16 12:36:34 -0800 | [diff] [blame] | 44 | include $(BUILD_SYSTEM)/shared_library_internal.mk |
Colin Cross | 8e40412 | 2014-02-06 14:45:37 -0800 | [diff] [blame] | 45 | |
| 46 | endif |
| 47 | |
Ying Wang | 4d2cc66 | 2014-01-16 12:36:34 -0800 | [diff] [blame] | 48 | LOCAL_2ND_ARCH_VAR_PREFIX := |
| 49 | |
Ying Wang | dd814bf | 2014-01-17 16:17:28 -0800 | [diff] [blame] | 50 | endif # TARGET_2ND_ARCH |
Colin Cross | 8e40412 | 2014-02-06 14:45:37 -0800 | [diff] [blame] | 51 | |
| 52 | my_module_arch_supported := |
Ying Wang | bf4a8d3 | 2014-02-20 13:54:43 -0800 | [diff] [blame] | 53 | |
| 54 | ########################################################### |
| 55 | ## Copy headers to the install tree |
| 56 | ########################################################### |
| 57 | include $(BUILD_COPY_HEADERS) |