• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_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
128ifeq ($(HOST_OS),freebsd)
129LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-freebsd.h
130endif
131
132LOCAL_MODULE:= libelf
133
134LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h
135ifeq ($(HOST_OS),windows)
136LOCAL_CFLAGS += -Doff64_t=_off64_t
137else
138LOCAL_CFLAGS += -Doff64_t=__off64_t
139endif
140
141LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/
142
143include $(BUILD_HOST_STATIC_LIBRARY)
144
145#
146# libebl
147#
148
149include $(CLEAR_VARS)
150
151LOCAL_SRC_FILES:=$(COMMON_SOURCES)
152LOCAL_SRC_FILES+=\
153        libebl/eblbackendname.c \
154        libebl/eblclosebackend.c \
155        libebl/eblcorenote.c \
156        libebl/eblcorenotetypename.c \
157        libebl/ebldebugscnp.c \
158        libebl/ebldynamictagcheck.c \
159        libebl/ebldynamictagname.c \
160        libebl/eblgotpcreloccheck.c \
161        libebl/eblgstrtab.c \
162        libebl/eblmachineflagcheck.c \
163        libebl/eblmachineflagname.c \
164        libebl/eblobjecttypename.c \
165        libebl/eblobjnote.c \
166        libebl/eblobjnotetypename.c \
167        libebl/eblopenbackend.c \
168        libebl/eblosabiname.c \
169        libebl/eblreloctypecheck.c \
170        libebl/eblreloctypename.c \
171        libebl/eblrelocvaliduse.c \
172        libebl/eblsectionname.c \
173        libebl/eblsectiontypename.c \
174        libebl/eblsegmenttypename.c \
175        libebl/eblshflagscombine.c \
176        libebl/eblstrtab.c \
177        libebl/eblsymbolbindingname.c \
178        libebl/eblsymboltypename.c \
179        libebl/eblwstrtab.c
180
181ifeq ($(HOST_OS),linux)
182LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-linux.h
183endif
184ifeq ($(HOST_OS),darwin)
185LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-darwin.h
186endif
187ifeq ($(HOST_OS),windows)
188LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-cygwin.h
189endif
190ifeq ($(HOST_OS),freebsd)
191LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-freebsd.h
192endif
193
194LOCAL_MODULE:=libebl
195
196LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h -DLIBSTR=\"$(LOCAL_MODULE)\" -Dstpcpy=strcpy
197ifeq ($(HOST_OS),windows)
198LOCAL_CFLAGS += -Doff64_t=_off64_t
199else
200LOCAL_CFLAGS += -Doff64_t=__off64_t
201endif
202
203LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/ $(LOCAL_PATH)/libebl/
204
205include $(BUILD_HOST_STATIC_LIBRARY)
206
207#
208# libebl_arm
209#
210
211include $(CLEAR_VARS)
212
213#LOCAL_SRC_FILES:=$(COMMON_SOURCES)
214LOCAL_SRC_FILES+=\
215        libebl/arm_destr.c \
216        libebl/arm_init.c \
217        libebl/arm_symbol.c
218
219ifeq ($(HOST_OS),linux)
220endif
221ifeq ($(HOST_OS),darwin)
222endif
223
224LOCAL_MODULE:=libebl_arm
225
226LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h
227ifeq ($(HOST_OS),windows)
228LOCAL_CFLAGS += -Doff64_t=_off64_t
229else
230LOCAL_CFLAGS += -Doff64_t=__off64_t
231endif
232
233LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/ $(LOCAL_PATH)/libebl/
234
235include $(BUILD_HOST_STATIC_LIBRARY)
236
237
238#
239# libebl_sh
240#
241
242include $(CLEAR_VARS)
243
244LOCAL_SRC_FILES+=\
245        libebl/sh_destr.c \
246        libebl/sh_init.c \
247        libebl/sh_symbol.c
248
249ifeq ($(HOST_OS),linux)
250endif
251ifeq ($(HOST_OS),darwin)
252endif
253
254LOCAL_MODULE:=libebl_sh
255
256LOCAL_CFLAGS += -include $(LOCAL_PATH)/config.h
257ifeq ($(HOST_OS),windows)
258LOCAL_CFLAGS += -Doff64_t=_off64_t
259else
260LOCAL_CFLAGS += -Doff64_t=__off64_t
261endif
262
263LOCAL_C_INCLUDES:=$(LOCAL_PATH)/lib/ $(LOCAL_PATH)/libelf/ $(LOCAL_PATH)/libebl/
264
265include $(BUILD_HOST_STATIC_LIBRARY)
266