Android.mk revision c7e9b2331771e5e87c34a8ee3dc6cc41d35b02fe
1LOCAL_PATH:= $(call my-dir)
2
3include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
4
5# Make everything depend on any changes to included makefiles.
6libc_common_additional_dependencies := \
7    $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk \
8    $(LOCAL_PATH)/Android.mk \
9
10# Define the common source files for all the libc instances
11# =========================================================
12libc_common_src_files := \
13	$(syscall_src) \
14	unistd/alarm.c \
15	unistd/exec.c \
16	unistd/fnmatch.c \
17	unistd/syslog.c \
18	unistd/system.c \
19	unistd/time.c \
20	stdio/asprintf.c \
21	stdio/fflush.c \
22	stdio/fgetc.c \
23	stdio/findfp.c \
24	stdio/fprintf.c \
25	stdio/fputc.c \
26	stdio/fread.c \
27	stdio/freopen.c \
28	stdio/fscanf.c \
29	stdio/fseek.c \
30	stdio/ftell.c \
31	stdio/fvwrite.c \
32	stdio/gets.c \
33	stdio/printf.c \
34	stdio/refill.c \
35	stdio/rewind.c \
36	stdio/scanf.c \
37	stdio/snprintf.c\
38	stdio/sprintf.c \
39	stdio/sscanf.c \
40	stdio/stdio.c \
41	stdio/ungetc.c \
42	stdio/vasprintf.c \
43	stdio/vfprintf.c \
44	stdio/vfscanf.c \
45	stdio/vprintf.c \
46	stdio/vsnprintf.c \
47	stdio/vsprintf.c \
48	stdio/vscanf.c \
49	stdio/vsscanf.c \
50	stdio/wbuf.c \
51	stdlib/atexit.c \
52	stdlib/ctype_.c \
53	stdlib/exit.c \
54	stdlib/getenv.c \
55	stdlib/putenv.c \
56	stdlib/setenv.c \
57	stdlib/strtod.c \
58	stdlib/strtoimax.c \
59	stdlib/strtol.c \
60	stdlib/strtoll.c \
61	stdlib/strtoul.c \
62	stdlib/strtoull.c \
63	stdlib/strtoumax.c \
64	stdlib/tolower_.c \
65	stdlib/toupper_.c \
66	string/strcasecmp.c \
67	string/strcspn.c \
68	string/strdup.c \
69	string/strpbrk.c \
70	string/strsep.c \
71	string/strspn.c \
72	string/strstr.c \
73	string/strtok.c \
74	wchar/wcswidth.c \
75	wchar/wcsxfrm.c \
76	bionic/arc4random.c \
77	bionic/atoi.c \
78	bionic/atol.c \
79	bionic/atoll.c \
80	bionic/bindresvport.c \
81	bionic/bionic_clone.c \
82	bionic/clearenv.c \
83	bionic/daemon.c \
84	bionic/err.c \
85	bionic/ether_aton.c \
86	bionic/ether_ntoa.c \
87	bionic/fdprintf.c \
88	bionic/flockfile.c \
89	bionic/ftime.c \
90	bionic/ftok.c \
91	bionic/fts.c \
92	bionic/getdtablesize.c \
93	bionic/gethostname.c \
94	bionic/getpgrp.c \
95	bionic/getpriority.c \
96	bionic/getpt.c \
97	bionic/if_indextoname.c \
98	bionic/if_nametoindex.c \
99	bionic/initgroups.c \
100	bionic/ioctl.c \
101	bionic/isatty.c \
102	bionic/issetugid.c \
103	bionic/ldexp.c \
104	bionic/md5.c \
105	bionic/memmem.c \
106	bionic/memswap.c \
107	bionic/openat.c \
108	bionic/open.c \
109	bionic/pathconf.c \
110	bionic/perror.c \
111	bionic/pread.c \
112	bionic/pselect.c \
113	bionic/ptsname.c \
114	bionic/ptsname_r.c \
115	bionic/pututline.c \
116	bionic/pwrite.c \
117	bionic/reboot.c \
118	bionic/recv.c \
119	bionic/sched_cpualloc.c \
120	bionic/sched_cpucount.c \
121	bionic/sched_getcpu.c \
122	bionic/semaphore.c \
123	bionic/send.c \
124	bionic/setpgrp.c \
125	bionic/sigblock.c \
126	bionic/siginterrupt.c \
127	bionic/siglist.c \
128	bionic/signame.c \
129	bionic/sigsetmask.c \
130	bionic/sleep.c \
131	bionic/strndup.c \
132	bionic/strntoimax.c \
133	bionic/strntoumax.c \
134	bionic/strtotimeval.c \
135	bionic/system_properties.c \
136	bionic/system_properties_compat.c \
137	bionic/tcgetpgrp.c \
138	bionic/tcsetpgrp.c \
139	bionic/thread_atexit.c \
140	bionic/time64.c \
141	bionic/umount.c \
142	bionic/unlockpt.c \
143	bionic/usleep.c \
144	bionic/utmp.c \
145	bionic/wcscoll.c \
146
147
148libc_dns_src_files += \
149    netbsd/gethnamaddr.c \
150    netbsd/inet/nsap_addr.c \
151    netbsd/nameser/ns_name.c \
152    netbsd/nameser/ns_netint.c \
153    netbsd/nameser/ns_parse.c \
154    netbsd/nameser/ns_print.c \
155    netbsd/nameser/ns_samedomain.c \
156    netbsd/nameser/ns_ttl.c \
157    netbsd/net/base64.c \
158    netbsd/net/getaddrinfo.c \
159    netbsd/net/getnameinfo.c \
160    netbsd/net/getservbyname.c \
161    netbsd/net/getservbyport.c \
162    netbsd/net/getservent.c \
163    netbsd/net/nsdispatch.c \
164    netbsd/resolv/__dn_comp.c \
165    netbsd/resolv/herror.c \
166    netbsd/resolv/res_cache.c \
167    netbsd/resolv/__res_close.c \
168    netbsd/resolv/res_comp.c \
169    netbsd/resolv/res_data.c \
170    netbsd/resolv/res_debug.c \
171    netbsd/resolv/res_init.c \
172    netbsd/resolv/res_mkquery.c \
173    netbsd/resolv/res_query.c \
174    netbsd/resolv/__res_send.c \
175    netbsd/resolv/res_send.c \
176    netbsd/resolv/res_state.c \
177
178
179# These are shared by all the 32-bit targets, but not the 64-bit ones.
180ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
181libc_common_src_files += \
182    bionic/fcntl.c \
183    bionic/fstatfs.c \
184    bionic/__get_tls.cpp \
185    bionic/lseek64.c \
186    bionic/statfs.c \
187
188endif
189
190# Fortify implementations of libc functions.
191libc_common_src_files += \
192    bionic/__FD_chk.cpp \
193    bionic/__fgets_chk.cpp \
194    bionic/__memcpy_chk.cpp \
195    bionic/__memmove_chk.cpp \
196    bionic/__memset_chk.cpp \
197    bionic/__read_chk.cpp \
198    bionic/__recvfrom_chk.cpp \
199    bionic/__strcat_chk.cpp \
200    bionic/__strchr_chk.cpp \
201    bionic/__strcpy_chk.cpp \
202    bionic/__strlcat_chk.cpp \
203    bionic/__strlcpy_chk.cpp \
204    bionic/__strlen_chk.cpp \
205    bionic/__strncat_chk.cpp \
206    bionic/__strncpy_chk.cpp \
207    bionic/__strrchr_chk.cpp \
208    bionic/__umask_chk.cpp \
209    bionic/__vsnprintf_chk.cpp \
210    bionic/__vsprintf_chk.cpp \
211
212libc_bionic_src_files := \
213    bionic/abort.cpp \
214    bionic/assert.cpp \
215    bionic/brk.cpp \
216    bionic/dirent.cpp \
217    bionic/__errno.cpp \
218    bionic/eventfd_read.cpp \
219    bionic/eventfd_write.cpp \
220    bionic/fork.cpp \
221    bionic/futimens.cpp \
222    bionic/getauxval.cpp \
223    bionic/getcwd.cpp \
224    bionic/libc_init_common.cpp \
225    bionic/libc_logging.cpp \
226    bionic/libgen.cpp \
227    bionic/pthread_attr.cpp \
228    bionic/pthread_detach.cpp \
229    bionic/pthread_equal.cpp \
230    bionic/pthread_getcpuclockid.cpp \
231    bionic/pthread_getschedparam.cpp \
232    bionic/pthread_internals.cpp \
233    bionic/pthread_join.cpp \
234    bionic/pthread_kill.cpp \
235    bionic/pthread_self.cpp \
236    bionic/pthread_setname_np.cpp \
237    bionic/pthread_setschedparam.cpp \
238    bionic/pthread_sigmask.cpp \
239    bionic/raise.cpp \
240    bionic/sbrk.cpp \
241    bionic/scandir.cpp \
242    bionic/sched_getaffinity.cpp \
243    bionic/setegid.cpp \
244    bionic/__set_errno.cpp \
245    bionic/seteuid.cpp \
246    bionic/setlocale.cpp \
247    bionic/signalfd.cpp \
248    bionic/sigaction.cpp \
249    bionic/sigaddset.cpp \
250    bionic/sigdelset.cpp \
251    bionic/sigemptyset.cpp \
252    bionic/sigfillset.cpp \
253    bionic/sigismember.cpp \
254    bionic/signal.cpp \
255    bionic/sigpending.cpp \
256    bionic/sigprocmask.cpp \
257    bionic/sigsuspend.cpp \
258    bionic/sigwait.cpp \
259    bionic/statvfs.cpp \
260    bionic/strerror.cpp \
261    bionic/strerror_r.cpp \
262    bionic/strsignal.cpp \
263    bionic/stubs.cpp \
264    bionic/sysconf.cpp \
265    bionic/tdestroy.cpp \
266    bionic/__thread_entry.cpp \
267    bionic/tmpfile.cpp \
268    bionic/wait.cpp \
269    bionic/wchar.cpp \
270
271# These are shared by all the 32-bit targets, but not the 64-bit ones.
272ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
273libc_bionic_src_files += \
274    bionic/mmap.cpp \
275
276endif
277
278libc_tzcode_src_files := \
279    tzcode/asctime.c \
280    tzcode/difftime.c \
281    tzcode/localtime.c \
282    tzcode/strftime.c \
283    tzcode/strptime.c \
284
285libc_upstream_freebsd_src_files := \
286    upstream-freebsd/lib/libc/stdio/clrerr.c \
287    upstream-freebsd/lib/libc/stdio/fclose.c \
288    upstream-freebsd/lib/libc/stdio/fdopen.c \
289    upstream-freebsd/lib/libc/stdio/feof.c \
290    upstream-freebsd/lib/libc/stdio/ferror.c \
291    upstream-freebsd/lib/libc/stdio/fgetln.c \
292    upstream-freebsd/lib/libc/stdio/fgetpos.c \
293    upstream-freebsd/lib/libc/stdio/fgets.c \
294    upstream-freebsd/lib/libc/stdio/fileno.c \
295    upstream-freebsd/lib/libc/stdio/flags.c \
296    upstream-freebsd/lib/libc/stdio/fopen.c \
297    upstream-freebsd/lib/libc/stdio/fpurge.c \
298    upstream-freebsd/lib/libc/stdio/fputs.c \
299    upstream-freebsd/lib/libc/stdio/fsetpos.c \
300    upstream-freebsd/lib/libc/stdio/funopen.c \
301    upstream-freebsd/lib/libc/stdio/fwalk.c \
302    upstream-freebsd/lib/libc/stdio/fwrite.c \
303    upstream-freebsd/lib/libc/stdio/getc.c \
304    upstream-freebsd/lib/libc/stdio/getchar.c \
305    upstream-freebsd/lib/libc/stdio/makebuf.c \
306    upstream-freebsd/lib/libc/stdio/mktemp.c \
307    upstream-freebsd/lib/libc/stdio/putc.c \
308    upstream-freebsd/lib/libc/stdio/putchar.c \
309    upstream-freebsd/lib/libc/stdio/puts.c \
310    upstream-freebsd/lib/libc/stdio/putw.c \
311    upstream-freebsd/lib/libc/stdio/remove.c \
312    upstream-freebsd/lib/libc/stdio/rget.c \
313    upstream-freebsd/lib/libc/stdio/setbuf.c \
314    upstream-freebsd/lib/libc/stdio/setbuffer.c \
315    upstream-freebsd/lib/libc/stdio/setvbuf.c \
316    upstream-freebsd/lib/libc/stdio/tempnam.c \
317    upstream-freebsd/lib/libc/stdio/tmpnam.c \
318    upstream-freebsd/lib/libc/stdio/wsetup.c \
319    upstream-freebsd/lib/libc/stdlib/abs.c \
320    upstream-freebsd/lib/libc/stdlib/getopt_long.c \
321    upstream-freebsd/lib/libc/stdlib/imaxabs.c \
322    upstream-freebsd/lib/libc/stdlib/imaxdiv.c \
323    upstream-freebsd/lib/libc/stdlib/labs.c \
324    upstream-freebsd/lib/libc/stdlib/llabs.c \
325    upstream-freebsd/lib/libc/stdlib/qsort.c \
326    upstream-freebsd/lib/libc/stdlib/realpath.c \
327    upstream-freebsd/lib/libc/string/wcpcpy.c \
328    upstream-freebsd/lib/libc/string/wcpncpy.c \
329    upstream-freebsd/lib/libc/string/wcscasecmp.c \
330    upstream-freebsd/lib/libc/string/wcscspn.c \
331    upstream-freebsd/lib/libc/string/wcsdup.c \
332    upstream-freebsd/lib/libc/string/wcslcat.c \
333    upstream-freebsd/lib/libc/string/wcslcpy.c \
334    upstream-freebsd/lib/libc/string/wcsncasecmp.c \
335    upstream-freebsd/lib/libc/string/wcsncat.c \
336    upstream-freebsd/lib/libc/string/wcsncmp.c \
337    upstream-freebsd/lib/libc/string/wcsncpy.c \
338    upstream-freebsd/lib/libc/string/wcsnlen.c \
339    upstream-freebsd/lib/libc/string/wcspbrk.c \
340    upstream-freebsd/lib/libc/string/wcsspn.c \
341    upstream-freebsd/lib/libc/string/wcsstr.c \
342    upstream-freebsd/lib/libc/string/wcstok.c \
343    upstream-freebsd/lib/libc/string/wmemchr.c \
344    upstream-freebsd/lib/libc/string/wmemcpy.c \
345    upstream-freebsd/lib/libc/string/wmemmove.c \
346    upstream-freebsd/lib/libc/string/wmemset.c \
347
348libc_upstream_netbsd_src_files := \
349    upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
350    upstream-netbsd/common/lib/libc/inet/inet_addr.c \
351    upstream-netbsd/libc/compat-43/creat.c \
352    upstream-netbsd/libc/gen/ftw.c \
353    upstream-netbsd/libc/gen/nftw.c \
354    upstream-netbsd/libc/gen/nice.c \
355    upstream-netbsd/libc/gen/popen.c \
356    upstream-netbsd/libc/gen/psignal.c \
357    upstream-netbsd/libc/gen/setjmperr.c \
358    upstream-netbsd/libc/gen/utime.c \
359    upstream-netbsd/libc/inet/inet_ntoa.c \
360    upstream-netbsd/libc/inet/inet_ntop.c \
361    upstream-netbsd/libc/inet/inet_pton.c \
362    upstream-netbsd/libc/isc/ev_streams.c \
363    upstream-netbsd/libc/isc/ev_timers.c \
364    upstream-netbsd/libc/regex/regcomp.c \
365    upstream-netbsd/libc/regex/regerror.c \
366    upstream-netbsd/libc/regex/regexec.c \
367    upstream-netbsd/libc/regex/regfree.c \
368    upstream-netbsd/libc/stdio/getdelim.c \
369    upstream-netbsd/libc/stdio/getline.c \
370    upstream-netbsd/libc/stdlib/bsearch.c \
371    upstream-netbsd/libc/stdlib/div.c \
372    upstream-netbsd/libc/stdlib/drand48.c \
373    upstream-netbsd/libc/stdlib/erand48.c \
374    upstream-netbsd/libc/stdlib/jrand48.c \
375    upstream-netbsd/libc/stdlib/ldiv.c \
376    upstream-netbsd/libc/stdlib/lldiv.c \
377    upstream-netbsd/libc/stdlib/lrand48.c \
378    upstream-netbsd/libc/stdlib/mrand48.c \
379    upstream-netbsd/libc/stdlib/nrand48.c \
380    upstream-netbsd/libc/stdlib/_rand48.c \
381    upstream-netbsd/libc/stdlib/seed48.c \
382    upstream-netbsd/libc/stdlib/srand48.c \
383    upstream-netbsd/libc/stdlib/tdelete.c \
384    upstream-netbsd/libc/stdlib/tfind.c \
385    upstream-netbsd/libc/stdlib/tsearch.c \
386    upstream-netbsd/libc/string/memccpy.c \
387    upstream-netbsd/libc/string/strcasestr.c \
388    upstream-netbsd/libc/string/strcoll.c \
389    upstream-netbsd/libc/string/strxfrm.c \
390    upstream-netbsd/libc/unistd/killpg.c \
391
392
393# Architecture specific source files go here
394# =========================================================
395ifeq ($(TARGET_ARCH),arm)
396libc_common_src_files += \
397	bionic/memchr.c \
398	bionic/memmove.c.arm \
399	bionic/memrchr.c \
400	bionic/strchr.cpp \
401	bionic/strnlen.c \
402	string/bcopy.c \
403	string/index.c \
404	string/strlcat.c \
405	string/strlcpy.c \
406	string/strncat.c \
407	string/strncmp.c \
408	string/strncpy.c \
409	string/strrchr.c \
410	upstream-freebsd/lib/libc/string/wcscat.c \
411	upstream-freebsd/lib/libc/string/wcschr.c \
412	upstream-freebsd/lib/libc/string/wcscmp.c \
413	upstream-freebsd/lib/libc/string/wcscpy.c \
414	upstream-freebsd/lib/libc/string/wcslen.c \
415	upstream-freebsd/lib/libc/string/wcsrchr.c \
416	upstream-freebsd/lib/libc/string/wmemcmp.c \
417
418# These files need to be arm so that gdbserver
419# can set breakpoints in them without messing
420# up any thumb code.
421# TODO: is this actually necessary?
422libc_common_src_files += \
423    bionic/pthread-atfork.c.arm \
424    bionic/pthread-rwlocks.c.arm \
425    bionic/pthread-timers.c.arm \
426    bionic/ptrace.c.arm \
427
428libc_static_common_src_files += \
429    bionic/pthread.c.arm \
430    bionic/pthread_create.cpp.arm \
431    bionic/pthread_key.cpp.arm \
432
433endif # arm
434
435ifeq ($(TARGET_ARCH),x86)
436libc_common_src_files += \
437    bionic/pthread-atfork.c \
438    bionic/pthread-rwlocks.c \
439    bionic/pthread-timers.c \
440    bionic/ptrace.c \
441
442libc_static_common_src_files += \
443    bionic/pthread.c \
444    bionic/pthread_create.cpp \
445    bionic/pthread_key.cpp \
446
447endif # x86
448
449ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64))
450libc_common_src_files += \
451    bionic/memchr.c \
452    bionic/memcmp.c \
453    bionic/memcpy.c \
454    bionic/memmove.c \
455    bionic/memrchr.c \
456    bionic/memset.c \
457    bionic/pthread-atfork.c \
458    bionic/pthread-rwlocks.c \
459    bionic/pthread-timers.c \
460    bionic/ptrace.c \
461    bionic/strchr.cpp \
462    bionic/strnlen.c \
463    string/bcopy.c \
464    string/index.c \
465    string/strcat.c \
466    string/strcmp.c \
467    string/strcpy.c \
468    string/strlcat.c \
469    string/strlcpy.c \
470    string/strlen.c \
471    string/strncat.c \
472    string/strncmp.c \
473    string/strncpy.c \
474    string/strrchr.c \
475    upstream-freebsd/lib/libc/string/wcscat.c \
476    upstream-freebsd/lib/libc/string/wcschr.c \
477    upstream-freebsd/lib/libc/string/wcscmp.c \
478    upstream-freebsd/lib/libc/string/wcscpy.c \
479    upstream-freebsd/lib/libc/string/wcslen.c \
480    upstream-freebsd/lib/libc/string/wcsrchr.c \
481    upstream-freebsd/lib/libc/string/wmemcmp.c \
482
483libc_static_common_src_files += \
484    bionic/pthread.c \
485    bionic/pthread_create.cpp \
486    bionic/pthread_key.cpp \
487
488endif # x86_64
489
490ifeq ($(TARGET_ARCH),mips)
491libc_common_src_files += \
492	bionic/memchr.c \
493	bionic/memcmp.c \
494	bionic/memrchr.c \
495	bionic/strchr.cpp \
496	bionic/strnlen.c \
497	string/bcopy.c \
498	string/index.c \
499	string/strcat.c \
500	string/strcmp.c \
501	string/strcpy.c \
502	string/strlcat.c \
503	string/strlcpy.c \
504	string/strncat.c \
505	string/strncmp.c \
506	string/strncpy.c \
507	string/strrchr.c \
508	upstream-freebsd/lib/libc/string/wcscat.c \
509	upstream-freebsd/lib/libc/string/wcschr.c \
510	upstream-freebsd/lib/libc/string/wcscmp.c \
511	upstream-freebsd/lib/libc/string/wcscpy.c \
512	upstream-freebsd/lib/libc/string/wcslen.c \
513	upstream-freebsd/lib/libc/string/wcsrchr.c \
514	upstream-freebsd/lib/libc/string/wmemcmp.c \
515
516libc_common_src_files += \
517    bionic/pthread-atfork.c \
518    bionic/pthread-rwlocks.c \
519    bionic/pthread-timers.c \
520    bionic/ptrace.c \
521
522libc_static_common_src_files += \
523    bionic/pthread.c \
524    bionic/pthread_create.cpp \
525    bionic/pthread_key.cpp \
526
527endif # mips
528
529ifeq ($(strip $(TARGET_CPU_VARIANT)),)
530$(warning TARGET_CPU_VARIANT is not defined)
531endif
532
533###########################################################
534## Add cpu specific source files.
535##
536## This can be called multiple times, but it will only add
537## the first source file for each unique $(1).
538## $(1): Unique identifier to identify the cpu variant
539##       implementation.
540## $(2): Cpu specific source file.
541###########################################################
542
543define libc-add-cpu-variant-src
544$(if $(filter true,$(_LIBC_ARCH_CPU_VARIANT_HAS_$(1))), \
545	, \
546     $(eval _LIBC_ARCH_CPU_VARIANT_HAS_$(1) := true) \
547     $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILE.$(1) := $(2)) \
548     $(eval _LIBC_ARCH_CPU_VARIANT_SRC_FILES += $(2)) \
549)
550endef
551
552_LIBC_ARCH_COMMON_SRC_FILES :=
553_LIBC_ARCH_CPU_VARIANT_SRC_FILES :=
554_LIBC_ARCH_STATIC_SRC_FILES :=
555_LIBC_ARCH_DYNAMIC_SRC_FILES :=
556_LIBC_ARCH_ADDITIONAL_DEPENDENCIES :=
557
558libc_common_additional_dependencies += \
559    $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
560include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
561
562libc_bionic_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES)
563libc_bionic_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES)
564libc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES)
565libc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES)
566libc_common_additional_dependencies += $(_LIBC_ARCH_ADDITIONAL_DEPENDENCIES)
567
568# Define some common cflags
569# ========================================================
570libc_common_cflags := \
571    -DANDROID_CHANGES \
572    -D_LIBC=1 \
573    -Wall -Wextra \
574
575# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
576libc_common_cflags += \
577    -Werror=pointer-to-int-cast \
578    -Werror=int-to-pointer-cast \
579    -Werror=type-limits \
580
581ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
582  libc_common_cflags += -DDEBUG
583endif
584
585# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
586# the appropriate BoardConfig.mk file.
587#
588ifneq ($(BOARD_MALLOC_ALIGNMENT),)
589  libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
590endif
591
592ifeq ($(TARGET_ARCH),arm)
593  libc_common_cflags += -DSOFTFLOAT
594  libc_common_cflags += -fstrict-aliasing
595  libc_crt_target_cflags := -mthumb-interwork
596endif # arm
597
598ifeq ($(TARGET_ARCH),mips)
599  ifneq ($(ARCH_MIPS_HAS_FPU),true)
600    libc_common_cflags += -DSOFTFLOAT
601  endif
602  libc_common_cflags += -fstrict-aliasing
603  libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS)
604endif # mips
605
606ifeq ($(TARGET_ARCH),x86)
607  libc_crt_target_cflags := -m32
608  libc_crt_target_ldflags := -melf_i386
609endif # x86
610
611ifeq ($(TARGET_ARCH),x86_64)
612  libc_crt_target_cflags := -m64
613  libc_crt_target_ldflags := -melf_x86_64
614endif # x86_64
615
616# Define ANDROID_SMP appropriately.
617ifeq ($(TARGET_CPU_SMP),true)
618    libc_common_cflags += -DANDROID_SMP=1
619else
620    libc_common_cflags += -DANDROID_SMP=0
621endif
622
623# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
624libc_crt_target_cflags += \
625    -I$(LOCAL_PATH)/include  \
626    -I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include \
627    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
628
629# Define some common conlyflags
630libc_common_conlyflags := \
631    -std=gnu99
632
633# Define some common cppflags
634libc_common_cppflags := \
635    -std=gnu++11
636
637# Define some common includes
638# ========================================================
639libc_common_c_includes := \
640		$(LOCAL_PATH)/stdlib  \
641		$(LOCAL_PATH)/string  \
642		$(LOCAL_PATH)/stdio   \
643		external/safe-iop/include
644
645# Define the libc run-time (crt) support object files that must be built,
646# which are needed to build all other objects (shared/static libs and
647# executables)
648# ==========================================================================
649# ARM, MIPS, and x86 all need crtbegin_so/crtend_so.
650#
651# For x86, the .init section must point to a function that calls all
652# entries in the .ctors section. (on ARM this is done through the
653# .init_array section instead).
654#
655# For all the platforms, the .fini_array section must point to a function
656# that will call __cxa_finalize(&__dso_handle) in order to ensure that
657# static C++ destructors are properly called on dlclose().
658#
659libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin.c
660libc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
661
662ifeq ($(TARGET_ARCH),arm)
663    libc_crt_target_so_cflags :=
664endif
665ifeq ($(TARGET_ARCH),mips)
666    libc_crt_target_so_cflags := -fPIC
667libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.c
668endif
669ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
670    libc_crt_target_so_cflags := -fPIC
671endif
672libc_crt_target_so_cflags += $(libc_crt_target_cflags)
673
674# See the comment in crtbrand.c for the reason why we need to generate
675# crtbrand.s before generating crtbrand.o.
676GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
677$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c
678	@mkdir -p $(dir $@)
679	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \
680		-MD -MF $(@:%.s=%.d) -o $@ $<
681	$(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@
682	$(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P))
683-include $(GEN:%.s=%.P)
684ALL_GENERATED_SOURCES += $(GEN)
685
686GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
687$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
688	@mkdir -p $(dir $@)
689	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
690ALL_GENERATED_SOURCES += $(GEN)
691
692GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
693$(GEN): $(libc_crt_target_crtbegin_so_file)
694	@mkdir -p $(dir $@)
695	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
696		-MD -MF $(@:%.o=%.d) -o $@ -c $<
697	$(transform-d-to-p)
698-include $(GEN:%.o=%.P)
699ALL_GENERATED_SOURCES += $(GEN)
700
701GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
702$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend_so.S
703	@mkdir -p $(dir $@)
704	$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
705		-MD -MF $(@:%.o=%.d) -o $@ -c $<
706	$(transform-d-to-p)
707-include $(GEN:%.o=%.P)
708ALL_GENERATED_SOURCES += $(GEN)
709
710# The following two are installed to device
711GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o
712$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
713	$(hide) mkdir -p $(dir $@) && cp -f $< $@
714ALL_GENERATED_SOURCES += $(GEN)
715
716GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o
717$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
718	$(hide) mkdir -p $(dir $@) && cp -f $< $@
719ALL_GENERATED_SOURCES += $(GEN)
720
721
722GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o
723$(GEN): $(libc_crt_target_crtbegin_file)
724	@mkdir -p $(dir $@)
725	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
726		-MD -MF $(@:%.o=%.d) -o $@ -c $<
727	$(transform-d-to-p)
728-include $(GEN:%.o=%.P)
729ALL_GENERATED_SOURCES += $(GEN)
730
731GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o
732$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
733	@mkdir -p $(dir $@)
734	$(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^
735ALL_GENERATED_SOURCES += $(GEN)
736
737GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o
738$(GEN): $(libc_crt_target_crtbegin_file)
739	@mkdir -p $(dir $@)
740	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
741		-MD -MF $(@:%.o=%.d) -o $@ -c $<
742	$(transform-d-to-p)
743-include $(GEN:%.o=%.P)
744ALL_GENERATED_SOURCES += $(GEN)
745
746GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o
747$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
748	@mkdir -p $(dir $@)
749	$(hide) $(TARGET_LD) $(libc_crt_target_ldflags) -r -o $@ $^
750ALL_GENERATED_SOURCES += $(GEN)
751
752# We rename crtend.o to crtend_android.o to avoid a
753# name clash between gcc and bionic.
754GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o
755$(GEN): $(LOCAL_PATH)/arch-common/bionic/crtend.S
756	@mkdir -p $(dir $@)
757	$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
758		-MD -MF $(@:%.o=%.d) -o $@ -c $<
759	$(transform-d-to-p)
760-include $(GEN:%.o=%.P)
761ALL_GENERATED_SOURCES += $(GEN)
762
763
764# To enable malloc leak check for statically linked programs, add
765# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk
766WITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
767
768# ========================================================
769# libbionic_ssp.a - stack protector code
770# ========================================================
771#
772# The stack protector code needs to be compiled
773# with -fno-stack-protector, since it modifies the
774# stack canary.
775
776include $(CLEAR_VARS)
777
778LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
779LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
780LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
781LOCAL_CPPFLAGS := $(libc_common_cppflags)
782LOCAL_C_INCLUDES := $(libc_common_c_includes)
783LOCAL_MODULE := libbionic_ssp
784LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
785LOCAL_SYSTEM_SHARED_LIBRARIES :=
786
787include $(BUILD_STATIC_LIBRARY)
788
789
790# ========================================================
791# libc_tzcode.a - upstream 'tzcode' code
792# ========================================================
793
794include $(CLEAR_VARS)
795
796LOCAL_SRC_FILES := $(libc_tzcode_src_files)
797LOCAL_CFLAGS := \
798    $(libc_common_cflags) \
799    -DSTD_INSPIRED=1 \
800    -DTZDIR=\"/system/usr/share/zoneinfo\" \
801    -DTM_GMTOFF=tm_gmtoff \
802    -DUSG_COMPAT=1
803LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
804LOCAL_CPPFLAGS := $(libc_common_cppflags)
805LOCAL_C_INCLUDES := $(libc_common_c_includes)
806LOCAL_MODULE := libc_tzcode
807LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
808LOCAL_SYSTEM_SHARED_LIBRARIES :=
809
810include $(BUILD_STATIC_LIBRARY)
811
812
813# ========================================================
814# libc_dns.a - modified NetBSD DNS code
815# ========================================================
816
817include $(CLEAR_VARS)
818
819LOCAL_SRC_FILES := $(libc_dns_src_files)
820LOCAL_CFLAGS := \
821    $(libc_common_cflags) \
822    -DINET6 \
823    -I$(LOCAL_PATH)/private \
824    -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers
825
826LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
827LOCAL_CPPFLAGS := $(libc_common_cppflags)
828LOCAL_C_INCLUDES := $(libc_common_c_includes)
829LOCAL_MODULE := libc_dns
830LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
831LOCAL_SYSTEM_SHARED_LIBRARIES :=
832
833include $(BUILD_STATIC_LIBRARY)
834
835
836# ========================================================
837# libc_freebsd.a - upstream FreeBSD C library code
838# ========================================================
839#
840# These files are built with the freebsd-compat.h header file
841# automatically included.
842
843include $(CLEAR_VARS)
844
845LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
846LOCAL_CFLAGS := \
847    $(libc_common_cflags) \
848    -I$(LOCAL_PATH)/upstream-freebsd \
849    -I$(LOCAL_PATH)/upstream-freebsd/libc/include \
850    -include upstream-freebsd/freebsd-compat.h
851LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
852LOCAL_CPPFLAGS := $(libc_common_cppflags)
853LOCAL_C_INCLUDES := $(libc_common_c_includes)
854LOCAL_MODULE := libc_freebsd
855LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
856LOCAL_SYSTEM_SHARED_LIBRARIES :=
857
858include $(BUILD_STATIC_LIBRARY)
859
860
861# ========================================================
862# libc_netbsd.a - upstream NetBSD C library code
863# ========================================================
864#
865# These files are built with the netbsd-compat.h header file
866# automatically included.
867
868include $(CLEAR_VARS)
869
870LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
871LOCAL_CFLAGS := \
872    $(libc_common_cflags) \
873    -DPOSIX_MISTAKE \
874    -I$(LOCAL_PATH)/upstream-netbsd \
875    -I$(LOCAL_PATH)/upstream-netbsd/libc/include \
876    -include upstream-netbsd/netbsd-compat.h
877LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
878LOCAL_CPPFLAGS := $(libc_common_cppflags)
879LOCAL_C_INCLUDES := $(libc_common_c_includes)
880LOCAL_MODULE := libc_netbsd
881LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
882LOCAL_SYSTEM_SHARED_LIBRARIES :=
883
884include $(BUILD_STATIC_LIBRARY)
885
886
887# ========================================================
888# libc_bionic.a - home-grown C library code
889# ========================================================
890#
891include $(CLEAR_VARS)
892
893LOCAL_SRC_FILES := $(libc_bionic_src_files)
894LOCAL_CFLAGS := $(libc_common_cflags) -Werror
895LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
896LOCAL_CPPFLAGS := $(libc_common_cppflags)
897LOCAL_C_INCLUDES := $(libc_common_c_includes)
898LOCAL_MODULE := libc_bionic
899LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
900LOCAL_SYSTEM_SHARED_LIBRARIES :=
901
902include $(BUILD_STATIC_LIBRARY)
903
904
905# ========================================================
906# libc_common.a
907# ========================================================
908
909include $(CLEAR_VARS)
910
911LOCAL_SRC_FILES := $(libc_common_src_files)
912LOCAL_CFLAGS := $(libc_common_cflags)
913LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
914LOCAL_CPPFLAGS := $(libc_common_cppflags)
915LOCAL_C_INCLUDES := $(libc_common_c_includes)
916LOCAL_MODULE := libc_common
917LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
918LOCAL_WHOLE_STATIC_LIBRARIES := \
919    libbionic_ssp \
920    libc_bionic \
921    libc_dns \
922    libc_freebsd \
923    libc_netbsd \
924    libc_tzcode \
925
926LOCAL_SYSTEM_SHARED_LIBRARIES :=
927
928# TODO: split out the asflags.
929LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
930
931include $(BUILD_STATIC_LIBRARY)
932
933
934# ========================================================
935# libc_nomalloc.a
936# ========================================================
937#
938# This is a version of the static C library that does not
939# include malloc. It's useful in situations when the user wants
940# to provide their own malloc implementation, or wants to
941# explicitly disallow the use of the use of malloc,
942# such as in the dynamic loader.
943
944include $(CLEAR_VARS)
945
946LOCAL_SRC_FILES := \
947	$(libc_arch_static_src_files) \
948	$(libc_static_common_src_files) \
949	bionic/libc_init_static.cpp
950
951LOCAL_C_INCLUDES := $(libc_common_c_includes)
952LOCAL_CFLAGS := $(libc_common_cflags) \
953                -DLIBC_STATIC
954LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
955LOCAL_CPPFLAGS := $(libc_common_cppflags)
956
957LOCAL_MODULE := libc_nomalloc
958LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
959LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
960LOCAL_SYSTEM_SHARED_LIBRARIES :=
961
962include $(BUILD_STATIC_LIBRARY)
963
964
965# ========================================================
966# libc.a
967# ========================================================
968include $(CLEAR_VARS)
969
970LOCAL_SRC_FILES := \
971	$(libc_arch_static_src_files) \
972	$(libc_static_common_src_files) \
973	bionic/dlmalloc.c \
974	bionic/malloc_debug_common.cpp \
975	bionic/libc_init_static.cpp
976
977LOCAL_CFLAGS := $(libc_common_cflags) \
978                -DLIBC_STATIC
979LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
980LOCAL_CPPFLAGS := $(libc_common_cppflags)
981LOCAL_C_INCLUDES := $(libc_common_c_includes)
982LOCAL_MODULE := libc
983LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
984LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
985LOCAL_SYSTEM_SHARED_LIBRARIES :=
986
987include $(BUILD_STATIC_LIBRARY)
988
989
990# ========================================================
991# libc.so
992# ========================================================
993include $(CLEAR_VARS)
994
995# pthread deadlock prediction:
996# set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for
997# pthread deadlock prediction.
998# Since this code is experimental it is disabled by default.
999# see libc/bionic/pthread_debug.c for details
1000
1001LOCAL_CFLAGS := $(libc_common_cflags) -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0
1002LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1003LOCAL_CPPFLAGS := $(libc_common_cppflags)
1004LOCAL_C_INCLUDES := $(libc_common_c_includes)
1005
1006LOCAL_SRC_FILES := \
1007	$(libc_arch_dynamic_src_files) \
1008	$(libc_static_common_src_files) \
1009	bionic/dlmalloc.c \
1010	bionic/malloc_debug_common.cpp \
1011	bionic/pthread_debug.cpp \
1012	bionic/libc_init_dynamic.cpp
1013
1014ifeq ($(TARGET_ARCH),arm)
1015	LOCAL_NO_CRT := true
1016	LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
1017
1018	LOCAL_SRC_FILES := \
1019		arch-common/bionic/crtbegin_so.c \
1020		arch-arm/bionic/atexit_legacy.c \
1021		$(LOCAL_SRC_FILES) \
1022		arch-common/bionic/crtend_so.S
1023endif
1024
1025LOCAL_MODULE:= libc
1026LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1027LOCAL_REQUIRED_MODULES := tzdata
1028
1029# WARNING: The only library libc.so should depend on is libdl.so!  If you add other libraries,
1030# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries.  This
1031# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
1032# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
1033# should, instead relying on the external symbols from the dependent libraries.  That would
1034# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
1035# you wanted!
1036
1037LOCAL_SHARED_LIBRARIES := libdl
1038LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1039LOCAL_SYSTEM_SHARED_LIBRARIES :=
1040
1041include $(BUILD_SHARED_LIBRARY)
1042
1043
1044# For all builds, except for the -user build we will enable memory
1045# allocation checking (including memory leaks, buffer overwrites, etc.)
1046# Note that all these checks are also controlled by env. settings
1047# that can enable, or disable specific checks. Note also that some of
1048# the checks are available only in emulator and are implemeted in
1049# libc_malloc_qemu_instrumented.so.
1050ifneq ($(TARGET_BUILD_VARIANT),user)
1051
1052# ========================================================
1053# libc_malloc_debug_leak.so
1054# ========================================================
1055include $(CLEAR_VARS)
1056
1057LOCAL_CFLAGS := \
1058	$(libc_common_cflags) \
1059	-DMALLOC_LEAK_CHECK
1060LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1061LOCAL_CPPFLAGS := $(libc_common_cppflags)
1062
1063LOCAL_C_INCLUDES := $(libc_common_c_includes)
1064
1065LOCAL_SRC_FILES := \
1066	bionic/debug_mapinfo.cpp \
1067	bionic/debug_stacktrace.cpp \
1068	bionic/malloc_debug_leak.cpp \
1069	bionic/malloc_debug_check.cpp \
1070
1071LOCAL_MODULE:= libc_malloc_debug_leak
1072LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1073
1074LOCAL_SHARED_LIBRARIES := libc libdl
1075LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1076LOCAL_SYSTEM_SHARED_LIBRARIES :=
1077LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
1078
1079# Don't install on release build
1080LOCAL_MODULE_TAGS := eng debug
1081
1082include $(BUILD_SHARED_LIBRARY)
1083
1084
1085# ========================================================
1086# libc_malloc_debug_qemu.so
1087# ========================================================
1088include $(CLEAR_VARS)
1089
1090LOCAL_CFLAGS := \
1091	$(libc_common_cflags) \
1092	-DMALLOC_QEMU_INSTRUMENT
1093LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1094LOCAL_CPPFLAGS := $(libc_common_cppflags)
1095
1096LOCAL_C_INCLUDES := $(libc_common_c_includes)
1097
1098LOCAL_SRC_FILES := \
1099	bionic/malloc_debug_qemu.cpp
1100
1101LOCAL_MODULE:= libc_malloc_debug_qemu
1102LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1103
1104LOCAL_SHARED_LIBRARIES := libc libdl
1105LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1106LOCAL_SYSTEM_SHARED_LIBRARIES :=
1107
1108# Don't install on release build
1109LOCAL_MODULE_TAGS := eng debug
1110
1111include $(BUILD_SHARED_LIBRARY)
1112
1113endif	#!user
1114
1115
1116# ========================================================
1117include $(call all-makefiles-under,$(LOCAL_PATH))
1118