1 # from @(#)Makefile.inc 8.3 (Berkeley) 2/4/95
2 # $FreeBSD: src/lib/libc/stdlib/Makefile.inc,v 1.45 2003/04/05 07:33:46 tjr Exp $
4 # machine-dependent stdlib sources
5 .sinclude "${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc"
7 # machine-independent stdlib sources
8 .PATH: ${.CURDIR}/stdlib
9 CWD := ${.CURDIR}/stdlib
11 MISRCS+=a64l.c grantpt.c l64a.c
13 .include "Makefile.fbsd_begin"
14 FBSDMISRCS=_Exit_.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
15 bsearch.c div.c exit.c getenv.c getopt.c getopt_long.c getsubopt.c \
16 hcreate.c heapsort.c imaxabs.c imaxdiv.c insque.c labs.c \
17 ldiv.c llabs.c lldiv.c lsearch.c merge.c putenv.c qsort.c qsort_r.c \
18 radixsort.c rand.c random.c reallocf.c realpath.c remque.c setenv.c \
19 strhash.c strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c \
20 strtoull.c strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c \
23 .include "Makefile.fbsd_end"
25 .include "Makefile.nbsd_begin"
26 NBSDMISRCS = strfmon.c
27 .include "Makefile.nbsd_end"
29 # 4302056: compile qsort.c and bsearch.c with -fexceptions
30 .for _src in qsort-fbsd.c bsearch-fbsd.c
31 CFLAGS-${_src} += -fexceptions
34 PRIV_INSTHDRS += ${SRCROOT}/stdlib/atexit.h
36 .include "Makefile.obsd_begin"
37 OBSDMISRCS=ecvt.c gcvt.c
38 .include "Makefile.obsd_end"
40 LEGACYSRCS+= getopt.c putenv.c realpath.c setenv.c system.c
41 DARWINEXTSNSRCS += realpath.c
42 CANCELABLESRCS += system.c
44 # set the LIBC_ALIAS_* macros so we can decorate the symbol independent
45 # of other macro settings
46 CFLAGS-getopt-fbsd.c += -DLIBC_ALIAS_GETOPT
47 CFLAGS-putenv-fbsd.c += -DLIBC_ALIAS_PUTENV
48 CFLAGS-realpath-fbsd.c += -DLIBC_ALIAS_REALPATH
49 CFLAGS-setenv-fbsd.c += -DLIBC_ALIAS_SETENV -DLIBC_ALIAS_UNSETENV
50 CFLAGS-system-fbsd.c += -DLIBC_ALIAS_SYSTEM
53 MAN3+= a64l.3 grantpt.3
54 MAN3+= strtod_l.3 strtol_l.3
56 .include "Makefile.fbsd_begin"
57 FBSDMAN3= abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \
58 div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
59 hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \
60 lsearch.3 memory.3 qsort.3 radixsort.3 rand.3 random.3 realpath.3 \
61 strtod.3 strtol.3 strtoul.3 system.3 tsearch.3
62 .include "Makefile.fbsd_end"
64 .include "Makefile.nbsd_begin"
66 .include "Makefile.nbsd_end"
68 .include "Makefile.obsd_begin"
70 .include "Makefile.obsd_end"
72 MLINKS+= a64l.3 l64a.3
74 MLINKS+= atof.3 atof_l.3
76 MLINKS+= atoi.3 atoi_l.3
78 MLINKS+= atol.3 atol_l.3 \
82 MLINKS+= ecvt.3 fcvt.3 \
85 MLINKS+= exit.3 _Exit.3
87 MLINKS+= getenv.3 putenv.3 \
91 MLINKS+= getopt_long.3 getopt_long_only.3
93 MLINKS+= grantpt.3 posix_openpt.3 \
97 MLINKS+= hcreate.3 hdestroy.3 \
100 MLINKS+= insque.3 remque.3
102 MLINKS+= lsearch.3 lfind.3
104 MLINKS+= qsort.3 heapsort.3 \
105 qsort.3 mergesort.3 \
108 MLINKS+= radixsort.3 sradixsort.3
110 MLINKS+= rand.3 rand_r.3 \
114 MLINKS+= random.3 initstate.3 \
115 random.3 setstate.3 \
117 random.3 srandomdev.3
119 MLINKS+=strfmon.3 strfmon_l.3
121 MLINKS+= strtod.3 strtof.3 \
124 MLINKS+= strtod_l.3 strtof_l.3 \
125 strtod_l.3 strtold_l.3
127 MLINKS+= strtol.3 strtoll.3 \
131 MLINKS+= strtol_l.3 strtoimax_l.3 \
132 strtol_l.3 strtoll_l.3 \
133 strtol_l.3 strtoq_l.3 \
134 strtol_l.3 strtoul_l.3 \
135 strtol_l.3 strtoull_l.3 \
136 strtol_l.3 strtoumax_l.3 \
137 strtol_l.3 strtouq_l.3
139 MLINKS+= strtoul.3 strtoull.3 \
140 strtoul.3 strtoumax.3 \
143 MLINKS+= tsearch.3 tdelete.3 \