blob: b283024e8437c4f84a843f9aacd2f6680ebbef42 [file] [log] [blame]
The Android Open Source Project593c3652008-10-21 07:00:00 -07001LOCAL_PATH:= $(call my-dir)
2
3COMMON_SOURCES:=\
4 lib/xmalloc.c \
5 lib/xstrdup.c \
6 lib/xstrndup.c
7
8#
9# libelf
10#
11
12include $(CLEAR_VARS)
13
14LOCAL_SRC_FILES:=$(COMMON_SOURCES)
15LOCAL_SRC_FILES+=\
16 libelf/elf32_checksum.c \
17 libelf/elf32_fsize.c \
18 libelf/elf32_getehdr.c \
19 libelf/elf32_getphdr.c \
20 libelf/elf32_getshdr.c \
21 libelf/elf32_newehdr.c \
22 libelf/elf32_newphdr.c \
23 libelf/elf32_updatefile.c \
24 libelf/elf32_updatenull.c \
25 libelf/elf32_xlatetof.c \
26 libelf/elf32_xlatetom.c \
27 libelf/elf64_checksum.c \
28 libelf/elf64_fsize.c \
29 libelf/elf64_getehdr.c \
30 libelf/elf64_getphdr.c \
31 libelf/elf64_getshdr.c \
32 libelf/elf64_newehdr.c \
33 libelf/elf64_newphdr.c \
34 libelf/elf64_updatefile.c \
35 libelf/elf64_updatenull.c \
36 libelf/elf64_xlatetof.c \
37 libelf/elf64_xlatetom.c \
38 libelf/elf_begin.c \
39 libelf/elf_clone.c \
40 libelf/elf_cntl.c \
41 libelf/elf_end.c \
42 libelf/elf_error.c \
43 libelf/elf_fill.c \
44 libelf/elf_flagdata.c \
45 libelf/elf_flagehdr.c \
46 libelf/elf_flagelf.c \
47 libelf/elf_flagphdr.c \
48 libelf/elf_flagscn.c \
49 libelf/elf_flagshdr.c \
50 libelf/elf_getarhdr.c \
51 libelf/elf_getarsym.c \
52 libelf/elf_getbase.c \
53 libelf/elf_getdata.c \
54 libelf/elf_getident.c \
55 libelf/elf_getscn.c \
56 libelf/elf_getshnum.c \
57 libelf/elf_getshstrndx.c \
58 libelf/elf_hash.c \
59 libelf/elf_kind.c \
60 libelf/elf_memory.c \
61 libelf/elf_ndxscn.c \
62 libelf/elf_newdata.c \
63 libelf/elf_newscn.c \
64 libelf/elf_next.c \
65 libelf/elf_nextscn.c \
66 libelf/elf_rand.c \
67 libelf/elf_rawdata.c \
68 libelf/elf_rawfile.c \
69 libelf/elf_readall.c \
70 libelf/elf_strptr.c \
71 libelf/elf_update.c \
72 libelf/elf_version.c \
73 libelf/gelf_checksum.c \
74 libelf/gelf_freechunk.c \
75 libelf/gelf_fsize.c \
76 libelf/gelf_getclass.c \
77 libelf/gelf_getdyn.c \
78 libelf/gelf_getehdr.c \
79 libelf/gelf_getlib.c \
80 libelf/gelf_getmove.c \
81 libelf/gelf_getphdr.c \
82 libelf/gelf_getrel.c \
83 libelf/gelf_getrela.c \
84 libelf/gelf_getshdr.c \
85 libelf/gelf_getsym.c \
86 libelf/gelf_getsyminfo.c \
87 libelf/gelf_getsymshndx.c \
88 libelf/gelf_getverdaux.c \
89 libelf/gelf_getverdef.c \
90 libelf/gelf_getvernaux.c \
91 libelf/gelf_getverneed.c \
92 libelf/gelf_getversym.c \
93 libelf/gelf_newehdr.c \
94 libelf/gelf_newphdr.c \
95 libelf/gelf_rawchunk.c \
96 libelf/gelf_update_dyn.c \
97 libelf/gelf_update_ehdr.c \
98 libelf/gelf_update_lib.c \
99 libelf/gelf_update_move.c \
100 libelf/gelf_update_phdr.c \
101 libelf/gelf_update_rel.c \
102 libelf/gelf_update_rela.c \
103 libelf/gelf_update_shdr.c \
104 libelf/gelf_update_sym.c \
105 libelf/gelf_update_syminfo.c \
106 libelf/gelf_update_symshndx.c \
107 libelf/gelf_update_verdaux.c \
108 libelf/gelf_update_verdef.c \
109 libelf/gelf_update_vernaux.c \
110 libelf/gelf_update_verneed.c \
111 libelf/gelf_update_versym.c \
112 libelf/gelf_xlate.c \
113 libelf/gelf_xlatetof.c \
114 libelf/gelf_xlatetom.c \
115 libelf/libelf_crc32.c \
116 libelf/libelf_next_prime.c \
117 libelf/nlist.c
118
119ifeq ($(HOST_OS),linux)
120LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-linux.h
121endif
122ifeq ($(HOST_OS),darwin)
123LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-darwin.h
124endif
125ifeq ($(HOST_OS),windows)
126LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-cygwin.h
127endif
128
129LOCAL_MODULE:= libelf
130
131LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h
132ifeq ($(HOST_OS),windows)
133LOCAL_CFLAGS += -Doff64_t=_off64_t
134else
135LOCAL_CFLAGS += -Doff64_t=__off64_t
136endif
137
138LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/
139
140include $(BUILD_HOST_STATIC_LIBRARY)
141
142#
143# libebl
144#
145
146include $(CLEAR_VARS)
147
148LOCAL_SRC_FILES:=$(COMMON_SOURCES)
149LOCAL_SRC_FILES+=\
150 libebl/eblbackendname.c \
151 libebl/eblclosebackend.c \
152 libebl/eblcorenote.c \
153 libebl/eblcorenotetypename.c \
154 libebl/ebldebugscnp.c \
155 libebl/ebldynamictagcheck.c \
156 libebl/ebldynamictagname.c \
157 libebl/eblgotpcreloccheck.c \
158 libebl/eblgstrtab.c \
159 libebl/eblmachineflagcheck.c \
160 libebl/eblmachineflagname.c \
161 libebl/eblobjecttypename.c \
162 libebl/eblobjnote.c \
163 libebl/eblobjnotetypename.c \
164 libebl/eblopenbackend.c \
165 libebl/eblosabiname.c \
166 libebl/eblreloctypecheck.c \
167 libebl/eblreloctypename.c \
168 libebl/eblrelocvaliduse.c \
169 libebl/eblsectionname.c \
170 libebl/eblsectiontypename.c \
171 libebl/eblsegmenttypename.c \
172 libebl/eblshflagscombine.c \
173 libebl/eblstrtab.c \
174 libebl/eblsymbolbindingname.c \
175 libebl/eblsymboltypename.c \
176 libebl/eblwstrtab.c
177
178ifeq ($(HOST_OS),linux)
179LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-linux.h
180endif
181ifeq ($(HOST_OS),darwin)
182LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-darwin.h
183endif
184ifeq ($(HOST_OS),windows)
185LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-cygwin.h
186endif
187
188LOCAL_MODULE:=libebl
189
190LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h -DLIBSTR=\"$(LOCAL_MODULE)\" -Dstpcpy=strcpy
191ifeq ($(HOST_OS),windows)
192LOCAL_CFLAGS += -Doff64_t=_off64_t
193else
194LOCAL_CFLAGS += -Doff64_t=__off64_t
195endif
196
197LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/ $(LOCAL_PATH)/libebl/
198
199include $(BUILD_HOST_STATIC_LIBRARY)
200
201#
202# libebl_arm
203#
204
205include $(CLEAR_VARS)
206
207#LOCAL_SRC_FILES:=$(COMMON_SOURCES)
208LOCAL_SRC_FILES+=\
209 libebl/arm_destr.c \
210 libebl/arm_init.c \
211 libebl/arm_symbol.c
212
213ifeq ($(HOST_OS),linux)
214endif
215ifeq ($(HOST_OS),darwin)
216endif
217
218LOCAL_MODULE:=libebl_arm
219
220LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h
221ifeq ($(HOST_OS),windows)
222LOCAL_CFLAGS += -Doff64_t=_off64_t
223else
224LOCAL_CFLAGS += -Doff64_t=__off64_t
225endif
226
227LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/ $(LOCAL_PATH)/libebl/
228
229include $(BUILD_HOST_STATIC_LIBRARY)
230