2000-02-18 03:39:52 +08:00
|
|
|
## Process this file with automake to generate Makefile.in
|
|
|
|
|
|
|
|
AUTOMAKE_OPTIONS = cygnus
|
|
|
|
|
|
|
|
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
|
|
|
|
2002-08-27 02:56:09 +08:00
|
|
|
GENERAL_SOURCES = \
|
2000-02-18 03:39:52 +08:00
|
|
|
__adjust.c \
|
2004-09-10 03:46:54 +08:00
|
|
|
__atexit.c \
|
|
|
|
__call_atexit.c \
|
2000-02-18 03:39:52 +08:00
|
|
|
__exp10.c \
|
|
|
|
__ten_mu.c \
|
2002-06-14 07:24:03 +08:00
|
|
|
_Exit.c \
|
2000-02-18 03:39:52 +08:00
|
|
|
abort.c \
|
|
|
|
abs.c \
|
|
|
|
assert.c \
|
|
|
|
atexit.c \
|
|
|
|
atof.c \
|
|
|
|
atoff.c \
|
|
|
|
atoi.c \
|
|
|
|
atol.c \
|
|
|
|
calloc.c \
|
|
|
|
div.c \
|
|
|
|
dtoa.c \
|
|
|
|
dtoastub.c \
|
|
|
|
environ.c \
|
|
|
|
envlock.c \
|
|
|
|
eprintf.c \
|
|
|
|
exit.c \
|
2006-06-23 01:59:52 +08:00
|
|
|
gdtoa-gethex.c \
|
|
|
|
gdtoa-hexnan.c \
|
2000-02-18 03:39:52 +08:00
|
|
|
getenv.c \
|
|
|
|
getenv_r.c \
|
|
|
|
labs.c \
|
|
|
|
ldiv.c \
|
2000-12-07 07:50:11 +08:00
|
|
|
ldtoa.c \
|
2000-02-18 03:39:52 +08:00
|
|
|
malloc.c \
|
|
|
|
mblen.c \
|
|
|
|
mblen_r.c \
|
|
|
|
mbstowcs.c \
|
|
|
|
mbstowcs_r.c \
|
|
|
|
mbtowc.c \
|
|
|
|
mbtowc_r.c \
|
|
|
|
mlock.c \
|
|
|
|
mprec.c \
|
|
|
|
mstats.c \
|
|
|
|
rand.c \
|
|
|
|
rand_r.c \
|
|
|
|
realloc.c \
|
|
|
|
strtod.c \
|
|
|
|
strtol.c \
|
|
|
|
strtoul.c \
|
2007-07-07 04:03:28 +08:00
|
|
|
wcstol.c \
|
|
|
|
wcstoul.c \
|
2000-02-18 03:39:52 +08:00
|
|
|
wcstombs.c \
|
|
|
|
wcstombs_r.c \
|
|
|
|
wctomb.c \
|
2002-08-30 03:38:25 +08:00
|
|
|
wctomb_r.c
|
2002-08-27 02:56:09 +08:00
|
|
|
|
|
|
|
EXTENDED_SOURCES = \
|
2004-09-10 03:46:54 +08:00
|
|
|
cxa_atexit.c \
|
|
|
|
cxa_finalize.c \
|
2002-08-27 02:56:09 +08:00
|
|
|
drand48.c \
|
|
|
|
ecvtbuf.c \
|
|
|
|
efgcvt.c \
|
|
|
|
erand48.c \
|
|
|
|
jrand48.c \
|
|
|
|
lcong48.c \
|
|
|
|
lrand48.c \
|
|
|
|
mrand48.c \
|
|
|
|
msize.c \
|
|
|
|
mtrim.c \
|
|
|
|
nrand48.c \
|
|
|
|
rand48.c \
|
|
|
|
seed48.c \
|
|
|
|
srand48.c \
|
|
|
|
strtoll.c \
|
|
|
|
strtoll_r.c \
|
|
|
|
strtoull.c \
|
2003-11-28 03:47:19 +08:00
|
|
|
strtoull_r.c \
|
2007-07-07 04:03:28 +08:00
|
|
|
wcstoll.c \
|
|
|
|
wcstoll_r.c \
|
|
|
|
wcstoull.c \
|
|
|
|
wcstoull_r.c \
|
2003-11-28 03:47:19 +08:00
|
|
|
atoll.c \
|
|
|
|
llabs.c \
|
|
|
|
lldiv.c
|
2002-08-27 02:56:09 +08:00
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
ELIX_2_SOURCES = \
|
|
|
|
a64l.c \
|
|
|
|
btowc.c \
|
|
|
|
getopt.c \
|
|
|
|
getsubopt.c \
|
|
|
|
l64a.c \
|
|
|
|
malign.c \
|
|
|
|
mbrlen.c \
|
|
|
|
mbrtowc.c \
|
|
|
|
mbsinit.c \
|
|
|
|
mbsrtowcs.c \
|
|
|
|
on_exit.c \
|
|
|
|
valloc.c \
|
|
|
|
wcrtomb.c \
|
|
|
|
wcsrtombs.c \
|
|
|
|
wctob.c
|
|
|
|
|
2002-08-27 02:56:09 +08:00
|
|
|
ELIX_2_OBJS = \
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)malignr.$(oext) \
|
|
|
|
$(lpfx)malloptr.$(oext) \
|
|
|
|
$(lpfx)pvallocr.$(oext) \
|
|
|
|
$(lpfx)vallocr.$(oext)
|
|
|
|
|
|
|
|
ELIX_3_SOURCES = \
|
|
|
|
putenv.c \
|
|
|
|
putenv_r.c \
|
|
|
|
setenv.c \
|
|
|
|
setenv_r.c
|
|
|
|
|
|
|
|
ELIX_4_SOURCES = \
|
|
|
|
system.c
|
2002-08-27 02:56:09 +08:00
|
|
|
|
|
|
|
if ELIX_LEVEL_1
|
2006-05-02 06:01:07 +08:00
|
|
|
ELIX_SOURCES =
|
|
|
|
ELIX_OBJS =
|
2002-08-27 02:56:09 +08:00
|
|
|
else
|
|
|
|
if ELIX_LEVEL_2
|
2006-05-02 06:01:07 +08:00
|
|
|
ELIX_SOURCES = $(ELIX_2_SOURCES)
|
|
|
|
ELIX_OBJS = $(ELIX_2_OBJS)
|
2002-08-27 02:56:09 +08:00
|
|
|
else
|
|
|
|
if ELIX_LEVEL_3
|
2006-05-02 06:01:07 +08:00
|
|
|
ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES)
|
|
|
|
ELIX_OBJS = $(ELIX_2_OBJS)
|
2002-08-27 02:56:09 +08:00
|
|
|
else
|
2006-05-02 06:01:07 +08:00
|
|
|
ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) $(ELIX_4_SOURCES)
|
|
|
|
ELIX_OBJS = $(ELIX_2_OBJS)
|
2002-08-27 02:56:09 +08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
# Because of how libtool moves objects around, mallocr must be built last.
|
2006-05-02 06:01:07 +08:00
|
|
|
LIBADD_OBJS = $(lpfx)freer.$(oext) $(lpfx)reallocr.$(oext) \
|
|
|
|
$(lpfx)callocr.$(oext) $(lpfx)cfreer.$(oext) \
|
|
|
|
$(lpfx)mallinfor.$(oext) $(lpfx)mallstatsr.$(oext) \
|
|
|
|
$(lpfx)msizer.$(oext) $(lpfx)mallocr.$(oext)
|
2001-12-14 07:50:11 +08:00
|
|
|
|
|
|
|
libstdlib_la_LDFLAGS = -Xcompiler -nostdlib
|
|
|
|
|
|
|
|
if USE_LIBTOOL
|
|
|
|
noinst_LTLIBRARIES = libstdlib.la
|
2006-05-02 06:01:07 +08:00
|
|
|
libstdlib_la_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES)
|
|
|
|
libstdlib_la_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS)
|
|
|
|
libstdlib_la_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS)
|
2001-12-14 07:50:11 +08:00
|
|
|
LIB_COMPILE = $(LTCOMPILE)
|
|
|
|
noinst_DATA = objectlist.awk.in
|
|
|
|
else
|
|
|
|
noinst_LIBRARIES = lib.a
|
2006-05-02 06:01:07 +08:00
|
|
|
lib_a_SOURCES = $(GENERAL_SOURCES) $(EXTENDED_SOURCES) $(ELIX_SOURCES)
|
|
|
|
lib_a_LIBADD = $(LIBADD_OBJS) $(ELIX_OBJS)
|
2006-04-12 03:02:16 +08:00
|
|
|
lib_a_CFLAGS = $(AM_CFLAGS)
|
2006-05-02 06:01:07 +08:00
|
|
|
lib_a_DEPENDENCIES = $(LIBADD_OBJS) $(ELIX_OBJS)
|
2001-12-18 10:22:55 +08:00
|
|
|
LIB_COMPILE = $(COMPILE)
|
2001-12-14 07:50:11 +08:00
|
|
|
noinst_DATA =
|
|
|
|
endif # USE_LIBTOOL
|
|
|
|
|
|
|
|
include $(srcdir)/../../Makefile.shared
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
MALLOC_COMPILE = $(LIB_COMPILE) -DINTERNAL_NEWLIB
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)mallocr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_MALLOC -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)freer.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_FREE -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)reallocr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_REALLOC -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)callocr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_CALLOC -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)cfreer.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_CFREE -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)malignr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_MEMALIGN -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)vallocr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_VALLOC -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)pvallocr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_PVALLOC -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)mallinfor.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_MALLINFO -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)mallstatsr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_MALLOC_STATS -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)msizer.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_MALLOC_USABLE_SIZE -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)malloptr.$(oext): mallocr.c
|
2000-02-18 03:39:52 +08:00
|
|
|
$(MALLOC_COMPILE) -DDEFINE_MALLOPT -c $(srcdir)/mallocr.c -o $@
|
|
|
|
|
|
|
|
CHEWOUT_FILES= \
|
2002-06-14 07:24:03 +08:00
|
|
|
_Exit.def \
|
2002-05-07 04:44:54 +08:00
|
|
|
a64l.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
abort.def \
|
|
|
|
abs.def \
|
|
|
|
assert.def \
|
|
|
|
atexit.def \
|
|
|
|
atof.def \
|
|
|
|
atoi.def \
|
2003-11-28 03:47:19 +08:00
|
|
|
atoll.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
calloc.def \
|
|
|
|
div.def \
|
2003-11-28 03:47:19 +08:00
|
|
|
ecvtbuf.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
efgcvt.def \
|
|
|
|
envlock.def \
|
|
|
|
exit.def \
|
|
|
|
getenv.def \
|
|
|
|
labs.def \
|
|
|
|
ldiv.def \
|
2003-11-28 03:47:19 +08:00
|
|
|
llabs.def \
|
|
|
|
lldiv.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
malloc.def \
|
|
|
|
mallocr.def \
|
|
|
|
mblen.def \
|
|
|
|
mbstowcs.def \
|
|
|
|
mbtowc.def \
|
|
|
|
mlock.def \
|
|
|
|
mstats.def \
|
2002-05-16 06:58:10 +08:00
|
|
|
on_exit.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
rand.def \
|
2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
* libc/include/stdlib.h: Add declarations of rand48 functions and
their reentrant versions.
* libc/include/sys/reent.h: Move macros from rand48.h. Add
struct _rand48 for shared parameters of rand48 functions.
(struct _reent): Add a variable _r48 of struct _rand48.
(_REENT_INIT): Add _r48 initialization.
* libc/stdlib/Makefile.am (lib_a_SOURCES): Add rand48 functions.
(CHEWOUT_FILES): Add rand48.def.
* libc/stdlib/Makefile.am: Add dependencies for rand48 functions.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/drand48.c (drand48, _drand48_r): Derived from the
NetBSD C library.
* libc/stdlib/erand48.c (erand48, _erand48_r): Ditto.
* libc/stdlib/jrand48.c (jrand48, _jrand48_r): Ditto.
* libc/stdlib/lcong48.c (lcong48, _lcong48_r): Ditto.
* libc/stdlib/lrand48.c (lrand48, _lrand48_r): Ditto.
* libc/stdlib/mrand48.c (mrand48, _mrand48_r): Ditto.
* libc/stdlib/nrand48.c (nrand48, _nrand48_r): Ditto.
* libc/stdlib/seed48.c (seed48, _seed48_r): Ditto.
* libc/stdlib/srand48.c (srand48, _srand48_r): Ditto.
* libc/stdlib/rand48.c (__dorand48): Ditto.
* libc/stdlib/rand48.h: Ditto, and modify declarations of global
parameters into macros referring them in the reentrant structure.
2001-02-15 10:04:55 +08:00
|
|
|
rand48.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
strtod.def \
|
|
|
|
strtol.def \
|
2001-10-02 02:05:11 +08:00
|
|
|
strtoll.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
strtoul.def \
|
2001-10-02 02:05:11 +08:00
|
|
|
strtoull.def \
|
2007-07-07 04:03:28 +08:00
|
|
|
wcstol.def \
|
|
|
|
wcstoll.def \
|
|
|
|
wcstoul.def \
|
|
|
|
wcstoull.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
system.def \
|
2007-07-07 04:03:28 +08:00
|
|
|
wcstol.def \
|
2000-02-18 03:39:52 +08:00
|
|
|
wcstombs.def \
|
|
|
|
wctomb.def
|
|
|
|
|
|
|
|
SUFFIXES = .def
|
|
|
|
|
|
|
|
CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
|
|
|
|
|
|
|
|
.c.def:
|
|
|
|
$(CHEW) < $< > $*.def 2> $*.ref
|
|
|
|
touch stmp-def
|
|
|
|
|
|
|
|
TARGETDOC = ../tmp.texi
|
|
|
|
|
|
|
|
doc: $(CHEWOUT_FILES)
|
|
|
|
cat $(srcdir)/stdlib.tex >> $(TARGETDOC)
|
|
|
|
|
|
|
|
CLEANFILES = $(CHEWOUT_FILES) *.ref
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)dtoa.$(oext): dtoa.c mprec.h
|
|
|
|
$(lpfx)ldtoa.$(oext): ldtoa.c mprec.h
|
|
|
|
$(lpfx)ecvtbuf.$(oext): ecvtbuf.c mprec.h
|
|
|
|
$(lpfx)mbtowc_r.$(oext): mbtowc_r.c mbctype.h
|
2001-12-14 07:50:11 +08:00
|
|
|
$(LIB_COMPILE) -c -fshort-enums $(srcdir)/mbtowc_r.c -o $@
|
|
|
|
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)mprec.$(oext): mprec.c mprec.h
|
|
|
|
$(lpfx)strtod.$(oext): strtod.c mprec.h
|
2006-06-23 01:59:52 +08:00
|
|
|
$(lpfx)gdtoa-gethex.$(oext): gdtoa-gethex.c mprec.h
|
|
|
|
$(lpfx)gdtoa-hexnan.$(oext): gdtoa-hexnan.c mprec.h
|
2006-05-02 06:01:07 +08:00
|
|
|
$(lpfx)wctomb_r.$(oext): wctomb_r.c mbctype.h
|
|
|
|
$(lpfx)drand48.$(oext): drand48.c rand48.h
|
|
|
|
$(lpfx)erand48.$(oext): erand48.c rand48.h
|
|
|
|
$(lpfx)jrand48.$(oext): jrand48.c rand48.h
|
|
|
|
$(lpfx)lcong48.$(oext): lcong48.c rand48.h
|
|
|
|
$(lpfx)lrand48.$(oext): lrand48.c rand48.h
|
|
|
|
$(lpfx)mrand48.$(oext): mrand48.c rand48.h
|
|
|
|
$(lpfx)nrand48.$(oext): nrand48.c rand48.h
|
|
|
|
$(lpfx)rand48.$(oext): rand48.c rand48.h
|
|
|
|
$(lpfx)seed48.$(oext): seed48.c rand48.h
|
|
|
|
$(lpfx)srand48.$(oext): srand48.c rand48.h
|