xref: /freebsd/lib/libc/gen/Makefile.inc (revision e63d20b70ee1dbee9b075f29de6f30cdcfe1abe1)
1
2# machine-independent gen sources
3.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen ${SRCTOP}/etc
4
5CONFS+=	group master.passwd shells
6CONFSMODE_master.passwd=	600
7CONFSPACKAGE=   runtime
8
9SRCS+= \
10	__pthread_mutex_init_calloc_cb_stub.c \
11	__xuname.c \
12	_once_stub.c \
13	_pthread_stubs.c \
14	_rand48.c \
15	_spinlock_stub.c \
16	_thread_init.c \
17	aio_read2.c \
18	aio_write2.c \
19	alarm.c \
20	arc4random.c \
21	arc4random-compat.c \
22	arc4random_uniform.c \
23	assert.c \
24	basename.c \
25	basename_compat.c \
26	cap_sandboxed.c \
27	check_utility_compat.c \
28	clock.c \
29	clock_getcpuclockid.c \
30	closedir.c \
31	confstr.c \
32	cpuset_alloc.c \
33	cpuset_free.c \
34	crypt.c \
35	ctermid.c \
36	daemon.c \
37	devname.c \
38	devname-compat11.c \
39	dirfd.c \
40	dirname.c \
41	dirname_compat.c \
42	disklabel.c \
43	dlfcn.c \
44	drand48.c \
45	dup3.c \
46	elf_utils.c \
47	erand48.c \
48	err.c \
49	errlst.c \
50	eventfd.c \
51	exec.c \
52	exect.c \
53	fdevname.c \
54	feature_present.c \
55	fmtcheck.c \
56	fmtmsg.c \
57	fnmatch.c \
58	fpclassify.c \
59	frexp.c \
60	fstab.c \
61	ftok.c \
62	fts.c \
63	fts-compat.c \
64	fts-compat11.c \
65	ftw.c \
66	ftw-compat11.c \
67	getbootfile.c \
68	getbsize.c \
69	getcap.c \
70	getcwd.c \
71	getdomainname.c \
72	getentropy.c \
73	getgrent.c \
74	getgrouplist.c \
75	gethostname.c \
76	getloadavg.c \
77	getlogin.c \
78	getmntinfo.c \
79	getmntinfo-compat11.c \
80	getnetgrent.c \
81	getosreldate.c \
82	getpeereid.c \
83	getprogname.c \
84	getpwent.c \
85	getttyent.c \
86	getusershell.c \
87	getutxent.c \
88	getvfsbyname.c \
89	glob.c \
90	glob-compat11.c \
91	initgroups.c \
92	isatty.c \
93	isinf.c \
94	isnan.c \
95	jrand48.c \
96	kqueue1.c \
97	lcong48.c \
98	libc_dlopen.c \
99	libc_interposing_table.c  \
100	lrand48.c \
101	memalign.c \
102	memfd_create.c \
103	mrand48.c \
104	nftw.c \
105	nftw-compat11.c \
106	nice.c \
107	nlist.c \
108	nrand48.c \
109	opendir.c \
110	pause.c \
111	pmadvise.c \
112	popen.c \
113	posix_spawn.c \
114	psignal.c \
115	pututxline.c \
116	pw_scan.c \
117	raise.c \
118	readdir.c \
119	readdir-compat11.c \
120	readpassphrase.c \
121	rewinddir.c \
122	scandir.c \
123	scandir_b.c \
124	scandir-compat11.c \
125	sched_getaffinity.c \
126	sched_setaffinity.c \
127	seed48.c \
128	seekdir.c \
129	semctl.c \
130	setdomainname.c \
131	sethostname.c \
132	setjmperr.c \
133	setmode.c \
134	setproctitle.c \
135	setprogname.c \
136	siginterrupt.c \
137	siglist.c \
138	signal.c \
139	sigsetops.c \
140	sleep.c \
141	srand48.c \
142	statvfs.c \
143	stringlist.c \
144	strtofflags.c \
145	sysconf.c \
146	sysctl.c \
147	sysctlbyname.c \
148	sysctlnametomib.c \
149	syslog.c \
150	telldir.c \
151	termios.c \
152	time.c \
153	times.c \
154	timespec_get.c \
155	timespec_getres.c \
156	timezone.c \
157	tls.c \
158	ttyname.c \
159	ttyslot.c \
160	ualarm.c \
161	ulimit.c \
162	uname.c \
163	unvis-compat.c \
164	usleep.c \
165	utime.c \
166	utxdb.c \
167	valloc.c \
168	wordexp.c
169
170CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20
171
172CFLAGS.sysconf.c= -I${SRCTOP}/contrib/tzcode
173
174CFLAGS.dlfcn.c= ${RTLD_HDRS}
175CFLAGS.tls.c= ${RTLD_HDRS}
176
177.PATH: ${SRCTOP}/contrib/libc-pwcache
178SRCS+=	pwcache.c pwcache.h
179
180.PATH: ${SRCTOP}/contrib/libc-vis
181CFLAGS+=	-I${SRCTOP}/contrib/libc-vis
182SRCS+=	unvis.c vis.c
183
184MISRCS+=modf.c
185
186CANCELPOINTS_SRCS=sem.c sem_new.c
187.for src in ${CANCELPOINTS_SRCS}
188SRCS+=cancelpoints_${src}
189CLEANFILES+=cancelpoints_${src}
190cancelpoints_${src}: ${LIBC_SRCTOP}/gen/${src} .NOMETA
191	ln -sf ${.ALLSRC} ${.TARGET}
192.endfor
193
194SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map
195
196# machine-dependent gen sources
197.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/gen/Makefile.inc"
198
199MAN+=	alarm.3 \
200	arc4random.3 \
201	basename.3 \
202	cap_rights_get.3 \
203	cap_sandboxed.3 \
204	check_utility_compat.3 \
205	clock.3 \
206	clock_getcpuclockid.3 \
207	confstr.3 \
208	ctermid.3 \
209	daemon.3 \
210	devname.3 \
211	directory.3 \
212	dirname.3 \
213	dl_iterate_phdr.3 \
214	dladdr.3 \
215	dlinfo.3 \
216	dllockinit.3 \
217	dlopen.3 \
218	dup3.3 \
219	err.3 \
220	exec.3 \
221	feature_present.3 \
222	fmtcheck.3 \
223	fmtmsg.3 \
224	fnmatch.3 \
225	fpclassify.3 \
226	frexp.3 \
227	ftok.3 \
228	fts.3 \
229	ftw.3 \
230	getbootfile.3 \
231	getbsize.3 \
232	getcap.3 \
233	getcontext.3 \
234	getcwd.3 \
235	getdiskbyname.3 \
236	getdomainname.3 \
237	getentropy.3 \
238	getfsent.3 \
239	getgrent.3 \
240	getgrouplist.3 \
241	gethostname.3 \
242	getloadavg.3 \
243	getmntinfo.3 \
244	getnetgrent.3 \
245	getosreldate.3 \
246	getpass.3 \
247	getpeereid.3 \
248	getprogname.3 \
249	getpwent.3 \
250	getttyent.3 \
251	getusershell.3 \
252	getutxent.3 \
253	getvfsbyname.3 \
254	glob.3 \
255	initgroups.3 \
256	isgreater.3 \
257	ldexp.3 \
258	makecontext.3 \
259	modf.3 \
260	nice.3 \
261	nlist.3 \
262	pause.3 \
263	popen.3 \
264	posix_spawn.3 \
265	posix_spawn_file_actions_addopen.3 \
266	posix_spawn_file_actions_init.3 \
267	posix_spawnattr_getflags.3 \
268	posix_spawnattr_getpgroup.3 \
269	posix_spawnattr_getschedparam.3 \
270	posix_spawnattr_getschedpolicy.3 \
271	posix_spawnattr_init.3 \
272	posix_spawnattr_getsigdefault.3 \
273	posix_spawnattr_getsigmask.3 \
274	psignal.3 \
275	pwcache.3 \
276	raise.3 \
277	rand48.3 \
278	readpassphrase.3 \
279	scandir.3 \
280	sem_destroy.3 \
281	sem_getvalue.3 \
282	sem_init.3 \
283	sem_open.3 \
284	sem_post.3 \
285	sem_timedwait.3 \
286	sem_wait.3 \
287	setjmp.3 \
288	setmode.3 \
289	setproctitle.3 \
290	siginterrupt.3 \
291	signal.3 \
292	sigsetops.3 \
293	statvfs.3 \
294	stringlist.3 \
295	strtofflags.3 \
296	sysconf.3 \
297	sysctl.3 \
298	syslog.3 \
299	tcgetpgrp.3 \
300	tcgetsid.3 \
301	tcgetwinsize.3 \
302	tcsendbreak.3 \
303	tcsetattr.3 \
304	tcsetpgrp.3 \
305	tcsetsid.3 \
306	time.3 \
307	times.3 \
308	timespec_get.3 \
309	timespec_getres.3 \
310	ttyname.3 \
311	ualarm.3 \
312	ucontext.3 \
313	ulimit.3 \
314	uname.3 \
315	unvis.3 \
316	utime.3 \
317	valloc.3 \
318	vis.3 \
319	wordexp.3
320
321MLINKS+=arc4random.3 arc4random_buf.3 \
322	arc4random.3 arc4random_uniform.3
323MLINKS+=ctermid.3 ctermid_r.3
324MLINKS+=daemon.3 daemonfd.3
325MLINKS+=devname.3 devname_r.3
326MLINKS+=devname.3 fdevname.3
327MLINKS+=devname.3 fdevname_r.3
328MLINKS+=directory.3 closedir.3 \
329	directory.3 dirfd.3 \
330	directory.3 fdclosedir.3 \
331	directory.3 fdopendir.3 \
332	directory.3 opendir.3 \
333	directory.3 readdir.3 \
334	directory.3 readdir_r.3 \
335	directory.3 rewinddir.3 \
336	directory.3 seekdir.3 \
337	directory.3 telldir.3
338MLINKS+=dlopen.3 fdlopen.3 \
339	dlopen.3 dlclose.3 \
340	dlopen.3 dlerror.3 \
341	dlopen.3 dlfunc.3 \
342	dlopen.3 dlsym.3 \
343	dlopen.3 dlvsym.3
344MLINKS+=err.3 err_set_exit.3 \
345	err.3 err_set_file.3 \
346	err.3 errc.3 \
347	err.3 errx.3 \
348	err.3 verr.3 \
349	err.3 verrc.3 \
350	err.3 verrx.3 \
351	err.3 vwarn.3 \
352	err.3 vwarnc.3 \
353	err.3 vwarnx.3 \
354	err.3 warnc.3 \
355	err.3 warn.3 \
356	err.3 warnx.3
357MLINKS+=exec.3 execl.3 \
358	exec.3 execle.3 \
359	exec.3 execlp.3 \
360	exec.3 exect.3 \
361	exec.3 execv.3 \
362	exec.3 execvP.3 \
363	exec.3 execvp.3
364MLINKS+=fpclassify.3 finite.3 \
365	fpclassify.3 finitef.3 \
366	fpclassify.3 isfinite.3 \
367	fpclassify.3 isinf.3 \
368	fpclassify.3 isnan.3 \
369	fpclassify.3 isnormal.3
370MLINKS+=frexp.3 frexpf.3 \
371	frexp.3 frexpl.3
372MLINKS+=fts.3 fts_children.3 \
373	fts.3 fts_close.3 \
374	fts.3 fts_open.3 \
375	fts.3 fts_read.3 \
376	fts.3 fts_set.3 \
377	fts.3 fts_set_clientptr.3 \
378	fts.3 fts_get_clientptr.3 \
379	fts.3 fts_get_stream.3
380MLINKS+=ftw.3 nftw.3
381MLINKS+=getcap.3 cgetcap.3 \
382	getcap.3 cgetclose.3 \
383	getcap.3 cgetent.3 \
384	getcap.3 cgetfirst.3 \
385	getcap.3 cgetmatch.3 \
386	getcap.3 cgetnext.3 \
387	getcap.3 cgetnum.3 \
388	getcap.3 cgetset.3 \
389	getcap.3 cgetstr.3 \
390	getcap.3 cgetustr.3
391MLINKS+=getcwd.3 getwd.3
392MLINKS+=getcontext.3 getcontextx.3
393MLINKS+=getcontext.3 setcontext.3
394MLINKS+=getdomainname.3 setdomainname.3
395MLINKS+=getfsent.3 endfsent.3 \
396	getfsent.3 getfsfile.3 \
397	getfsent.3 getfsspec.3 \
398	getfsent.3 getfstype.3 \
399	getfsent.3 setfsent.3 \
400	getfsent.3 setfstab.3 \
401	getfsent.3 getfstab.3
402MLINKS+=getgrent.3 endgrent.3 \
403	getgrent.3 getgrgid.3 \
404	getgrent.3 getgrnam.3 \
405	getgrent.3 setgrent.3 \
406	getgrent.3 setgroupent.3 \
407	getgrent.3 getgrent_r.3 \
408	getgrent.3 getgrnam_r.3 \
409	getgrent.3 getgrgid_r.3
410MLINKS+=gethostname.3 sethostname.3
411MLINKS+=getnetgrent.3 endnetgrent.3 \
412	getnetgrent.3 getnetgrent_r.3 \
413	getnetgrent.3 innetgr.3 \
414	getnetgrent.3 setnetgrent.3
415MLINKS+=getprogname.3 setprogname.3
416MLINKS+=getpwent.3 endpwent.3 \
417	getpwent.3 getpwnam.3 \
418	getpwent.3 getpwuid.3 \
419	getpwent.3 setpassent.3 \
420	getpwent.3 setpwent.3 \
421	getpwent.3 setpwfile.3 \
422	getpwent.3 getpwent_r.3 \
423	getpwent.3 getpwnam_r.3 \
424	getpwent.3 getpwuid_r.3
425MLINKS+=getttyent.3 endttyent.3 \
426	getttyent.3 getttynam.3 \
427	getttyent.3 isdialuptty.3 \
428	getttyent.3 isnettty.3 \
429	getttyent.3 setttyent.3
430MLINKS+=getusershell.3 endusershell.3 \
431	getusershell.3 setusershell.3
432MLINKS+=getutxent.3 endutxent.3 \
433	getutxent.3 getutxid.3 \
434	getutxent.3 getutxline.3 \
435	getutxent.3 getutxuser.3 \
436	getutxent.3 pututxline.3 \
437	getutxent.3 setutxdb.3 \
438	getutxent.3 setutxent.3 \
439	getutxent.3 utmpx.3
440MLINKS+=glob.3 globfree.3
441MLINKS+=isgreater.3 isgreaterequal.3 \
442	isgreater.3 isless.3 \
443	isgreater.3 islessequal.3 \
444	isgreater.3 islessgreater.3 \
445	isgreater.3 isunordered.3
446MLINKS+=ldexp.3 ldexpf.3 \
447	ldexp.3 ldexpl.3
448MLINKS+=makecontext.3 swapcontext.3
449MLINKS+=modf.3 modff.3 \
450	modf.3 modfl.3
451MLINKS+=popen.3 pclose.3
452MLINKS+=posix_spawn.3 posix_spawnp.3 \
453	posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \
454	posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclosefrom_np.3 \
455	posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \
456	posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir_np.3 \
457	posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir_np.3 \
458	posix_spawn_file_actions_init.3 posix_spawn_file_actions_destroy.3 \
459	posix_spawnattr_getflags.3 posix_spawnattr_setflags.3 \
460	posix_spawnattr_getpgroup.3 posix_spawnattr_setpgroup.3 \
461	posix_spawnattr_getschedparam.3 posix_spawnattr_setschedparam.3 \
462	posix_spawnattr_getschedpolicy.3 posix_spawnattr_setschedpolicy.3 \
463	posix_spawnattr_getsigdefault.3 posix_spawnattr_setsigdefault.3 \
464	posix_spawnattr_getsigmask.3 posix_spawnattr_setsigmask.3 \
465	posix_spawnattr_init.3 posix_spawnattr_destroy.3
466MLINKS+=psignal.3 strsignal.3 \
467	psignal.3 sys_siglist.3 \
468	psignal.3 sys_signame.3
469MLINKS+=pwcache.3 gid_from_group.3 \
470	pwcache.3 group_from_gid.3 \
471	pwcache.3 pwcache_groupdb.3 \
472	pwcache.3 pwcache_userdb.3 \
473	pwcache.3 uid_from_user.3 \
474	pwcache.3 user_from_uid.3
475MLINKS+=rand48.3 _rand48.3 \
476	rand48.3 drand48.3 \
477	rand48.3 erand48.3 \
478	rand48.3 jrand48.3 \
479	rand48.3 lcong48.3 \
480	rand48.3 lrand48.3 \
481	rand48.3 mrand48.3 \
482	rand48.3 nrand48.3 \
483	rand48.3 seed48.3 \
484	rand48.3 srand48.3
485MLINKS+=scandir.3 alphasort.3 \
486	scandir.3 scandirat.3 \
487	scandir.3 scandir_b.3 \
488	scandir.3 versionsort.3
489MLINKS+=sem_open.3 sem_close.3 \
490	sem_open.3 sem_unlink.3
491MLINKS+=sem_wait.3 sem_trywait.3
492MLINKS+=sem_timedwait.3 sem_clockwait_np.3
493MLINKS+=setjmp.3 _longjmp.3 \
494	setjmp.3 _setjmp.3 \
495	setjmp.3 longjmp.3 \
496	setjmp.3 longjmperr.3 \
497	setjmp.3 longjmperror.3 \
498	setjmp.3 siglongjmp.3 \
499	setjmp.3 sigsetjmp.3
500MLINKS+=setmode.3 getmode.3
501MLINKS+=setproctitle.3 setproctitle_fast.3
502MLINKS+=sigsetops.3 sigaddset.3 \
503	sigsetops.3 sigandset.3 \
504	sigsetops.3 sigdelset.3 \
505	sigsetops.3 sigemptyset.3 \
506	sigsetops.3 sigfillset.3 \
507	sigsetops.3 sigisemptyset.3 \
508	sigsetops.3 sigismember.3 \
509	sigsetops.3 sigorset.3
510MLINKS+=statvfs.3 fstatvfs.3
511MLINKS+=stringlist.3 sl_add.3 \
512	stringlist.3 sl_find.3 \
513	stringlist.3 sl_free.3 \
514	stringlist.3 sl_init.3
515MLINKS+=strtofflags.3 fflagstostr.3
516MLINKS+=sysctl.3 sysctlbyname.3 \
517	sysctl.3 sysctlnametomib.3
518MLINKS+=syslog.3 closelog.3 \
519	syslog.3 openlog.3 \
520	syslog.3 setlogmask.3 \
521	syslog.3 vsyslog.3
522MLINKS+=tcgetwinsize.3 tcsetwinsize.3
523MLINKS+=tcsendbreak.3 tcdrain.3 \
524	tcsendbreak.3 tcflow.3 \
525	tcsendbreak.3 tcflush.3
526MLINKS+=tcsetattr.3 cfgetispeed.3 \
527	tcsetattr.3 cfgetospeed.3 \
528	tcsetattr.3 cfmakeraw.3 \
529	tcsetattr.3 cfmakesane.3 \
530	tcsetattr.3 cfsetispeed.3 \
531	tcsetattr.3 cfsetospeed.3 \
532	tcsetattr.3 cfsetspeed.3 \
533	tcsetattr.3 tcgetattr.3
534MLINKS+=ttyname.3 isatty.3 \
535	ttyname.3 ttyname_r.3
536MLINKS+=unvis.3 strunvis.3 \
537	unvis.3 strunvisx.3
538MLINKS+=vis.3 nvis.3 \
539	vis.3 snvis.3 \
540	vis.3 strenvisx.3 \
541	vis.3 strnunvis.3 \
542	vis.3 strnunvisx.3 \
543	vis.3 strnvis.3 \
544	vis.3 strnvisx.3 \
545	vis.3 strsenvisx.3 \
546	vis.3 strsnvis.3 \
547	vis.3 strsnvisx.3 \
548	vis.3 strsvis.3 \
549	vis.3 strsvisx.3 \
550	vis.3 strvis.3 \
551	vis.3 strvisx.3 \
552	vis.3 svis.3
553
554MLINKS+=wordexp.3 wordfree.3
555
556.include <src.tools.mk>
557
558afterinstallconfig: install-passwd
559install-passwd: .PHONY
560.if ${MK_TCSH} == "no"
561	sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
562.endif
563	${PWD_MKDB_CMD} -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
564.if defined(NO_ROOT) && defined(METALOG)
565	( \
566		echo ".${DISTBASE}/etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \
567		echo ".${DISTBASE}/etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \
568		echo ".${DISTBASE}/etc/passwd type=file mode=0644 uname=root gname=wheel"; \
569	) | cat -l >> ${METALOG}
570.endif
571