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 := DexDump.cpp
21dexdump_c_includes := dalvik
22
23dexdump_static_libraries_sdk := \
24    libdex \
25    libbase
26
27dexdump_static_libraries := \
28    $(dexdump_static_libraries_sdk) \
29    libutils \
30    liblog
31
32##
33##
34## Build the device command line tool dexdump
35##
36##
37ifneq ($(SDK_ONLY),true)  # SDK_only doesn't need device version
38
39include $(CLEAR_VARS)
40LOCAL_MODULE := dexdump
41LOCAL_SRC_FILES := $(dexdump_src_files)
42LOCAL_C_INCLUDES := $(dexdump_c_includes)
43LOCAL_SHARED_LIBRARIES := libz liblog libutils
44LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries_sdk)
45LOCAL_LDLIBS +=
46LOCAL_32_BIT_ONLY := true
47include $(BUILD_EXECUTABLE)
48
49endif # !SDK_ONLY
50
51
52##
53##
54## Build the host command line tool dexdump
55##
56##
57include $(CLEAR_VARS)
58LOCAL_MODULE := dexdump
59LOCAL_MODULE_HOST_OS := darwin linux windows
60LOCAL_SRC_FILES := $(dexdump_src_files)
61LOCAL_C_INCLUDES := $(dexdump_c_includes)
62LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries)
63LOCAL_STATIC_LIBRARIES_windows += libz
64LOCAL_LDLIBS_darwin += -lpthread -lz
65LOCAL_LDLIBS_linux += -lpthread -lz
66include $(BUILD_HOST_EXECUTABLE)
67