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