xref: /freebsd/lib/libc/stdlib/Makefile.inc (revision f5dc2263ab1be8a35a7e27e82103f9ccd41ae584)
1# machine-independent stdlib sources
2.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib
3
4MISRCS+= \
5	C99_Exit.c \
6	a64l.c \
7	abort.c \
8	abs.c \
9	atexit.c \
10	atof.c \
11	atoi.c \
12	atol.c \
13	atoll.c \
14	bsearch.c \
15	bsearch_b.c \
16	cxa_thread_atexit.c \
17	cxa_thread_atexit_impl.c \
18	div.c \
19	exit.c \
20	getenv.c \
21	getopt.c \
22	getopt_long.c \
23	getsubopt.c \
24	hcreate.c \
25	hcreate_r.c \
26	hdestroy_r.c \
27	heapsort.c \
28	heapsort_b.c \
29	hsearch_r.c \
30	imaxabs.c \
31	imaxdiv.c \
32	insque.c \
33	l64a.c \
34	labs.c \
35	ldiv.c \
36	llabs.c \
37	lldiv.c \
38	lsearch.c \
39	memalignment.c \
40	merge.c \
41	mergesort_b.c \
42	ptsname.c \
43	qsort.c \
44	qsort_r.c \
45	qsort_r_compat.c \
46	qsort_s.c \
47	quick_exit.c \
48	radixsort.c \
49	rand.c \
50	random.c \
51	reallocarray.c \
52	reallocf.c \
53	realpath.c \
54	recallocarray.c \
55	remque.c \
56	set_constraint_handler_s.c \
57	strfmon.c \
58	strfrom.c \
59	strfromd.c \
60	strfromf.c \
61	strfroml.c \
62	strtoimax.c \
63	strtol.c \
64	strtold.c \
65	strtoll.c \
66	strtoq.c \
67	strtoul.c \
68	strtonum.c \
69	strtoull.c \
70	strtoumax.c \
71	strtouq.c \
72	system.c \
73	tdelete.c \
74	tdestroy.c \
75	tfind.c \
76	tsearch.c \
77	twalk.c
78
79CFLAGS.qsort.c+= -Wsign-compare
80
81# Work around an issue on case-insensitive file systems.
82# libc has both _Exit.c and _exit.s and they both yield
83# _exit.o (case insensitively speaking).
84CLEANFILES+=C99_Exit.c
85C99_Exit.c: ${LIBC_SRCTOP}/stdlib/_Exit.c .NOMETA
86	ln -sf ${.ALLSRC} ${.TARGET}
87
88SYM_MAPS+= ${LIBC_SRCTOP}/stdlib/Symbol.map
89
90.include "${LIBC_SRCTOP}/stdlib/malloc/Makefile.inc"
91
92# machine-dependent stdlib sources
93.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib/Makefile.inc"
94
95MAN+=	a64l.3 abort.3 abs.3 atexit.3 atof.3 \
96	atoi.3 atol.3 at_quick_exit.3 bsearch.3 \
97	div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
98	hcreate.3 insque.3 \
99	lsearch.3 memalignment.3 memory.3 ptsname.3 qsort.3 \
100	quick_exit.3 \
101	radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \
102	set_constraint_handler_s.3 \
103	strfmon.3 strfromd.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \
104	tsearch.3
105
106MLINKS+=a64l.3 l64a.3 \
107	a64l.3 l64a_r.3
108MLINKS+=abs.3 labs.3 \
109	abs.3 llabs.3 \
110	abs.3 imaxabs.3
111MLINKS+=atol.3 atoll.3
112MLINKS+=div.3 ldiv.3 \
113	div.3 lldiv.3 \
114	div.3 imaxdiv.3
115MLINKS+=exit.3 _Exit.3
116MLINKS+=getenv.3 clearenv.3 \
117	getenv.3 putenv.3 \
118	getenv.3 secure_getenv.3 \
119	getenv.3 setenv.3 \
120	getenv.3 unsetenv.3
121MLINKS+=getopt_long.3 getopt_long_only.3
122MLINKS+=hcreate.3 hdestroy.3 \
123	hcreate.3 hsearch.3
124MLINKS+=hcreate.3 hcreate_r.3 \
125	hcreate.3 hdestroy_r.3 \
126	hcreate.3 hsearch_r.3
127MLINKS+=insque.3 remque.3
128MLINKS+=lsearch.3 lfind.3
129MLINKS+=ptsname.3 grantpt.3 \
130	ptsname.3 ptsname_r.3 \
131	ptsname.3 unlockpt.3
132MLINKS+=qsort.3 heapsort.3 \
133	qsort.3 heapsort_b.3 \
134	qsort.3 mergesort.3 \
135	qsort.3 mergesort_b.3 \
136	qsort.3 qsort_b.3 \
137	qsort.3 qsort_r.3 \
138	qsort.3 qsort_s.3
139MLINKS+=rand.3 rand_r.3 \
140	rand.3 srand.3
141MLINKS+=random.3 initstate.3 \
142	random.3 setstate.3 \
143	random.3 srandom.3 \
144	random.3 srandomdev.3
145MLINKS+=radixsort.3 sradixsort.3
146MLINKS+=reallocarray.3 recallocarray.3
147MLINKS+=set_constraint_handler_s.3 abort_handler_s.3
148MLINKS+=set_constraint_handler_s.3 ignore_handler_s.3
149MLINKS+=strfmon.3 strfmon_l.3
150MLINKS+=strfromd.3 strfromf.3 \
151	strfromd.3 strfroml.3
152MLINKS+=strtod.3 strtof.3 \
153	strtod.3 strtold.3
154MLINKS+=strtol.3 strtoll.3 \
155	strtol.3 strtoq.3 \
156	strtol.3 strtoimax.3
157MLINKS+=strtonum.3 strtonumx.3
158MLINKS+=strtoul.3 strtoull.3 \
159	strtoul.3 strtouq.3 \
160	strtoul.3 strtoumax.3
161MLINKS+=tsearch.3 tdelete.3 \
162	tsearch.3 tfind.3 \
163	tsearch.3 twalk.3 \
164	tsearch.3 tdestroy.3
165