1# Copyright (C) 2015 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 17LIBDWELF_SRC_FILES := \ 18 dwelf_dwarf_gnu_debugaltlink.c \ 19 dwelf_elf_gnu_build_id.c \ 20 dwelf_elf_gnu_debuglink.c \ 21 22 23ifeq ($(HOST_OS),linux) 24 25# 26# host libdwelf 27# 28 29include $(CLEAR_VARS) 30 31LOCAL_SRC_FILES := $(LIBDWELF_SRC_FILES) 32 33LOCAL_C_INCLUDES := \ 34 $(LOCAL_PATH)/.. \ 35 $(LOCAL_PATH)/../lib \ 36 $(LOCAL_PATH)/../libdw \ 37 $(LOCAL_PATH)/../libdwfl \ 38 $(LOCAL_PATH)/../libebl \ 39 $(LOCAL_PATH)/../libelf 40 41LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE -D_BSD_SOURCE 42 43# to suppress the "pointer of type ‘void *’ used in arithmetic" warning 44LOCAL_CFLAGS += -Wno-pointer-arith 45 46LOCAL_MODULE:= libdwelf 47 48LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 49 50LOCAL_STATIC_LIBRARIES := libz 51 52include $(BUILD_HOST_STATIC_LIBRARY) 53 54endif # linux 55 56# 57# target libdwelf 58# 59 60include $(CLEAR_VARS) 61 62LOCAL_SRC_FILES := $(LIBDWELF_SRC_FILES) 63 64LOCAL_C_INCLUDES := \ 65 $(LOCAL_PATH)/.. \ 66 $(LOCAL_PATH)/../lib \ 67 $(LOCAL_PATH)/../libdw \ 68 $(LOCAL_PATH)/../libdwfl \ 69 $(LOCAL_PATH)/../libebl \ 70 $(LOCAL_PATH)/../libelf 71 72LOCAL_C_INCLUDES += $(LOCAL_PATH)/../bionic-fixup 73 74LOCAL_CFLAGS += -include $(LOCAL_PATH)/../bionic-fixup/AndroidFixup.h 75 76LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE -D_BSD_SOURCE -Werror 77 78# to suppress the "pointer of type ‘void *’ used in arithmetic" warning 79LOCAL_CFLAGS += -Wno-pointer-arith 80 81LOCAL_MODULE_TAGS := eng 82 83LOCAL_MODULE:= libdwelf 84 85LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 86 87LOCAL_STATIC_LIBRARIES := libz 88 89include $(BUILD_STATIC_LIBRARY) 90