blob: 3bb98a55146b965344f37eec2667679702d7fecb [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001# 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#
19LOCAL_PATH:= $(call my-dir)
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080020
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070021local_src_files := \
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080022 OptMain.c
23
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070024local_c_includes := \
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080025 dalvik \
26 dalvik/libdex \
27 dalvik/vm \
28 $(JNI_H_INCLUDE)
29
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070030local_shared_libraries := \
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080031 libssl \
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070032 libdvm \
33 libcrypto \
34 libicuuc \
35 libicui18n
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080036
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070037include $(CLEAR_VARS)
Andy McFadden6a877082010-05-19 22:36:33 -070038ifeq ($(TARGET_CPU_SMP),true)
39 LOCAL_CFLAGS += -DANDROID_SMP=1
40else
41 LOCAL_CFLAGS += -DANDROID_SMP=0
42endif
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070043LOCAL_SRC_FILES := $(local_src_files)
44LOCAL_C_INCLUDES := $(local_c_includes)
45LOCAL_SHARED_LIBRARIES := $(local_shared_libraries) libcutils libexpat liblog libnativehelper libutils libz
Jesse Wilson42929e12010-09-16 15:56:25 -070046LOCAL_MODULE_TAGS := optional
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080047LOCAL_MODULE := dexopt
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080048include $(BUILD_EXECUTABLE)
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070049
50ifeq ($(WITH_HOST_DALVIK),true)
51 include $(CLEAR_VARS)
52 LOCAL_SRC_FILES := $(local_src_files)
53 LOCAL_C_INCLUDES := $(local_c_includes)
54 LOCAL_SHARED_LIBRARIES := $(local_shared_libraries)
55 LOCAL_STATIC_LIBRARIES := libcutils libexpat liblog libnativehelper libutils libz
56 LOCAL_LDLIBS += -ldl -lpthread
57 LOCAL_CFLAGS += -DANDROID_SMP=1
Jesse Wilson42929e12010-09-16 15:56:25 -070058 LOCAL_MODULE_TAGS := optional
Jesse Wilson3e9bfe02010-08-18 11:35:23 -070059 LOCAL_MODULE := dexopt
60 include $(BUILD_HOST_EXECUTABLE)
61endif