OSDN Git Service

Dalvik fast interpreter support and JIT implementation
[android-x86/dalvik.git] / vm / Dvm.mk
index dfb554b..5e34641 100644 (file)
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -25,7 +25,7 @@
 # Compiler defines.
 #
 LOCAL_CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 -fno-align-jumps
-LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wc++-compat
+LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter
 LOCAL_CFLAGS += -DARCH_VARIANT=\"$(dvm_arch_variant)\"
 
 #
@@ -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
 
@@ -107,7 +103,6 @@ LOCAL_SRC_FILES := \
        Native.cpp \
        PointerSet.cpp \
        Profile.cpp \
-       Properties.cpp \
        RawDexFile.cpp \
        ReferenceTable.cpp \
        SignalCatcher.cpp \
@@ -189,6 +184,13 @@ LOCAL_SRC_FILES := \
        test/TestHash.cpp \
        test/TestIndirectRefTable.cpp
 
+# TODO: this is the wrong test, but what's the right one?
+ifneq ($(filter arm mips,$(dvm_arch)),)
+  LOCAL_SRC_FILES += os/android.cpp
+else
+  LOCAL_SRC_FILES += os/linux.cpp
+endif
+
 WITH_COPYING_GC := $(strip $(WITH_COPYING_GC))
 
 ifeq ($(WITH_COPYING_GC),true)
@@ -224,15 +226,6 @@ LOCAL_C_INCLUDES += \
        dalvik/vm \
        external/zlib \
        libcore/include \
-       $(KERNEL_HEADERS)
-
-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
 
@@ -263,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