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