source: trunk/libs/newlib/src/newlib/libc/stdlib/Makefile.am @ 620

Last change on this file since 620 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 6.7 KB
Line 
1## Process this file with automake to generate Makefile.in
2
3AUTOMAKE_OPTIONS = cygnus
4
5INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
6
7GENERAL_SOURCES = \
8        __adjust.c      \
9        __atexit.c      \
10        __call_atexit.c \
11        __exp10.c       \
12        __ten_mu.c      \
13        _Exit.c         \
14        abort.c         \
15        abs.c           \
16        aligned_alloc.c \
17        assert.c        \
18        atexit.c        \
19        atof.c          \
20        atoff.c         \
21        atoi.c          \
22        atol.c          \
23        calloc.c        \
24        div.c           \
25        dtoa.c          \
26        dtoastub.c      \
27        environ.c       \
28        envlock.c       \
29        eprintf.c       \
30        exit.c          \
31        gdtoa-gethex.c  \
32        gdtoa-hexnan.c  \
33        getenv.c        \
34        getenv_r.c      \
35        imaxabs.c       \
36        imaxdiv.c       \
37        itoa.c          \
38        labs.c          \
39        ldiv.c          \
40        ldtoa.c         \
41        malloc.c        \
42        mblen.c         \
43        mblen_r.c       \
44        mbstowcs.c      \
45        mbstowcs_r.c    \
46        mbtowc.c        \
47        mbtowc_r.c      \
48        mlock.c         \
49        mprec.c         \
50        mstats.c        \
51        on_exit_args.c  \
52        quick_exit.c    \
53        rand.c          \
54        rand_r.c        \
55        random.c        \
56        realloc.c       \
57        reallocarray.c  \
58        reallocf.c      \
59        sb_charsets.c   \
60        strtod.c        \
61        strtodg.c       \
62        strtoimax.c     \
63        strtol.c        \
64        strtorx.c       \
65        strtoul.c       \
66        strtoumax.c     \
67        utoa.c          \
68        wcstod.c        \
69        wcstoimax.c     \
70        wcstol.c        \
71        wcstoul.c       \
72        wcstoumax.c     \
73        wcstombs.c      \
74        wcstombs_r.c    \
75        wctomb.c        \
76        wctomb_r.c
77
78if HAVE_LONG_DOUBLE
79GENERAL_SOURCES += \
80        strtold.c \
81        wcstold.c
82endif # HAVE_LONG_DOUBLE
83
84if NEWLIB_NANO_MALLOC
85MALIGNR=nano-malignr
86MALLOPTR=nano-malloptr
87PVALLOCR=nano-pvallocr
88VALLOCR=nano-vallocr
89FREER=nano-freer
90REALLOCR=nano-reallocr
91CALLOCR=nano-callocr
92CFREER=nano-cfreer
93MALLINFOR=nano-mallinfor
94MALLSTATSR=nano-mallstatsr
95MSIZER=nano-msizer
96MALLOCR=nano-mallocr
97else
98MALIGNR=malignr
99MALLOPTR=malloptr
100PVALLOCR=pvallocr
101VALLOCR=vallocr
102FREER=freer
103REALLOCR=reallocr
104CALLOCR=callocr
105CFREER=cfreer
106MALLINFOR=mallinfor
107MALLSTATSR=mallstatsr
108MSIZER=msizer
109MALLOCR=mallocr
110endif
111
112EXTENDED_SOURCES = \
113        arc4random.c    \
114        arc4random_uniform.c \
115        cxa_atexit.c    \
116        cxa_finalize.c  \
117        drand48.c       \
118        ecvtbuf.c       \
119        efgcvt.c        \
120        erand48.c       \
121        jrand48.c       \
122        lcong48.c       \
123        lrand48.c       \
124        mrand48.c       \
125        msize.c         \
126        mtrim.c         \
127        nrand48.c       \
128        rand48.c        \
129        seed48.c        \
130        srand48.c       \
131        strtoll.c       \
132        strtoll_r.c     \
133        strtoull.c      \
134        strtoull_r.c    \
135        wcstoll.c       \
136        wcstoll_r.c     \
137        wcstoull.c      \
138        wcstoull_r.c    \
139        atoll.c         \
140        llabs.c         \
141        lldiv.c
142
143ELIX_2_SOURCES = \
144        a64l.c          \
145        btowc.c         \
146        getopt.c        \
147        getsubopt.c     \
148        l64a.c          \
149        malign.c        \
150        mbrlen.c        \
151        mbrtowc.c       \
152        mbsinit.c       \
153        mbsnrtowcs.c    \
154        mbsrtowcs.c     \
155        on_exit.c       \
156        valloc.c        \
157        wcrtomb.c       \
158        wcsnrtombs.c    \
159        wcsrtombs.c     \
160        wctob.c
161
162ELIX_2_OBJS = \
163        $(lpfx)$(MALIGNR).$(oext)       \
164        $(lpfx)$(MALLOPTR).$(oext) \
165        $(lpfx)$(PVALLOCR).$(oext)      \
166        $(lpfx)$(VALLOCR).$(oext)
167
168ELIX_3_SOURCES = \
169        putenv.c        \
170        putenv_r.c      \
171        setenv.c        \
172        setenv_r.c
173
174ELIX_4_SOURCES = \
175        rpmatch.c       \
176        system.c
177
178if ELIX_LEVEL_1
179ELIX_SOURCES =
180ELIX_OBJS =
181else
182if ELIX_LEVEL_2
183ELIX_SOURCES = $(ELIX_2_SOURCES)
184ELIX_OBJS = $(ELIX_2_OBJS)
185else
186if ELIX_LEVEL_3
187ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES)
188ELIX_OBJS = $(ELIX_2_OBJS)
189else
190ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) $(ELIX_4_SOURCES)
191ELIX_OBJS = $(ELIX_2_OBJS)
192endif
193endif
194endif
195
196# Because of how libtool moves objects around, mallocr must be built last.
197LIBADD_OBJS = $(lpfx)$(FREER).$(oext) $(lpfx)$(REALLOCR).$(oext) \
198        $(lpfx)$(CALLOCR).$(oext) $(lpfx)$(CFREER).$(oext) \
199        $(lpfx)$(MALLINFOR).$(oext) $(lpfx)$(MALLSTATSR).$(oext) \
200        $(lpfx)$(MSIZER).$(oext) $(lpfx)$(MALLOCR).$(oext)
201
202libstdlib_la_LDFLAGS = -Xcompiler -nostdlib
203
204if USE_LIBTOOL
205noinst_LTLIBRARIES = libstdlib.la
206libstdlib_la_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES)
207libstdlib_la_LIBADD =  $(LIBADD_OBJS) $(ELIX_OBJS)
208libstdlib_la_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS)
209LIB_COMPILE = $(LTCOMPILE)
210noinst_DATA = objectlist.awk.in
211else
212noinst_LIBRARIES = lib.a
213lib_a_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES)
214lib_a_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS)
215lib_a_CFLAGS = $(AM_CFLAGS)
216lib_a_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS)
217LIB_COMPILE = $(COMPILE)
218noinst_DATA =
219endif # USE_LIBTOOL
220
221include $(srcdir)/../../Makefile.shared
222
223MALLOC_COMPILE = $(LIB_COMPILE) -DINTERNAL_NEWLIB
224
225$(lpfx)$(MALLOCR).$(oext): $(MALLOCR).c
226        $(MALLOC_COMPILE) -DDEFINE_MALLOC -c $(srcdir)/$(MALLOCR).c -o $@
227
228$(lpfx)$(FREER).$(oext): $(MALLOCR).c
229        $(MALLOC_COMPILE) -DDEFINE_FREE -c $(srcdir)/$(MALLOCR).c -o $@
230
231$(lpfx)$(REALLOCR).$(oext): $(MALLOCR).c
232        $(MALLOC_COMPILE) -DDEFINE_REALLOC -c $(srcdir)/$(MALLOCR).c -o $@
233
234$(lpfx)$(CALLOCR).$(oext): $(MALLOCR).c
235        $(MALLOC_COMPILE) -DDEFINE_CALLOC -c $(srcdir)/$(MALLOCR).c -o $@
236
237$(lpfx)$(CFREER).$(oext): $(MALLOCR).c
238        $(MALLOC_COMPILE) -DDEFINE_CFREE -c $(srcdir)/$(MALLOCR).c -o $@
239
240$(lpfx)$(MALIGNR).$(oext): $(MALLOCR).c
241        $(MALLOC_COMPILE) -DDEFINE_MEMALIGN -c $(srcdir)/$(MALLOCR).c -o $@
242
243$(lpfx)$(VALLOCR).$(oext): $(MALLOCR).c
244        $(MALLOC_COMPILE) -DDEFINE_VALLOC -c $(srcdir)/$(MALLOCR).c -o $@
245
246$(lpfx)$(PVALLOCR).$(oext): $(MALLOCR).c
247        $(MALLOC_COMPILE) -DDEFINE_PVALLOC -c $(srcdir)/$(MALLOCR).c -o $@
248
249$(lpfx)$(MALLINFOR).$(oext): $(MALLOCR).c
250        $(MALLOC_COMPILE) -DDEFINE_MALLINFO -c $(srcdir)/$(MALLOCR).c -o $@
251
252$(lpfx)$(MALLSTATSR).$(oext): $(MALLOCR).c
253        $(MALLOC_COMPILE) -DDEFINE_MALLOC_STATS -c $(srcdir)/$(MALLOCR).c -o $@
254
255$(lpfx)$(MSIZER).$(oext): $(MALLOCR).c
256        $(MALLOC_COMPILE) -DDEFINE_MALLOC_USABLE_SIZE -c $(srcdir)/$(MALLOCR).c -o $@
257
258$(lpfx)$(MALLOPTR).$(oext): $(MALLOCR).c
259        $(MALLOC_COMPILE) -DDEFINE_MALLOPT -c $(srcdir)/$(MALLOCR).c -o $@
260
261CHEWOUT_FILES= \
262        _Exit.def       \
263        a64l.def        \
264        abort.def       \
265        abs.def         \
266        assert.def      \
267        atexit.def      \
268        atof.def        \
269        atoi.def        \
270        atoll.def       \
271        calloc.def      \
272        div.def         \
273        ecvtbuf.def     \
274        efgcvt.def      \
275        envlock.def     \
276        exit.def        \
277        getenv.def      \
278        itoa.def        \
279        labs.def        \
280        ldiv.def        \
281        llabs.def       \
282        lldiv.def       \
283        malloc.def      \
284        mblen.def       \
285        mbsnrtowcs.def  \
286        mbstowcs.def    \
287        mbtowc.def      \
288        mlock.def       \
289        mstats.def      \
290        on_exit.def     \
291        rand.def        \
292        rand48.def      \
293        random.def      \
294        rpmatch.def     \
295        strtod.def      \
296        strtol.def      \
297        strtoll.def     \
298        strtoul.def     \
299        strtoull.def    \
300        utoa.def        \
301        wcsnrtombs.def  \
302        wcstod.def      \
303        wcstol.def      \
304        wcstoll.def     \
305        wcstoul.def     \
306        wcstoull.def    \
307        system.def      \
308        wcstombs.def    \
309        wctomb.def     
310
311CHAPTERS = stdlib.tex
312
313$(lpfx)dtoa.$(oext): dtoa.c mprec.h
314$(lpfx)ldtoa.$(oext): ldtoa.c mprec.h
315$(lpfx)ecvtbuf.$(oext): ecvtbuf.c mprec.h
316$(lpfx)mbtowc_r.$(oext): mbtowc_r.c mbctype.h
317$(lpfx)mprec.$(oext): mprec.c mprec.h
318$(lpfx)strtod.$(oext): strtod.c mprec.h
319$(lpfx)gdtoa-gethex.$(oext): gdtoa-gethex.c mprec.h
320$(lpfx)gdtoa-hexnan.$(oext): gdtoa-hexnan.c mprec.h
321$(lpfx)wctomb_r.$(oext): wctomb_r.c mbctype.h
322$(lpfx)drand48.$(oext): drand48.c rand48.h
323$(lpfx)erand48.$(oext): erand48.c rand48.h
324$(lpfx)jrand48.$(oext): jrand48.c rand48.h
325$(lpfx)lcong48.$(oext): lcong48.c rand48.h
326$(lpfx)lrand48.$(oext): lrand48.c rand48.h
327$(lpfx)mrand48.$(oext): mrand48.c rand48.h
328$(lpfx)nrand48.$(oext): nrand48.c rand48.h
329$(lpfx)rand48.$(oext): rand48.c rand48.h
330$(lpfx)seed48.$(oext): seed48.c rand48.h
331$(lpfx)srand48.$(oext): srand48.c rand48.h
Note: See TracBrowser for help on using the repository browser.