Files
glibc/stdlib/Makefile
T

120 lines
4.1 KiB
Makefile
Raw Normal View History

2002-01-29 09:21:41 +00:00
# Copyright (C) 1991-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1995-02-18 01:27:10 +00:00
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
2001-07-06 04:58:11 +00:00
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
1995-02-18 01:27:10 +00:00
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2001-07-06 04:58:11 +00:00
# Lesser General Public License for more details.
1995-02-18 01:27:10 +00:00
2001-07-06 04:58:11 +00:00
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
1995-02-18 01:27:10 +00:00
#
# Makefile for stdlib routines
#
subdir := stdlib
1997-12-28 16:01:53 +00:00
headers := stdlib.h alloca.h monetary.h fmtmsg.h ucontext.h sys/ucontext.h \
2002-07-20 01:14:41 +00:00
inttypes.h stdint.h bits/wordsize.h bits/wchar.h \
errno.h sys/errno.h bits/errno.h
1995-02-18 01:27:10 +00:00
routines := \
1997-02-10 03:19:57 +00:00
atof atoi atol atoll \
1995-02-18 01:27:10 +00:00
abort \
bsearch qsort msort \
1996-12-08 08:01:13 +00:00
getenv putenv setenv secure-getenv \
2001-02-26 17:53:15 +00:00
exit on_exit atexit cxa_atexit cxa_finalize old_atexit \
abs labs llabs \
div ldiv lldiv \
1995-02-18 01:27:10 +00:00
mblen mbstowcs mbtowc wcstombs wctomb \
1996-12-07 03:30:25 +00:00
random random_r rand rand_r \
drand48 erand48 lrand48 nrand48 mrand48 jrand48 \
srand48 seed48 lcong48 \
drand48_r erand48_r lrand48_r nrand48_r mrand48_r jrand48_r \
srand48_r seed48_r lcong48_r \
drand48-iter \
1997-02-25 05:18:05 +00:00
strtol strtoul strtoll strtoull \
1997-05-24 02:30:09 +00:00
strtol_l strtoul_l strtoll_l strtoull_l \
1995-02-18 01:27:10 +00:00
strtof strtod strtold \
1997-05-24 02:30:09 +00:00
strtof_l strtod_l strtold_l \
system canonicalize \
a64l l64a \
1997-12-28 16:01:53 +00:00
rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \
1998-01-25 17:01:47 +00:00
strtoimax strtoumax wcstoimax wcstoumax \
getcontext setcontext makecontext swapcontext
1995-02-18 01:27:10 +00:00
2001-02-26 17:53:15 +00:00
# These routines will be omitted from the libc shared object.
# Instead the static object files will be included in a special archive
# linked against when the shared library will be used.
static-only-routines = atexit
2002-12-17 06:52:45 +00:00
distribute := exit.h grouping.h abort-instr.h isomac.c tst-fmtmsg.sh \
2002-10-10 00:42:24 +00:00
allocalim.h
2000-10-27 23:37:52 +00:00
test-srcs := tst-fmtmsg
2002-12-17 06:52:45 +00:00
tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
test-canon test-canon2 tst-strtoll tst-environ \
tst-xpg-basename tst-random tst-bsearch tst-limits \
tst-rand48 bug-strtod tst-setcontext test-a64l tst-qsort \
tst-system
1995-02-18 01:27:10 +00:00
# Several mpn functions from GNU MP are used by the strtod function.
mpn-routines := inlines add_n addmul_1 cmp divmod_1 divrem udiv_qrnnd \
lshift rshift mod_1 mul mul_1 mul_n sub_n submul_1
mpn-headers = longlong.h gmp.h gmp-impl.h gmp-mparam.h asm-syntax.h
routines := $(strip $(routines) $(mpn-routines)) \
dbl2mpn ldbl2mpn \
mpn2flt mpn2dbl mpn2ldbl
2002-03-14 20:48:50 +00:00
aux := fpioconst mp_clz_tab
distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h
1998-02-11 11:59:55 +00:00
generated += isomac isomac.out
1998-06-26 14:47:05 +00:00
CFLAGS-bsearch.c = $(exceptions)
CFLAGS-msort.c = $(exceptions)
CFLAGS-qsort.c = $(exceptions)
2001-02-07 19:07:39 +00:00
include ../Makeconfig
ifneq (,$(filter %REENTRANT, $(defines)))
CFLAGS-strfmon.c = -D_IO_MTSAFE_IO
CFLAGS-strfmon_l.c = -D_IO_MTSAFE_IO
endif
2001-02-26 17:53:15 +00:00
ifeq (yes,$(have-protected))
CFLAGS-atexit.c = -DHAVE_DOT_HIDDEN
endif
1995-02-18 01:27:10 +00:00
include ../Rules
2000-05-17 11:04:21 +00:00
# Testdir has to be named stdlib and needs to be writable
2000-07-12 20:06:44 +00:00
test-canon-ARGS = --test-dir=${common-objpfx}stdlib
2000-05-17 11:04:21 +00:00
2001-01-24 22:19:16 +00:00
tst-strtod-ENV = LOCPATH=$(common-objpfx)localedata
1998-02-11 11:59:55 +00:00
# Run a test on the header files we use.
2001-02-26 17:53:15 +00:00
tests: $(objpfx)isomac.out
ifeq (no,$(cross-compiling))
tests: $(objpfx)tst-fmtmsg.out
endif
2000-07-16 07:30:42 +00:00
$(objpfx)isomac.out: $(objpfx)isomac
2001-01-23 12:46:59 +00:00
$(dir $<)$(notdir $<) '$(CC)' \
'-I../include -I.. $(+sysdep-includes) $(sysincludes)' > $<.out
1998-02-11 11:59:55 +00:00
2001-09-12 18:50:25 +00:00
isomac-CFLAGS = -O
1998-02-11 11:59:55 +00:00
$(objpfx)isomac: isomac.c
$(native-compile)
2000-10-27 23:37:52 +00:00
$(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/