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# dexdump, similar in purpose to objdump.
17#
18LOCAL_PATH:= $(call my-dir)
19
20dexdump_src_files := \
21		DexDump.c \
22		OpCodeNames.c
23
24dexdump_c_includes := \
25		dalvik \
26		$(JNI_H_INCLUDE)
27
28dexdump_shared_libraries :=
29
30dexdump_static_libraries := \
31		libdex
32
33##
34##
35## Build the device command line tool dexdump
36##
37##
38ifneq ($(SDK_ONLY),true)  # SDK_only doesn't need device version
39
40include $(CLEAR_VARS)
41LOCAL_MODULE := dexdump
42LOCAL_SRC_FILES := $(dexdump_src_files)
43LOCAL_C_INCLUDES := $(dexdump_c_includes)
44LOCAL_SHARED_LIBRARIES := $(dexdump_shared_libraries) libz liblog
45LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries)
46LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
47LOCAL_MODULE_TAGS := debug
48LOCAL_LDLIBS +=
49include $(BUILD_EXECUTABLE)
50
51endif # !SDK_ONLY
52
53
54##
55##
56## Build the host command line tool dexdump
57##
58##
59ifneq ($(TARGET_SIMULATOR),true) # not 64 bit clean
60include $(CLEAR_VARS)
61LOCAL_MODULE := dexdump
62LOCAL_SRC_FILES := $(dexdump_src_files)
63LOCAL_C_INCLUDES := $(dexdump_c_includes)
64LOCAL_SHARED_LIBRARIES := $(dexdump_shared_libraries)
65LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries) liblog
66
67ifneq ($(strip $(USE_MINGW)),)
68LOCAL_STATIC_LIBRARIES += libz
69else
70LOCAL_LDLIBS += -lpthread -lz
71endif
72
73include $(BUILD_HOST_EXECUTABLE)
74endif # !TARGET_SIMULATOR
75
76