OSDN Git Service

Dalvik fast interpreter support and JIT implementation
[android-x86/dalvik.git] / vm / Dvm.mk
index 72d9299..5e34641 100644 (file)
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -35,11 +35,7 @@ LOCAL_CFLAGS += -DARCH_VARIANT=\"$(dvm_arch_variant)\"
 # Make a debugging version when building the simulator (if not told
 # otherwise) and when explicitly asked.
 dvm_make_debug_vm := false
-ifeq ($(strip $(DEBUG_DALVIK_VM)),)
-  ifeq ($(dvm_simulator),true)
-    dvm_make_debug_vm := true
-  endif
-else
+ifneq ($(strip $(DEBUG_DALVIK_VM)),)
   dvm_make_debug_vm := $(DEBUG_DALVIK_VM)
 endif
 
@@ -189,7 +185,7 @@ LOCAL_SRC_FILES := \
        test/TestIndirectRefTable.cpp
 
 # TODO: this is the wrong test, but what's the right one?
-ifeq ($(dvm_arch),arm)
+ifneq ($(filter arm mips,$(dvm_arch)),)
   LOCAL_SRC_FILES += os/android.cpp
 else
   LOCAL_SRC_FILES += os/linux.cpp
@@ -231,14 +227,6 @@ LOCAL_C_INCLUDES += \
        external/zlib \
        libcore/include \
 
-ifeq ($(dvm_simulator),true)
-  LOCAL_LDLIBS += -lpthread -ldl
-  ifeq ($(HOST_OS),linux)
-    # need this for clock_gettime() in profiling
-    LOCAL_LDLIBS += -lrt
-  endif
-endif
-
 MTERP_ARCH_KNOWN := false
 
 ifeq ($(dvm_arch),arm)
@@ -268,6 +256,31 @@ ifeq ($(dvm_arch),arm)
   endif
 endif
 
+ifeq ($(dvm_arch),mips)
+  MTERP_ARCH_KNOWN := true
+  LOCAL_C_INCLUDES += external/libffi/$(TARGET_OS)-$(TARGET_ARCH)
+  LOCAL_SHARED_LIBRARIES += libffi
+  LOCAL_SRC_FILES += \
+               arch/mips/CallO32.S \
+               arch/mips/HintsO32.cpp \
+               arch/generic/Call.cpp \
+               mterp/out/InterpC-mips.cpp \
+               mterp/out/InterpAsm-mips.S
+
+  ifeq ($(WITH_JIT),true)
+    dvm_arch_variant := mips
+    LOCAL_SRC_FILES += \
+               compiler/codegen/mips/RallocUtil.cpp \
+               compiler/codegen/mips/$(dvm_arch_variant)/Codegen.cpp \
+               compiler/codegen/mips/$(dvm_arch_variant)/CallingConvention.S \
+               compiler/codegen/mips/Assemble.cpp \
+               compiler/codegen/mips/ArchUtility.cpp \
+               compiler/codegen/mips/LocalOptimizations.cpp \
+               compiler/codegen/mips/GlobalOptimizations.cpp \
+               compiler/template/out/CompilerTemplateAsm-$(dvm_arch_variant).S
+  endif
+endif
+
 ifeq ($(dvm_arch),x86)
   ifeq ($(dvm_os),linux)
     MTERP_ARCH_KNOWN := true