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