Tracking changes to *-host for host shared libraries
Change-Id: I88dd48b09b9148246884a1c84b26787500c24569
diff --git a/NativeCode.mk b/NativeCode.mk
index 5369453..01eee13 100644
--- a/NativeCode.mk
+++ b/NativeCode.mk
@@ -52,29 +52,6 @@
# sub.mk files don't see anything stray from the last rule that was
# set up.
-# Set up the test library first
-ifeq ($(LIBCORE_SKIP_TESTS),)
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(core_magic_local_target)
-core_src_files :=
-
-# Include the sub.mk files.
-$(foreach dir, \
- luni/src/test/native, \
- $(eval $(call include-core-native-dir,$(dir))))
-
-# This is for the test library, so rename the variable.
-test_src_files := $(core_src_files)
-core_src_files :=
-
-# Extract out the allowed LOCAL_* variables. Note: $(sort) also
-# removes duplicates.
-test_c_includes := $(sort libcore/include $(LOCAL_C_INCLUDES) $(JNI_H_INCLUDE))
-test_shared_libraries := $(sort $(LOCAL_SHARED_LIBRARIES))
-test_static_libraries := $(sort $(LOCAL_STATIC_LIBRARIES))
-endif # LIBCORE_SKIP_TESTS
-
-
include $(CLEAR_VARS)
LOCAL_MODULE := $(core_magic_local_target)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/NativeCode.mk
@@ -92,6 +69,9 @@
core_static_libraries := $(sort $(LOCAL_STATIC_LIBRARIES))
core_cflags := -DJNI_JARJAR_PREFIX="com/android/"
+core_test_files := \
+ luni/src/test/native/test_openssl_engine.cpp \
+
#
# Build for the target (device).
#
@@ -135,10 +115,9 @@
endif
# Define the rules.
-LOCAL_SRC_FILES := $(test_src_files)
-LOCAL_C_INCLUDES := $(test_c_includes)
-LOCAL_SHARED_LIBRARIES := $(test_shared_libraries)
-LOCAL_STATIC_LIBRARIES := $(test_static_libraries)
+LOCAL_SRC_FILES := $(core_test_files)
+LOCAL_C_INCLUDES := libcore/include external/openssl/include
+LOCAL_SHARED_LIBRARIES := libcrypto
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libjavacoretests
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/NativeCode.mk
@@ -162,23 +141,22 @@
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libjavacore
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/NativeCode.mk
- LOCAL_SHARED_LIBRARIES := $(core_shared_libraries) libexpat libicuuc libicui18n libssl libcrypto libz-host
+ LOCAL_SHARED_LIBRARIES := $(core_shared_libraries) libexpat-host libicuuc-host libicui18n-host libssl-host libcrypto-host libz-host
LOCAL_STATIC_LIBRARIES := $(core_static_libraries)
include $(BUILD_HOST_SHARED_LIBRARY)
ifeq ($(LIBCORE_SKIP_TESTS),)
include $(CLEAR_VARS)
# Define the rules.
- LOCAL_SRC_FILES := $(test_src_files)
+ LOCAL_SRC_FILES := $(core_test_files)
LOCAL_CFLAGS += $(core_cflags)
- LOCAL_C_INCLUDES := $(test_c_includes)
+ LOCAL_C_INCLUDES := libcore/include external/openssl/include
LOCAL_CPPFLAGS += $(core_cppflags)
LOCAL_LDLIBS += -ldl -lpthread
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libjavacoretests
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/NativeCode.mk
- LOCAL_SHARED_LIBRARIES := $(test_shared_libraries)
- LOCAL_STATIC_LIBRARIES := $(test_static_libraries)
+ LOCAL_SHARED_LIBRARIES := libcrypto-host
include $(BUILD_HOST_SHARED_LIBRARY)
endif # LIBCORE_SKIP_TESTS
endif