ifeq ($(WITH_HOST_DALVIK),true)
include $(CLEAR_VARS)
-
LOCAL_SRC_FILES := $(dalvikvm_src_files)
LOCAL_C_INCLUDES := $(dalvikvm_c_includes)
- LOCAL_STATIC_LIBRARIES := \
- libdvm-host
-
ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
# OS X comes with all these libraries, so there is no need
# to build any of them. Note: OpenSSL consists of libssl
# and libcrypto.
LOCAL_LDLIBS := -lffi -lssl -lcrypto -lz -lsqlite3
else
- # In this case, include libssl and libz, but libffi isn't listed:
- # The recommendation is that host builds should always either
- # have sufficient custom code so that libffi isn't needed at all,
- # or they should use the platform's provided libffi (as is done
- # for darwin-x86 above).
- LOCAL_STATIC_LIBRARIES += libssl libz
+ LOCAL_LDLIBS += -ldl -lpthread
+ LOCAL_SHARED_LIBRARIES += libdvm libcrypto libicuuc libicui18n libssl
+# LOCAL_STATIC_LIBRARIES += libcutils liblog libdex libexpat libnativehelper libutils libz
endif
- LOCAL_MODULE := dalvikvm-host
+ LOCAL_MODULE := dalvikvm
include $(BUILD_HOST_EXECUTABLE)
# so it must be linked against the full VM shared library.
#
LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
+local_src_files := \
OptMain.c
-LOCAL_C_INCLUDES := \
+local_c_includes := \
dalvik \
dalvik/libdex \
dalvik/vm \
$(JNI_H_INCLUDE)
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- liblog \
- libz \
+local_shared_libraries := \
libssl \
- libdvm
+ libdvm \
+ libcrypto \
+ libicuuc \
+ libicui18n
+include $(CLEAR_VARS)
ifeq ($(TARGET_CPU_SMP),true)
LOCAL_CFLAGS += -DANDROID_SMP=1
else
LOCAL_CFLAGS += -DANDROID_SMP=0
endif
-
+LOCAL_SRC_FILES := $(local_src_files)
+LOCAL_C_INCLUDES := $(local_c_includes)
+LOCAL_SHARED_LIBRARIES := $(local_shared_libraries) libcutils libexpat liblog libnativehelper libutils libz
LOCAL_MODULE := dexopt
-
include $(BUILD_EXECUTABLE)
+
+ifeq ($(WITH_HOST_DALVIK),true)
+ include $(CLEAR_VARS)
+ LOCAL_SRC_FILES := $(local_src_files)
+ LOCAL_C_INCLUDES := $(local_c_includes)
+ LOCAL_SHARED_LIBRARIES := $(local_shared_libraries)
+ LOCAL_STATIC_LIBRARIES := libcutils libexpat liblog libnativehelper libutils libz
+ LOCAL_LDLIBS += -ldl -lpthread
+ LOCAL_CFLAGS += -DANDROID_SMP=1
+ LOCAL_MODULE := dexopt
+ include $(BUILD_HOST_EXECUTABLE)
+endif
#
src_files := \
- JNIHelp.c \
- Register.c
+ JNIHelp.c \
+ Register.c
c_includes := \
- $(JNI_H_INCLUDE)
+ $(JNI_H_INCLUDE)
# Any shared/static libs required by libjavacore
# need to be mentioned here as well.
# TODO: fix this requirement
shared_libraries := \
- libexpat \
- libssl \
- libutils \
- libz \
- libcrypto \
- libicuuc \
- libicui18n \
- libsqlite
+ libcrypto \
+ libicui18n \
+ libicuuc \
+ libsqlite \
+ libssl
static_libraries := \
- libjavacore \
- libfdlibm
+ libjavacore \
+ libfdlibm
LOCAL_SRC_FILES := $(src_files)
LOCAL_C_INCLUDES := $(c_includes)
LOCAL_STATIC_LIBRARIES := $(static_libraries)
-LOCAL_SHARED_LIBRARIES := $(shared_libraries)
-
-# liblog and libcutils are shared for target.
-LOCAL_SHARED_LIBRARIES += \
- liblog libcutils
+LOCAL_SHARED_LIBRARIES := $(shared_libraries) libcutils libexpat liblog libutils libz
LOCAL_MODULE := libnativehelper
# OSX has a lot of libraries built in, which we don't have to
# bother building; just include them on the ld line.
LOCAL_LDLIBS := -lexpat -lssl -lz -lcrypto -licucore -lsqlite3
- LOCAL_WHOLE_STATIC_LIBRARIES += libutils
+ LOCAL_WHOLE_STATIC_LIBRARIES += libutils
else
LOCAL_SHARED_LIBRARIES := $(shared_libraries)
+ LOCAL_STATIC_LIBRARIES := libcutils libexpat liblog libutils libz
endif
- # liblog and libcutils are static for host.
- LOCAL_STATIC_LIBRARIES += \
- liblog libcutils
-
- LOCAL_MODULE := libnativehelper-host
-
+ LOCAL_MODULE := libnativehelper
include $(BUILD_HOST_STATIC_LIBRARY)
endif
include $(LOCAL_PATH)/Dvm.mk
- # We need to include all of these libraries. The end result of this
- # section is a static library, but LOCAL_STATIC_LIBRARIES doesn't
- # actually cause any code from the specified libraries to be included,
- # whereas LOCAL_WHOLE_STATIC_LIBRARIES does. No, I (danfuzz) am not
- # entirely sure what LOCAL_STATIC_LIBRARIES is even supposed to mean
- # in this context, but it is in (apparently) meaningfully used in
- # other parts of the build.
- LOCAL_WHOLE_STATIC_LIBRARIES += \
- libnativehelper-host libdex liblog libcutils
+ LOCAL_SHARED_LIBRARIES += libcrypto libssl libicuuc libicui18n
+
+ LOCAL_LDLIBS := -lpthread -ldl
+ ifeq ($(HOST_OS),linux)
+ # need this for clock_gettime() in profiling
+ LOCAL_LDLIBS += -lrt
+ endif
+
+ # Build as a WHOLE static library so dependencies are available at link
+ # time. When building this target as a regular static library, certain
+ # dependencies like expat are not found by the linker.
+ LOCAL_WHOLE_STATIC_LIBRARIES += libexpat libcutils libdex liblog libnativehelper libutils libz
# The libffi from the source tree should never be used by host builds.
# The recommendation is that host builds should always either
endif
LOCAL_CFLAGS += $(host_smp_flag)
- LOCAL_MODULE := libdvm-host
+ LOCAL_MODULE := libdvm
- include $(BUILD_HOST_STATIC_LIBRARY)
+ include $(BUILD_HOST_SHARED_LIBRARY)
endif
# need this for clock_gettime() in profiling
LOCAL_LDLIBS += -lrt
endif
-else
- ifeq ($(dvm_os),linux)
- LOCAL_SHARED_LIBRARIES += libdl
- endif
endif
MTERP_ARCH_KNOWN := false
include $(LOCAL_PATH)/Dvm.mk
LOCAL_SHARED_LIBRARIES += \
- liblog libcutils libnativehelper libz
+ liblog libcutils libdl libnativehelper libz
LOCAL_STATIC_LIBRARIES += libdex