OSDN Git Service

fixup my copyright notice, trim stale remnants of older notices which
[uclinux-h8/uclibc-ng.git] / libc / stdlib / Makefile.in
1 # Makefile for uClibc
2 #
3 # Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4 #
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 #
7
8 include $(top_srcdir)libc/stdlib/malloc/Makefile.in
9 include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in
10 include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
11
12 CSRC := \
13         abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c \
14         rand.c random.c random_r.c setenv.c system.c div.c ldiv.c lldiv.c \
15         getpt.c ptsname.c grantpt.c unlockpt.c gcvt.c drand48-iter.c jrand48.c \
16         jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
17         nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
18         valloc.c posix_memalign.c a64l.c l64a.c
19 ifeq ($(UCLIBC_HAS_ARC4RANDOM),y)
20 CSRC += arc4random.c
21 endif
22 ifeq ($(UCLIBC_HAS_LFS),y)
23 CSRC += mkstemp64.c
24 endif
25 ifeq ($(UCLIBC_HAS_FLOATS),y)
26 CSRC += drand48.c drand48_r.c erand48.c erand48_r.c
27 endif
28
29 # multi source stdlib.c
30 CSRC += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \
31         qsort.c bsearch.c \
32         llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c
33 # (aliases) strtoq.o strtouq.o
34 ifeq ($(UCLIBC_HAS_FLOATS),y)
35 CSRC += atof.c
36 endif
37 ifeq ($(UCLIBC_HAS_XLOCALE),y)
38 CSRC += strtol_l.c strtoul_l.c _stdlib_strto_l_l.c \
39         strtoll_l.c strtoull_l.c _stdlib_strto_ll_l.c
40 endif
41 ifeq ($(UCLIBC_HAS_WCHAR),y)
42 CSRC += mblen.c mbtowc.c wctomb.c mbstowcs.c wcstombs.c \
43         _stdlib_mb_cur_max.c _stdlib_wcsto_l.c _stdlib_wcsto_ll.c \
44         wcstol.c wcstoul.c wcstoll.c wcstoull.c
45 ifeq ($(UCLIBC_HAS_XLOCALE),y)
46 CSRC +=_stdlib_wcsto_l_l.c _stdlib_wcsto_ll_l.c \
47         wcstol_l.c wcstoul_l.c wcstoll_l.c wcstoull_l.c
48 endif
49 endif
50
51 # multi source _strtod.c
52 ifeq ($(UCLIBC_HAS_FLOATS),y)
53 CSRC += strtod.c strtof.c strtold.c __strtofpmax.c __fp_range_check.c
54 ifeq ($(UCLIBC_HAS_XLOCALE),y)
55 CSRC += strtod_l.c strtof_l.c strtold_l.c __strtofpmax_l.c
56 endif
57 ifeq ($(UCLIBC_HAS_WCHAR),y)
58 CSRC += wcstod.c wcstof.c wcstold.c __wcstofpmax.c
59 ifeq ($(UCLIBC_HAS_XLOCALE),y)
60 CSRC += wcstod_l.c wcstof_l.c wcstold_l.c __wcstofpmax_l.c
61 endif
62 endif
63 endif
64 # (aliases) wcstoq.o wcstouq.o
65 # wcstod wcstof wcstold
66
67 # multi source _atexit.c
68 CSRC += __cxa_atexit.c __cxa_finalize.c __exit_handler.c exit.c on_exit.c
69 ifeq ($(COMPAT_ATEXIT),y)
70 CSRC += old_atexit.c
71 endif
72
73 STDLIB_DIR := $(top_srcdir)libc/stdlib
74 STDLIB_OUT := $(top_builddir)libc/stdlib
75
76 STDLIB_SRC := $(patsubst %.c,$(STDLIB_DIR)/%.c,$(CSRC))
77 STDLIB_OBJ := $(patsubst %.c,$(STDLIB_OUT)/%.o,$(CSRC))
78
79 libc-y += $(STDLIB_OBJ)
80 libc-static-y += $(STDLIB_OUT)/atexit.o
81 # this should always be the PIC version, because it could be used in shared libs
82 libc-nonshared-y += $(STDLIB_OUT)/atexit.os
83
84 libc-nomulti-y += $(STDLIB_OUT)/labs.o $(STDLIB_OUT)/atol.o $(STDLIB_OUT)/_stdlib_strto_l.o $(STDLIB_OUT)/_stdlib_strto_ll.o
85 libc-nomulti-$(UCLIBC_HAS_XLOCALE) += $(STDLIB_OUT)/_stdlib_strto_l_l.o $(STDLIB_OUT)/_stdlib_strto_ll_l.o
86
87 objclean-y += stdlib_objclean
88
89 stdlib_objclean:
90         $(RM) $(STDLIB_OUT)/*.{o,os,oS}