Home | History | Annotate | Download | only in libdwelf
      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 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 LIBDWELF_SRC_FILES := \
     18     dwelf_dwarf_gnu_debugaltlink.c \
     19     dwelf_elf_gnu_build_id.c \
     20     dwelf_elf_gnu_debuglink.c \
     21 
     22 
     23 ifeq ($(HOST_OS),linux)
     24 
     25 #
     26 # host libdwelf
     27 #
     28 
     29 include $(CLEAR_VARS)
     30 
     31 # Clang has no nested functions.
     32 LOCAL_CLANG := false
     33 
     34 LOCAL_SRC_FILES := $(LIBDWELF_SRC_FILES)
     35 
     36 LOCAL_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 
     44 LOCAL_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
     47 LOCAL_CFLAGS += -Wno-pointer-arith
     48 
     49 LOCAL_MODULE:= libdwelf
     50 
     51 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
     52 
     53 LOCAL_STATIC_LIBRARIES := libz
     54 
     55 include $(BUILD_HOST_STATIC_LIBRARY)
     56 
     57 endif # linux
     58 
     59 #
     60 # target libdwelf
     61 #
     62 
     63 include $(CLEAR_VARS)
     64 
     65 # Clang has no nested functions.
     66 LOCAL_CLANG := false
     67 
     68 LOCAL_SRC_FILES := $(LIBDWELF_SRC_FILES)
     69 
     70 LOCAL_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 
     78 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../bionic-fixup
     79 
     80 LOCAL_CFLAGS += -include $(LOCAL_PATH)/../../bionic-fixup/AndroidFixup.h
     81 
     82 LOCAL_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
     85 LOCAL_CFLAGS += -Wno-pointer-arith
     86 
     87 LOCAL_MODULE_TAGS := eng
     88 
     89 LOCAL_MODULE:= libdwelf
     90 
     91 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
     92 
     93 LOCAL_STATIC_LIBRARIES := libz
     94 
     95 include $(BUILD_STATIC_LIBRARY)
     96