xref: /dragonfly/lib/libc/sys/Makefile.inc (revision de78d61c)
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
64.if ${LIB} == "c"
65MAN+=	_exit.2 accept.2 access.2 acct.2 adjtime.2 bind.2 \
66	sys_checkpoint.2 chdir.2 chflags.2 \
67	chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 closefrom.2 \
68	connect.2 dup.2 exec_sys_register.2 execve.2 extattr.2 extexit.2 \
69	fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \
70	getdirentries.2 getdtablesize.2 \
71	getfh.2 getfsstat.2 getgid.2 getgroups.2 getitimer.2 getlogin.2 \
72	getpeername.2 getpgrp.2 getpid.2 getpriority.2 getrlimit.2 \
73	getrusage.2 getsid.2 getsockname.2 \
74	getsockopt.2 gettimeofday.2 getuid.2 \
75	intro.2 ioctl.2 ioprio_get.2 issetugid.2 \
76	jail.2 jail_attach.2 kenv.2 kill.2 \
77	kldfind.2 kldfirstmod.2 kldload.2 kldnext.2 kldstat.2 kldsym.2 \
78	kldunload.2 ktrace.2 kqueue.2 link.2 listen.2 lseek.2 \
79	lwp_create.2 lwp_gettid.2 lwp_kill.2 lwp_setname.2 lwp_setaffinity.2 \
80	madvise.2 mincore.2 minherit.2 mkdir.2 mkfifo.2 mknod.2 mlock.2 \
81	mlockall.2 mmap.2 \
82	modfind.2 modnext.2 modstat.2 \
83	mount.2 mountctl.2 mprotect.2 \
84	msgctl.2 msgget.2 msgrcv.2 msgsnd.2 \
85	msync.2 munmap.2 nanosleep.2 \
86	nfssvc.2 ntp_adjtime.2 ntp_gettime.2 open.2 \
87	pathconf.2 pipe.2 poll.2 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 \
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	sigaction.2 sigaltstack.2 sigpending.2 sigprocmask.2 sigreturn.2 \
97	sigsuspend.2 sigwaitinfo.2 socket.2 socketpair.2 \
98	stat.2 statfs.2 statvfs.2 swapon.2 \
99	symlink.2 sync.2 sysarch.2 syscall.2 \
100	truncate.2 tls.2 umask.2 umtx.2 undelete.2 \
101	unlink.2 unlinkat.2 utimensat.2 utimes.2 utrace.2 usched_set.2 \
102	uuidgen.2 \
103	varsym.2 vfork.2 vmm.2 vquotactl.2 wait.2 write.2
104
105MLINKS+=accept.2 accept4.2
106MLINKS+=access.2 eaccess.2 \
107	access.2 faccessat.2
108MLINKS+=chdir.2 fchdir.2
109MLINKS+=chflags.2 chflagsat.2 \
110	chflags.2 fchflags.2 \
111	chflags.2 lchflags.2
112MLINKS+=chmod.2 fchmod.2 \
113	chmod.2 fchmodat.2 \
114	chmod.2 lchmod.2
115MLINKS+=chown.2 fchown.2 \
116	chown.2 fchownat.2 \
117	chown.2 lchown.2
118MLINKS+=chroot.2 chroot_kernel.2
119MLINKS+=clock_gettime.2 clock_getres.2 \
120	clock_gettime.2 clock_settime.2
121MLINKS+=dup.2 dup2.2
122MLINKS+=exec_sys_register.2 exec_sys_unregister.2
123MLINKS+=extattr.2 extattr_delete_file.2 \
124	extattr.2 extattr_get_file.2 \
125	extattr.2 extattr_set_file.2
126MLINKS+=fhopen.2 fhstat.2 \
127	fhopen.2 fhstatfs.2 \
128	fhopen.2 fhstatvfs.2
129MLINKS+=getdirentries.2 _DIRENT_DIRSIZ.2 \
130	getdirentries.2 _DIRENT_NEXT.2 \
131	getdirentries.2 getdents.2
132MLINKS+=getfsstat.2 getvfsstat.2
133MLINKS+=getgid.2 getegid.2
134MLINKS+=getitimer.2 setitimer.2
135MLINKS+=getlogin.2 getlogin_r.3 \
136	getlogin.2 setlogin.2
137MLINKS+=getpgrp.2 getpgid.2
138MLINKS+=getpid.2 getppid.2
139MLINKS+=getpriority.2 setpriority.2
140MLINKS+=getrlimit.2 setrlimit.2
141MLINKS+=getsockopt.2 setsockopt.2
142MLINKS+=gettimeofday.2 settimeofday.2
143MLINKS+=getuid.2 geteuid.2
144MLINKS+=intro.2 errno.2
145MLINKS+=ioprio_get.2 ioprio_set.2
146MLINKS+=kqueue.2 EV_SET.2 \
147	kqueue.2 kevent.2
148MLINKS+=link.2 linkat.2
149MLINKS+=lseek.2 seek.2
150MLINKS+=lwp_create.2 lwp_create2.2
151MLINKS+=lwp_setaffinity.2 lwp_getaffinity.2
152MLINKS+=madvise.2 mcontrol.2 \
153	madvise.2 posix_madvise.3
154MLINKS+=mkdir.2 mkdirat.2
155MLINKS+=mkfifo.2 mkfifoat.2
156MLINKS+=mknod.2 mknodat.2
157MLINKS+=mlock.2 munlock.2
158MLINKS+=mlockall.2 munlockall.2
159MLINKS+=modnext.2 modfnext.2
160MLINKS+=mount.2 unmount.2
161MLINKS+=msgctl.2 msgctl.3
162MLINKS+=msgget.2 msgget.3
163MLINKS+=msgrcv.2 msgrcv.3
164MLINKS+=msgsnd.2 msgsnd.3
165MLINKS+=open.2 openat.2
166MLINKS+=pathconf.2 fpathconf.2 \
167	pathconf.2 lpathconf.2
168MLINKS+=pipe.2 pipe2.2
169MLINKS+=poll.2 ppoll.2
170MLINKS+=read.2 extpread.2 \
171	read.2 extpreadv.2 \
172	read.2 pread.2 \
173	read.2 preadv.2 \
174	read.2 readv.2
175MLINKS+=readlink.2 readlinkat.2
176MLINKS+=recv.2 recvfrom.2 \
177	recv.2 recvmsg.2
178MLINKS+=rename.2 renameat.2
179MLINKS+=rtprio.2 lwp_rtprio.2
180MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \
181	sched_get_priority_max.2 sched_rr_get_interval.2
182MLINKS+=sched_setaffinity.2 CPU_AND.3 \
183	sched_setaffinity.2 CPU_CLR.3 \
184	sched_setaffinity.2 CPU_COUNT.3 \
185	sched_setaffinity.2 CPU_EQUAL.3 \
186	sched_setaffinity.2 CPU_ISSET.3 \
187	sched_setaffinity.2 CPU_OR.3 \
188	sched_setaffinity.2 CPU_SET.3 \
189	sched_setaffinity.2 CPU_XOR.3 \
190	sched_setaffinity.2 CPU_ZERO.3 \
191	sched_setaffinity.2 sched_getaffinity.2
192MLINKS+=sched_setparam.2 sched_getparam.2
193MLINKS+=sched_setscheduler.2 sched_getscheduler.2
194MLINKS+=select.2 FD_CLR.2 \
195	select.2 FD_ISSET.2 \
196	select.2 FD_SET.2 \
197	select.2 FD_ZERO.2
198MLINKS+=semctl.2 semctl.3
199MLINKS+=semget.2 semget.3
200MLINKS+=semop.2 semop.3
201MLINKS+=send.2 sendmsg.2 \
202	send.2 sendto.2
203MLINKS+=setpgid.2 setpgrp.3
204MLINKS+=setresuid.2 getresgid.2 \
205	setresuid.2 getresuid.2 \
206	setresuid.2 setresgid.2
207MLINKS+=setuid.2 setegid.2 \
208	setuid.2 seteuid.2 \
209	setuid.2 setgid.2
210MLINKS+=shmat.2 shmat.3 \
211	shmat.2 shmdt.2
212MLINKS+=shmctl.2 shmctl.3
213MLINKS+=shmget.2 shmget.3
214MLINKS+=sigwaitinfo.2 sigtimedwait.2
215MLINKS+=stat.2 fstat.2 \
216	stat.2 fstatat.2 \
217	stat.2 lstat.2
218MLINKS+=statfs.2 fstatfs.2
219MLINKS+=statvfs.2 fstatvfs.2
220MLINKS+=symlink.2 symlinkat.2
221MLINKS+=syscall.2 __syscall.2
222MLINKS+=swapon.2 swapoff.2
223MLINKS+=tls.2 get_tls_area.2 \
224	tls.2 set_tls_area.2
225MLINKS+=truncate.2 ftruncate.2
226MLINKS+=umtx.2 umtx_sleep.2 \
227	umtx.2 umtx_wakeup.2
228MLINKS+=utimensat.2 futimens.2
229MLINKS+=utimes.2 futimes.2 \
230	utimes.2 lutimes.2
231MLINKS+=varsym.2 varsym_get.2 \
232	varsym.2 varsym_list.2 \
233	varsym.2 varsym_set.2
234MLINKS+=vmm.2 vmm_guest_ctl.2 \
235	vmm.2 vmm_guest_sync_addr.2
236MLINKS+=wait.2 wait3.2 \
237	wait.2 wait4.2 \
238	wait.2 wait6.2 \
239	wait.2 waitid.2 \
240	wait.2 waitpid.2
241MLINKS+=write.2 extpwrite.2 \
242	write.2 extpwritev.2 \
243	write.2 pwrite.2 \
244	write.2 pwritev.2 \
245	write.2 writev.2
246.endif
247