OSDN Git Service

Break a dependency on frameworks/base when building a host VM.
[android-x86/dalvik.git] / dexopt / Android.mk
1 # Copyright (C) 2008 The Android Open Source Project
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #
16 # dexopt, the DEX file optimizer.  This is fully integrated with the VM,
17 # so it must be linked against the full VM shared library.
18 #
19 LOCAL_PATH:= $(call my-dir)
20
21 local_src_files := \
22                 OptMain.cpp
23
24 local_c_includes := \
25                 dalvik \
26                 dalvik/libdex \
27                 dalvik/vm \
28                 $(JNI_H_INCLUDE)
29
30 local_shared_libraries := \
31                 libssl \
32                 libdvm \
33                 libcrypto \
34                 libicuuc \
35                 libicui18n
36
37 include $(CLEAR_VARS)
38 ifeq ($(TARGET_CPU_SMP),true)
39     LOCAL_CFLAGS += -DANDROID_SMP=1
40 else
41     LOCAL_CFLAGS += -DANDROID_SMP=0
42 endif
43
44 LOCAL_SRC_FILES := $(local_src_files)
45 LOCAL_C_INCLUDES := $(local_c_includes)
46 LOCAL_SHARED_LIBRARIES := $(local_shared_libraries) libcutils libexpat liblog libnativehelper libz
47 LOCAL_MODULE_TAGS := optional
48 LOCAL_MODULE := dexopt
49
50 ifneq ($(TARGET_SIMULATOR),true)
51     LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
52     LOCAL_SHARED_LIBRARIES += libstlport
53 endif
54
55 include $(BUILD_EXECUTABLE)
56
57 ifeq ($(WITH_HOST_DALVIK),true)
58     include $(CLEAR_VARS)
59     LOCAL_SRC_FILES := $(local_src_files)
60     LOCAL_C_INCLUDES := $(local_c_includes)
61     LOCAL_SHARED_LIBRARIES := $(local_shared_libraries)
62     LOCAL_STATIC_LIBRARIES :=  libcutils libexpat liblog libnativehelper libz
63     LOCAL_LDLIBS += -ldl -lpthread
64     LOCAL_CFLAGS += -DANDROID_SMP=1
65     LOCAL_MODULE_TAGS := optional
66     LOCAL_MODULE := dexopt
67     include $(BUILD_HOST_EXECUTABLE)
68 endif