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 31# Clang has no nested functions. 32LOCAL_CLANG := false 33 34LOCAL_SRC_FILES := $(LIBDWELF_SRC_FILES) 35 36LOCAL_C_INCLUDES := \ 37 $(LOCAL_PATH)/.. \ 38 $(LOCAL_PATH)/../lib \ 39 $(LOCAL_PATH)/../libdw \ 40 $(LOCAL_PATH)/../libdwfl \ 41 $(LOCAL_PATH)/../libebl \ 42 $(LOCAL_PATH)/../libelf 43 44LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE -D_BSD_SOURCE 45 46# to suppress the "pointer of type ‘void *’ used in arithmetic" warning 47LOCAL_CFLAGS += -Wno-pointer-arith 48 49LOCAL_MODULE:= libdwelf 50 51LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 52 53LOCAL_STATIC_LIBRARIES := libz 54 55include $(BUILD_HOST_STATIC_LIBRARY) 56 57endif # linux 58 59# 60# target libdwelf 61# 62 63include $(CLEAR_VARS) 64 65# Clang has no nested functions. 66LOCAL_CLANG := false 67 68LOCAL_SRC_FILES := $(LIBDWELF_SRC_FILES) 69 70LOCAL_C_INCLUDES := \ 71 $(LOCAL_PATH)/.. \ 72 $(LOCAL_PATH)/../lib \ 73 $(LOCAL_PATH)/../libdw \ 74 $(LOCAL_PATH)/../libdwfl \ 75 $(LOCAL_PATH)/../libebl \ 76 $(LOCAL_PATH)/../libelf 77 78LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../bionic-fixup 79 80LOCAL_CFLAGS += -include $(LOCAL_PATH)/../../bionic-fixup/AndroidFixup.h 81 82LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE -D_BSD_SOURCE -Werror 83 84# to suppress the "pointer of type ‘void *’ used in arithmetic" warning 85LOCAL_CFLAGS += -Wno-pointer-arith 86 87LOCAL_MODULE_TAGS := eng 88 89LOCAL_MODULE:= libdwelf 90 91LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 92 93LOCAL_STATIC_LIBRARIES := libz 94 95include $(BUILD_STATIC_LIBRARY) 96