xref: /freebsd/lib/libc/stdlib/Makefile.inc (revision e2afbc45258f2fa4bdcf126e959ac660e76fc802)
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	strtoimax.c \
59	strtol.c \
60	strtold.c \
61	strtoll.c \
62	strtoq.c \
63	strtoul.c \
64	strtonum.c \
65	strtoull.c \
66	strtoumax.c \
67	strtouq.c \
68	system.c \
69	tdelete.c \
70	tdestroy.c \
71	tfind.c \
72	tsearch.c \
73	twalk.c
74
75CFLAGS.qsort.c+= -Wsign-compare
76
77# Work around an issue on case-insensitive file systems.
78# libc has both _Exit.c and _exit.s and they both yield
79# _exit.o (case insensitively speaking).
80CLEANFILES+=C99_Exit.c
81C99_Exit.c: ${LIBC_SRCTOP}/stdlib/_Exit.c .NOMETA
82	ln -sf ${.ALLSRC} ${.TARGET}
83
84SYM_MAPS+= ${LIBC_SRCTOP}/stdlib/Symbol.map
85
86.include "${LIBC_SRCTOP}/stdlib/malloc/Makefile.inc"
87
88# machine-dependent stdlib sources
89.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib/Makefile.inc"
90
91MAN+=	a64l.3 abort.3 abs.3 atexit.3 atof.3 \
92	atoi.3 atol.3 at_quick_exit.3 bsearch.3 \
93	div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
94	hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \
95	lsearch.3 memalignment.3 memory.3 ptsname.3 qsort.3 \
96	quick_exit.3 \
97	radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \
98	set_constraint_handler_s.3 \
99	strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \
100	tsearch.3
101
102MLINKS+=a64l.3 l64a.3 \
103	a64l.3 l64a_r.3
104MLINKS+=atol.3 atoll.3
105MLINKS+=exit.3 _Exit.3
106MLINKS+=getenv.3 clearenv.3 \
107	getenv.3 putenv.3 \
108	getenv.3 secure_getenv.3 \
109	getenv.3 setenv.3 \
110	getenv.3 unsetenv.3
111MLINKS+=getopt_long.3 getopt_long_only.3
112MLINKS+=hcreate.3 hdestroy.3 \
113	hcreate.3 hsearch.3
114MLINKS+=hcreate.3 hcreate_r.3 \
115	hcreate.3 hdestroy_r.3 \
116	hcreate.3 hsearch_r.3
117MLINKS+=insque.3 remque.3
118MLINKS+=lsearch.3 lfind.3
119MLINKS+=ptsname.3 grantpt.3 \
120	ptsname.3 ptsname_r.3 \
121	ptsname.3 unlockpt.3
122MLINKS+=qsort.3 heapsort.3 \
123	qsort.3 heapsort_b.3 \
124	qsort.3 mergesort.3 \
125	qsort.3 mergesort_b.3 \
126	qsort.3 qsort_b.3 \
127	qsort.3 qsort_r.3 \
128	qsort.3 qsort_s.3
129MLINKS+=rand.3 rand_r.3 \
130	rand.3 srand.3
131MLINKS+=random.3 initstate.3 \
132	random.3 setstate.3 \
133	random.3 srandom.3 \
134	random.3 srandomdev.3
135MLINKS+=radixsort.3 sradixsort.3
136MLINKS+=reallocarray.3 recallocarray.3
137MLINKS+=set_constraint_handler_s.3 abort_handler_s.3
138MLINKS+=set_constraint_handler_s.3 ignore_handler_s.3
139MLINKS+=strfmon.3 strfmon_l.3
140MLINKS+=strtod.3 strtof.3 \
141	strtod.3 strtold.3
142MLINKS+=strtol.3 strtoll.3 \
143	strtol.3 strtoq.3 \
144	strtol.3 strtoimax.3
145MLINKS+=strtoul.3 strtoull.3 \
146	strtoul.3 strtouq.3 \
147	strtoul.3 strtoumax.3
148MLINKS+=tsearch.3 tdelete.3 \
149	tsearch.3 tfind.3 \
150	tsearch.3 twalk.3 \
151	tsearch.3 tdestroy.3
152