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 15LOCAL_PATH:= $(call my-dir) 16 17dex_src_files := \ 18 CmdUtils.cpp \ 19 DexCatch.cpp \ 20 DexClass.cpp \ 21 DexDataMap.cpp \ 22 DexDebugInfo.cpp \ 23 DexFile.cpp \ 24 DexInlines.cpp \ 25 DexOptData.cpp \ 26 DexOpcodes.cpp \ 27 DexProto.cpp \ 28 DexSwapVerify.cpp \ 29 DexUtf.cpp \ 30 InstrUtils.cpp \ 31 Leb128.cpp \ 32 OptInvocation.cpp \ 33 sha1.cpp \ 34 SysUtil.cpp \ 35 36dex_include_files := \ 37 dalvik \ 38 external/zlib \ 39 external/safe-iop/include 40 41## 42## 43## Build the device version of libdex 44## 45## 46ifneq ($(SDK_ONLY),true) # SDK_only doesn't need device version 47 48include $(CLEAR_VARS) 49#LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 50LOCAL_SRC_FILES := $(dex_src_files) 51LOCAL_C_INCLUDES += $(dex_include_files) 52LOCAL_CPPFLAGS := -std=gnu++11 53LOCAL_STATIC_LIBRARIES := liblog 54LOCAL_WHOLE_STATIC_LIBRARIES := libziparchive 55LOCAL_SHARED_LIBRARIES := libutils 56LOCAL_MODULE_TAGS := optional 57LOCAL_MODULE := libdex 58LOCAL_32_BIT_ONLY := true 59LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 60include $(BUILD_STATIC_LIBRARY) 61 62endif # !SDK_ONLY 63 64 65## 66## 67## Build the host version of libdex 68## 69## 70include $(CLEAR_VARS) 71LOCAL_SRC_FILES := $(dex_src_files) 72LOCAL_C_INCLUDES += $(dex_include_files) 73LOCAL_CPPFLAGS := -std=gnu++11 74LOCAL_STATIC_LIBRARIES := liblog libutils 75LOCAL_WHOLE_STATIC_LIBRARIES := libziparchive-host 76LOCAL_MODULE_TAGS := optional 77LOCAL_MODULE := libdex 78LOCAL_32_BIT_ONLY := true 79LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 80include $(BUILD_HOST_STATIC_LIBRARY) 81