Merge "Include $(BUILD_COPY_HEADERS) in upper-level makefiles"
diff --git a/core/binary.mk b/core/binary.mk
index 2bfccf4..e22cd84 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -717,12 +717,6 @@
 $(all_objects) : | $(import_includes)
 ALL_C_CPP_ETC_OBJECTS += $(all_objects)
 
-###########################################################
-## Copy headers to the install tree
-###########################################################
-ifndef LOCAL_2ND_ARCH_VAR_PREFIX
-include $(BUILD_COPY_HEADERS)
-endif
 
 ###########################################################
 # Standard library handling.
diff --git a/core/host_shared_library.mk b/core/host_shared_library.mk
index a29e14c..a608251 100644
--- a/core/host_shared_library.mk
+++ b/core/host_shared_library.mk
@@ -44,3 +44,8 @@
 	$(transform-host-o-to-shared-lib)
 
 endif  # skip_build_from_source
+
+###########################################################
+## Copy headers to the install tree
+###########################################################
+include $(BUILD_COPY_HEADERS)
diff --git a/core/host_static_library.mk b/core/host_static_library.mk
index a533cf5..7d9b375 100644
--- a/core/host_static_library.mk
+++ b/core/host_static_library.mk
@@ -25,3 +25,8 @@
 $(LOCAL_BUILT_MODULE): $(built_whole_libraries)
 $(LOCAL_BUILT_MODULE): $(all_objects)
 	$(transform-host-o-to-static-lib)
+
+###########################################################
+## Copy headers to the install tree
+###########################################################
+include $(BUILD_COPY_HEADERS)
diff --git a/core/shared_library.mk b/core/shared_library.mk
index 25f6eb7..87b6068 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -41,3 +41,8 @@
 endif # TARGET_2ND_ARCH
 
 my_module_arch_supported :=
+
+###########################################################
+## Copy headers to the install tree
+###########################################################
+include $(BUILD_COPY_HEADERS)
diff --git a/core/static_library.mk b/core/static_library.mk
index 329c6ee..d6e8d51 100644
--- a/core/static_library.mk
+++ b/core/static_library.mk
@@ -29,3 +29,8 @@
 endif # TARGET_2ND_ARCH
 
 my_module_arch_supported :=
+
+###########################################################
+## Copy headers to the install tree
+###########################################################
+include $(BUILD_COPY_HEADERS)