blob: a4500926937392e5f452eeb38443297cfda9b51d [file] [log] [blame]
Dan Willemsen1684b322016-07-25 16:03:53 -07001$(call record-module-type,STATIC_LIBRARY)
Dan Willemsen084c6ef2020-01-24 13:21:21 -08002ifdef LOCAL_IS_HOST_MODULE
3 $(call pretty-error,BUILD_STATIC_LIBRARY is incompatible with LOCAL_IS_HOST_MODULE. Use BUILD_HOST_STATIC_LIBRARY instead)
4endif
Ying Wang6feb6d52014-04-17 10:03:35 -07005my_prefix := TARGET_
Colin Crosse6e48f62014-03-21 12:29:32 -07006include $(BUILD_SYSTEM)/multilib.mk
7
8ifndef my_module_multilib
9# libraries default to building for both architecturess
10my_module_multilib := both
11endif
12
Ying Wangdd814bf2014-01-17 16:17:28 -080013LOCAL_2ND_ARCH_VAR_PREFIX :=
Colin Cross8e404122014-02-06 14:45:37 -080014include $(BUILD_SYSTEM)/module_arch_supported.mk
15
16ifeq ($(my_module_arch_supported),true)
Ying Wang6ef65192014-01-15 16:02:16 -080017include $(BUILD_SYSTEM)/static_library_internal.mk
Ying Wangdd814bf2014-01-17 16:17:28 -080018endif
The Android Open Source Project88b60792009-03-03 19:28:42 -080019
Ying Wang6ef65192014-01-15 16:02:16 -080020ifdef TARGET_2ND_ARCH
Colin Cross8e404122014-02-06 14:45:37 -080021
22LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
23include $(BUILD_SYSTEM)/module_arch_supported.mk
24
25ifeq ($(my_module_arch_supported),true)
Ying Wangdd814bf2014-01-17 16:17:28 -080026# Build for TARGET_2ND_ARCH
Ying Wang6ef65192014-01-15 16:02:16 -080027LOCAL_BUILT_MODULE :=
28LOCAL_INSTALLED_MODULE :=
Ying Wang6ef65192014-01-15 16:02:16 -080029LOCAL_INTERMEDIATE_TARGETS :=
The Android Open Source Project88b60792009-03-03 19:28:42 -080030
Ying Wang6ef65192014-01-15 16:02:16 -080031include $(BUILD_SYSTEM)/static_library_internal.mk
Colin Cross8e404122014-02-06 14:45:37 -080032
33endif
34
Ying Wang6ef65192014-01-15 16:02:16 -080035LOCAL_2ND_ARCH_VAR_PREFIX :=
36
Ying Wangdd814bf2014-01-17 16:17:28 -080037endif # TARGET_2ND_ARCH
Colin Cross8e404122014-02-06 14:45:37 -080038
39my_module_arch_supported :=
Ying Wangbf4a8d32014-02-20 13:54:43 -080040
41###########################################################
42## Copy headers to the install tree
43###########################################################
Dan Willemsen66d21d42020-01-27 19:26:02 -080044ifdef LOCAL_COPY_HEADERS
Dan Willemsen97ec8122020-02-19 18:06:54 -080045$(if $(filter true,$(BUILD_BROKEN_USES_BUILD_COPY_HEADERS)),\
46 $(call pretty-warning,LOCAL_COPY_HEADERS is deprecated. See $(CHANGES_URL)#copy_headers),\
47 $(call pretty-error,LOCAL_COPY_HEADERS is obsolete. See $(CHANGES_URL)#copy_headers))
Dan Willemsen66d21d42020-01-27 19:26:02 -080048include $(BUILD_SYSTEM)/copy_headers.mk
49endif