1 # Copyright (C) 2013 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 supported_platforms := linux darwin 18 cur_platform := $(filter $(HOST_OS),$(supported_platforms)) 19 20 ifdef cur_platform 21 22 # 23 # host libebl 24 # 25 # 26 include $(CLEAR_VARS) 27 28 LIBEBL_SRC_FILES := \ 29 eblabicfi.c \ 30 eblauxvinfo.c \ 31 eblbackendname.c \ 32 eblbsspltp.c \ 33 eblcheckobjattr.c \ 34 ebl_check_special_section.c \ 35 ebl_check_special_symbol.c \ 36 eblclosebackend.c \ 37 eblcopyrelocp.c \ 38 eblcorenote.c \ 39 eblcorenotetypename.c \ 40 ebldebugscnp.c \ 41 ebldynamictagcheck.c \ 42 ebldynamictagname.c \ 43 eblelfclass.c \ 44 eblelfdata.c \ 45 eblelfmachine.c \ 46 eblgotpcreloccheck.c \ 47 eblgstrtab.c \ 48 eblmachineflagcheck.c \ 49 eblmachineflagname.c \ 50 eblmachinesectionflagcheck.c \ 51 eblnonerelocp.c \ 52 eblobjecttypename.c \ 53 eblobjnote.c \ 54 eblobjnotetypename.c \ 55 eblopenbackend.c \ 56 eblosabiname.c \ 57 eblreginfo.c \ 58 eblrelativerelocp.c \ 59 eblrelocsimpletype.c \ 60 eblreloctypecheck.c \ 61 eblreloctypename.c \ 62 eblrelocvaliduse.c \ 63 eblretval.c \ 64 eblsectionname.c \ 65 eblsectionstripp.c \ 66 eblsectiontypename.c \ 67 eblshflagscombine.c \ 68 eblstrtab.c \ 69 eblsymbolbindingname.c \ 70 eblsymboltypename.c \ 71 ebl_syscall_abi.c \ 72 eblsysvhashentrysize.c 73 74 LOCAL_SRC_FILES := $(LIBEBL_SRC_FILES) 75 76 LOCAL_C_INCLUDES := \ 77 $(LOCAL_PATH)/.. \ 78 $(LOCAL_PATH)/../lib \ 79 $(LOCAL_PATH)/../libebl \ 80 $(LOCAL_PATH)/../libasm \ 81 $(LOCAL_PATH)/../libelf \ 82 $(LOCAL_PATH)/../libdw 83 84 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../host-$(HOST_OS)-fixup 85 86 LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE 87 88 LOCAL_CFLAGS += -include $(LOCAL_PATH)/../host-$(HOST_OS)-fixup/AndroidFixup.h 89 90 LOCAL_CLANG := false 91 92 LOCAL_MODULE:= libebl 93 94 include $(BUILD_HOST_STATIC_LIBRARY) 95 96 # 97 # target libebl 98 # 99 100 include $(CLEAR_VARS) 101 102 LOCAL_SRC_FILES := $(LIBEBL_SRC_FILES) 103 104 LOCAL_C_INCLUDES := \ 105 $(LOCAL_PATH)/.. \ 106 $(LOCAL_PATH)/../lib \ 107 $(LOCAL_PATH)/../libebl \ 108 $(LOCAL_PATH)/../libasm \ 109 $(LOCAL_PATH)/../libelf \ 110 $(LOCAL_PATH)/../libdw 111 112 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../bionic-fixup 113 114 LOCAL_CFLAGS += -include $(LOCAL_PATH)/../bionic-fixup/AndroidFixup.h 115 116 LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -Werror 117 118 LOCAL_MODULE:= libebl 119 120 include $(BUILD_STATIC_LIBRARY) 121 122 endif #cur_platform 123