xref: /dragonfly/lib/libc/sys/Makefile.inc (revision 5af8357c)
1#	@(#)Makefile.inc	8.3 (Berkeley) 10/24/94
2# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.75.2.7 2003/04/22 17:31:18 trhodes Exp $
3
4# sys sources
5.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys ${.CURDIR}/../libc/sys
6
7CMAPS+=	${.CURDIR}/sys/Symbol.map
8
9# Include the generated makefile containing the *complete* list
10# of syscall names in MIASM.
11.include "${.CURDIR}/../../sys/sys/syscall.mk"
12
13# Include machine dependent definitions.
14#
15# MDASM names override the default syscall names in MIASM.
16# NOASM will prevent the default syscall code from being generated.
17#
18.include "${.CURDIR}/../libc/${MACHINE_ARCH}/sys/Makefile.inc"
19
20SRCS+=	fork.c
21
22# Sources common to both syscall interfaces:
23SRCS+=	ftruncate.c lseek.c mmap.c truncate.c
24SRCS+=	pread.c pwrite.c preadv.c pwritev.c
25SRCS+=	sched_getaffinity.c sched_getcpu.c sched_setaffinity.c
26
27# Add machine dependent asm sources:
28SRCS+=	${MDASM}
29
30# Look through the complete list of syscalls (MIASM) for names that are
31# not defined with machine dependent implementations (MDASM) and are
32# not declared for no generation of default code (NOASM).
33.for _asm in ${MIASM}
34.if (${MDASM:R:M${_asm:R}} == "")
35.if (${NOASM:R:M${_asm:R}} == "")
36ASM+=	${_asm}
37.endif
38.endif
39.endfor
40
41OBJS+=	${ASM} ${PSEUDO}
42
43SASM=	${ASM:S/.o/.S/}
44
45SPSEUDO= ${PSEUDO:S/.o/.S/}
46
47SRCS+=	${SASM} ${SPSEUDO}
48
49# Generated files
50CLEANFILES+=	${SASM} ${SPSEUDO}
51
52# Generate the syscalls source-files
53NOTE_GNU_STACK='.section .note.GNU-stack,"",%%progbits\n'
54
55${SASM}:
56	printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
57	printf  ${NOTE_GNU_STACK} >> ${.TARGET}
58
59${SPSEUDO}:
60	printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \
61	    > ${.TARGET}
62	printf  ${NOTE_GNU_STACK} >> ${.TARGET}
63
64MAN+=	_exit.2 accept.2 access.2 acct.2 adjtime.2 bind.2 \
65	sys_checkpoint.2 chdir.2 chflags.2 \
66	chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 closefrom.2 \
67	connect.2 dup.2 exec_sys_register.2 execve.2 extattr.2 extexit.2 \
68	fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \
69	getdirentries.2 getdtablesize.2 \
70	getfh.2 getfsstat.2 getgid.2 getgroups.2 getitimer.2 getlogin.2 \
71	getpeername.2 getpgrp.2 getpid.2 getpriority.2 getrandom.2 \
72	getrlimit.2 getrusage.2 getsid.2 getsockname.2 \
73	getsockopt.2 gettimeofday.2 getuid.2 \
74	intro.2 ioctl.2 ioprio_get.2 issetugid.2 \
75	jail.2 jail_attach.2 kenv.2 kill.2 \
76	kldfind.2 kldfirstmod.2 kldload.2 kldnext.2 kldstat.2 kldsym.2 \
77	kldunload.2 ktrace.2 kqueue.2 link.2 listen.2 lseek.2 \
78	lwp_create.2 lwp_gettid.2 lwp_kill.2 lwp_setname.2 lwp_setaffinity.2 \
79	madvise.2 mincore.2 minherit.2 mkdir.2 mkfifo.2 mknod.2 mlock.2 \
80	mlockall.2 mmap.2 \
81	modfind.2 modnext.2 modstat.2 \
82	mount.2 mountctl.2 mprotect.2 \
83	msgctl.2 msgget.2 msgrcv.2 msgsnd.2 \
84	msync.2 munmap.2 nanosleep.2 \
85	nfssvc.2 ntp_adjtime.2 ntp_gettime.2 open.2 \
86	pathconf.2 pipe.2 poll.2 posix_fallocate.2 \
87	procctl.2 profil.2 pselect.2 ptrace.2 \
88	quotactl.2 \
89	read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \
90	rtprio.2 __realpath.2 \
91	sbrk.2 sched_getcpu.2 sched_get_priority_max.2 sched_setaffinity.2 \
92	sched_setparam.2 sched_setscheduler.2 sched_yield.2 \
93	select.2 semctl.2 semget.2 semop.2 send.2 sendfile.2 \
94	setgroups.2 setpgid.2 setregid.2 setresuid.2 setreuid.2 setsid.2 \
95	setuid.2 shmat.2 shmctl.2 shmget.2 shutdown.2 \
96	syscap_get.2 \
97	sigaction.2 sigaltstack.2 sigpending.2 sigprocmask.2 sigreturn.2 \
98	sigsuspend.2 sigwaitinfo.2 socket.2 socketpair.2 \
99	stat.2 statfs.2 statvfs.2 swapon.2 \
100	symlink.2 sync.2 sysarch.2 syscall.2 \
101	truncate.2 tls.2 umask.2 umtx.2 undelete.2 \
102	unlink.2 unlinkat.2 utimensat.2 utimes.2 utrace.2 usched_set.2 \
103	uuidgen.2 \
104	varsym.2 vfork.2 vquotactl.2 wait.2 write.2
105
106MLINKS+=accept.2 accept4.2
107MLINKS+=access.2 eaccess.2 \
108	access.2 faccessat.2
109MLINKS+=chdir.2 fchdir.2
110MLINKS+=chflags.2 chflagsat.2 \
111	chflags.2 fchflags.2 \
112	chflags.2 lchflags.2
113MLINKS+=chmod.2 fchmod.2 \
114	chmod.2 fchmodat.2 \
115	chmod.2 lchmod.2
116MLINKS+=chown.2 fchown.2 \
117	chown.2 fchownat.2 \
118	chown.2 lchown.2
119MLINKS+=chroot.2 chroot_kernel.2
120MLINKS+=clock_gettime.2 clock_getres.2 \
121	clock_gettime.2 clock_settime.2
122MLINKS+=dup.2 dup2.2
123MLINKS+=exec_sys_register.2 exec_sys_unregister.2
124MLINKS+=execve.2 fexecve.2
125MLINKS+=extattr.2 extattr_delete_file.2 \
126	extattr.2 extattr_get_file.2 \
127	extattr.2 extattr_set_file.2
128MLINKS+=fhopen.2 fhstat.2 \
129	fhopen.2 fhstatfs.2 \
130	fhopen.2 fhstatvfs.2
131MLINKS+=fsync.2 fdatasync.2
132MLINKS+=getdirentries.2 _DIRENT_DIRSIZ.2 \
133	getdirentries.2 _DIRENT_NEXT.2 \
134	getdirentries.2 getdents.2
135MLINKS+=getfsstat.2 getvfsstat.2
136MLINKS+=getgid.2 getegid.2
137MLINKS+=getitimer.2 setitimer.2
138MLINKS+=getlogin.2 getlogin_r.3 \
139	getlogin.2 setlogin.2
140MLINKS+=getpgrp.2 getpgid.2
141MLINKS+=getpid.2 getppid.2
142MLINKS+=getpriority.2 setpriority.2
143MLINKS+=getrlimit.2 setrlimit.2
144MLINKS+=getsockopt.2 setsockopt.2
145MLINKS+=gettimeofday.2 settimeofday.2
146MLINKS+=getuid.2 geteuid.2
147MLINKS+=intro.2 errno.2
148MLINKS+=ioprio_get.2 ioprio_set.2
149MLINKS+=kqueue.2 EV_SET.2 \
150	kqueue.2 kevent.2
151MLINKS+=link.2 linkat.2
152MLINKS+=lseek.2 seek.2
153MLINKS+=lwp_create.2 lwp_create2.2
154MLINKS+=lwp_setaffinity.2 lwp_getaffinity.2
155MLINKS+=lwp_setname.2 lwp_getname.2
156MLINKS+=madvise.2 mcontrol.2 \
157	madvise.2 posix_madvise.3
158MLINKS+=mkdir.2 mkdirat.2
159MLINKS+=mkfifo.2 mkfifoat.2
160MLINKS+=mknod.2 mknodat.2
161MLINKS+=mlock.2 munlock.2
162MLINKS+=mlockall.2 munlockall.2
163MLINKS+=modnext.2 modfnext.2
164MLINKS+=mount.2 unmount.2
165MLINKS+=msgctl.2 msgctl.3
166MLINKS+=msgget.2 msgget.3
167MLINKS+=msgrcv.2 msgrcv.3
168MLINKS+=msgsnd.2 msgsnd.3
169MLINKS+=nanosleep.2 clock_nanosleep.2
170MLINKS+=open.2 openat.2
171MLINKS+=pathconf.2 fpathconf.2 \
172	pathconf.2 lpathconf.2
173MLINKS+=pipe.2 pipe2.2
174MLINKS+=poll.2 ppoll.2
175MLINKS+=read.2 extpread.2 \
176	read.2 extpreadv.2 \
177	read.2 pread.2 \
178	read.2 preadv.2 \
179	read.2 readv.2
180MLINKS+=readlink.2 readlinkat.2
181MLINKS+=recv.2 recvfrom.2 \
182	recv.2 recvmsg.2
183MLINKS+=rename.2 renameat.2
184MLINKS+=rtprio.2 lwp_rtprio.2
185MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \
186	sched_get_priority_max.2 sched_rr_get_interval.2
187MLINKS+=sched_setaffinity.2 CPU_AND.3 \
188	sched_setaffinity.2 CPU_CLR.3 \
189	sched_setaffinity.2 CPU_COUNT.3 \
190	sched_setaffinity.2 CPU_EQUAL.3 \
191	sched_setaffinity.2 CPU_ISSET.3 \
192	sched_setaffinity.2 CPU_OR.3 \
193	sched_setaffinity.2 CPU_SET.3 \
194	sched_setaffinity.2 CPU_XOR.3 \
195	sched_setaffinity.2 CPU_ZERO.3 \
196	sched_setaffinity.2 sched_getaffinity.2
197MLINKS+=sched_setparam.2 sched_getparam.2
198MLINKS+=sched_setscheduler.2 sched_getscheduler.2
199MLINKS+=select.2 FD_CLR.2 \
200	select.2 FD_ISSET.2 \
201	select.2 FD_SET.2 \
202	select.2 FD_ZERO.2
203MLINKS+=semctl.2 semctl.3
204MLINKS+=semget.2 semget.3
205MLINKS+=semop.2 semop.3
206MLINKS+=send.2 sendmsg.2 \
207	send.2 sendto.2
208MLINKS+=setpgid.2 setpgrp.3
209MLINKS+=setresuid.2 getresgid.2 \
210	setresuid.2 getresuid.2 \
211	setresuid.2 setresgid.2
212MLINKS+=setuid.2 setegid.2 \
213	setuid.2 seteuid.2 \
214	setuid.2 setgid.2
215MLINKS+=shmat.2 shmat.3 \
216	shmat.2 shmdt.2
217MLINKS+=shmctl.2 shmctl.3
218MLINKS+=shmget.2 shmget.3
219MLINKS+=sigwaitinfo.2 sigtimedwait.2
220MLINKS+=stat.2 fstat.2 \
221	stat.2 fstatat.2 \
222	stat.2 lstat.2
223MLINKS+=statfs.2 fstatfs.2
224MLINKS+=statvfs.2 fstatvfs.2
225MLINKS+=symlink.2 symlinkat.2
226MLINKS+=syscall.2 __syscall.2
227MLINKS+=syscap_get.2 syscap_set.2
228MLINKS+=swapon.2 swapoff.2
229MLINKS+=tls.2 get_tls_area.2 \
230	tls.2 set_tls_area.2
231MLINKS+=truncate.2 ftruncate.2
232MLINKS+=umtx.2 umtx_sleep.2 \
233	umtx.2 umtx_wakeup.2
234MLINKS+=utimensat.2 futimens.2
235MLINKS+=utimes.2 futimes.2 \
236	utimes.2 lutimes.2 \
237	utimes.2 futimesat.2
238MLINKS+=varsym.2 varsym_get.2 \
239	varsym.2 varsym_list.2 \
240	varsym.2 varsym_set.2
241MLINKS+=wait.2 wait3.2 \
242	wait.2 wait4.2 \
243	wait.2 wait6.2 \
244	wait.2 waitid.2 \
245	wait.2 waitpid.2
246MLINKS+=write.2 extpwrite.2 \
247	write.2 extpwritev.2 \
248	write.2 pwrite.2 \
249	write.2 pwritev.2 \
250	write.2 writev.2
251