1# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 2# $FreeBSD$ 3 4# sys sources 5.PATH: ${.CURDIR}/${LIBC_ARCH}/sys ${.CURDIR}/sys 6 7# Include the generated makefile containing the *complete* list 8# of syscall names in MIASM. 9.include "${.CURDIR}/../../sys/sys/syscall.mk" 10 11# Include machine dependent definitions. 12# 13# MDASM names override the default syscall names in MIASM. 14# NOASM will prevent the default syscall code from being generated. 15# 16.sinclude "${.CURDIR}/${LIBC_ARCH}/sys/Makefile.inc" 17 18SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c 19NOASM+= clock_gettime.o gettimeofday.o 20PSEUDO+= _clock_gettime.o _gettimeofday.o 21 22# Sources common to both syscall interfaces: 23SRCS+= stack_protector.c stack_protector_compat.c __error.c 24.if !defined(WITHOUT_SYSCALL_COMPAT) 25SYSCALL_COMPAT_SRCS= fcntl.c ftruncate.c lseek.c mmap.c pread.c \ 26 pwrite.c truncate.c 27SRCS+= ${SYSCALL_COMPAT_SRCS} 28NOASM+= ${SYSCALL_COMPAT_SRCS:S/.c/.o/} 29PSEUDO+= _fcntl.o 30.endif 31SRCS+= sigwait.c 32NOASM+= sigwait.o 33PSEUDO+= _sigwait.o 34 35# Add machine dependent asm sources: 36SRCS+=${MDASM} 37 38# Look though the complete list of syscalls (MIASM) for names that are 39# not defined with machine dependent implementations (MDASM) and are 40# not declared for no generation of default code (NOASM). Add each 41# syscall that satisfies these conditions to the ASM list. 42.for _asm in ${MIASM} 43.if (${MDASM:R:M${_asm:R}} == "") 44.if (${NOASM:R:M${_asm:R}} == "") 45ASM+=$(_asm) 46.endif 47.endif 48.endfor 49 50OBJS+= ${ASM} ${PSEUDO} 51 52SASM= ${ASM:S/.o/.S/} 53 54SPSEUDO= ${PSEUDO:S/.o/.S/} 55 56SRCS+= ${SASM} ${SPSEUDO} 57 58SYM_MAPS+= ${.CURDIR}/sys/Symbol.map 59 60# Generated files 61CLEANFILES+= ${SASM} ${SPSEUDO} 62 63.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ 64 ${MACHINE_CPUARCH} == "powerpc" 65NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n' 66.else 67NOTE_GNU_STACK='' 68.endif 69 70${SASM}: 71 printf '#include "compat.h"\n' > ${.TARGET} 72 printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >> ${.TARGET} 73 printf ${NOTE_GNU_STACK} >>${.TARGET} 74 75${SPSEUDO}: 76 printf '#include "compat.h"\n' > ${.TARGET} 77 printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \ 78 >> ${.TARGET} 79 printf ${NOTE_GNU_STACK} >>${.TARGET} 80 81MAN+= abort2.2 \ 82 accept.2 \ 83 access.2 \ 84 acct.2 \ 85 adjtime.2 \ 86 aio_cancel.2 \ 87 aio_error.2 \ 88 aio_mlock.2 \ 89 aio_read.2 \ 90 aio_return.2 \ 91 aio_suspend.2 \ 92 aio_waitcomplete.2 \ 93 aio_write.2 \ 94 bind.2 \ 95 bindat.2 \ 96 brk.2 \ 97 cap_enter.2 \ 98 cap_fcntls_limit.2 \ 99 cap_ioctls_limit.2 \ 100 cap_rights_limit.2 \ 101 chdir.2 \ 102 chflags.2 \ 103 chmod.2 \ 104 chown.2 \ 105 chroot.2 \ 106 clock_gettime.2 \ 107 close.2 \ 108 closefrom.2 \ 109 connect.2 \ 110 connectat.2 \ 111 cpuset.2 \ 112 cpuset_getaffinity.2 \ 113 dup.2 \ 114 execve.2 \ 115 _exit.2 \ 116 extattr_get_file.2 \ 117 fcntl.2 \ 118 ffclock.2 \ 119 fhopen.2 \ 120 flock.2 \ 121 fork.2 \ 122 fsync.2 \ 123 getdirentries.2 \ 124 getdtablesize.2 \ 125 getfh.2 \ 126 getfsstat.2 \ 127 getgid.2 \ 128 getgroups.2 \ 129 getitimer.2 \ 130 getlogin.2 \ 131 getloginclass.2 \ 132 getpeername.2 \ 133 getpgrp.2 \ 134 getpid.2 \ 135 getpriority.2 \ 136 getrlimit.2 \ 137 getrusage.2 \ 138 getsid.2 \ 139 getsockname.2 \ 140 getsockopt.2 \ 141 gettimeofday.2 \ 142 getuid.2 \ 143 intro.2 \ 144 ioctl.2 \ 145 issetugid.2 \ 146 jail.2 \ 147 kenv.2 \ 148 kill.2 \ 149 kldfind.2 \ 150 kldfirstmod.2 \ 151 kldload.2 \ 152 kldnext.2 \ 153 kldstat.2 \ 154 kldsym.2 \ 155 kldunload.2 \ 156 kqueue.2 \ 157 ktrace.2 \ 158 link.2 \ 159 lio_listio.2 \ 160 listen.2 \ 161 lseek.2 \ 162 madvise.2 \ 163 mincore.2 \ 164 minherit.2 \ 165 mkdir.2 \ 166 mkfifo.2 \ 167 mknod.2 \ 168 mlock.2 \ 169 mlockall.2 \ 170 mmap.2 \ 171 modfind.2 \ 172 modnext.2 \ 173 modstat.2 \ 174 mount.2 \ 175 mprotect.2 \ 176 mq_close.2 \ 177 mq_getattr.2 \ 178 mq_notify.2 \ 179 mq_open.2 \ 180 mq_receive.2 \ 181 mq_send.2 \ 182 mq_setattr.2 \ 183 msgctl.2 \ 184 msgget.2 \ 185 msgrcv.2 \ 186 msgsnd.2 \ 187 msync.2 \ 188 munmap.2 \ 189 nanosleep.2 \ 190 nfssvc.2 \ 191 ntp_adjtime.2 \ 192 open.2 \ 193 pathconf.2 \ 194 pdfork.2 \ 195 pipe.2 \ 196 poll.2 \ 197 posix_fadvise.2 \ 198 posix_fallocate.2 \ 199 posix_openpt.2 \ 200 procctl.2 \ 201 profil.2 \ 202 pselect.2 \ 203 ptrace.2 \ 204 quotactl.2 \ 205 read.2 \ 206 readlink.2 \ 207 reboot.2 \ 208 recv.2 \ 209 rename.2 \ 210 revoke.2 \ 211 rfork.2 \ 212 rmdir.2 \ 213 rtprio.2 214.if !defined(NO_P1003_1B) 215MAN+= sched_get_priority_max.2 \ 216 sched_setparam.2 \ 217 sched_setscheduler.2 \ 218 sched_yield.2 219.endif 220MAN+= sctp_generic_recvmsg.2 \ 221 sctp_generic_sendmsg.2 \ 222 sctp_peeloff.2 \ 223 select.2 \ 224 semctl.2 \ 225 semget.2 \ 226 semop.2 \ 227 send.2 \ 228 setfib.2 \ 229 sendfile.2 \ 230 setgroups.2 \ 231 setpgid.2 \ 232 setregid.2 \ 233 setresuid.2 \ 234 setreuid.2 \ 235 setsid.2 \ 236 setuid.2 \ 237 shmat.2 \ 238 shmctl.2 \ 239 shmget.2 \ 240 shm_open.2 \ 241 shutdown.2 \ 242 sigaction.2 \ 243 sigaltstack.2 \ 244 sigpending.2 \ 245 sigprocmask.2 \ 246 sigqueue.2 \ 247 sigreturn.2 \ 248 sigstack.2 \ 249 sigsuspend.2 \ 250 sigwait.2 \ 251 sigwaitinfo.2 \ 252 socket.2 \ 253 socketpair.2 \ 254 stat.2 \ 255 statfs.2 \ 256 swapon.2 \ 257 symlink.2 \ 258 sync.2 \ 259 sysarch.2 \ 260 syscall.2 \ 261 timer_create.2 \ 262 timer_delete.2 \ 263 timer_settime.2 \ 264 truncate.2 \ 265 umask.2 \ 266 undelete.2 \ 267 unlink.2 \ 268 utimes.2 \ 269 utrace.2 \ 270 uuidgen.2 \ 271 vfork.2 \ 272 wait.2 \ 273 write.2 274 275MLINKS+=accept.2 accept4.2 276MLINKS+=access.2 eaccess.2 \ 277 access.2 faccessat.2 278MLINKS+=brk.2 sbrk.2 279MLINKS+=cap_enter.2 cap_getmode.2 280MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 281MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 282MLINKS+=cap_rights_limit.2 cap_rights_get.2 283MLINKS+=chdir.2 fchdir.2 284MLINKS+=chflags.2 chflagsat.2 \ 285 chflags.2 fchflags.2 \ 286 chflags.2 lchflags.2 287MLINKS+=chmod.2 fchmod.2 \ 288 chmod.2 fchmodat.2 \ 289 chmod.2 lchmod.2 290MLINKS+=chown.2 fchown.2 \ 291 chown.2 fchownat.2 \ 292 chown.2 lchown.2 293MLINKS+=clock_gettime.2 clock_getres.2 \ 294 clock_gettime.2 clock_settime.2 295MLINKS+=cpuset.2 cpuset_getid.2 \ 296 cpuset.2 cpuset_setid.2 297MLINKS+=cpuset_getaffinity.2 cpuset_setaffinity.2 298MLINKS+=dup.2 dup2.2 299MLINKS+=execve.2 fexecve.2 300MLINKS+=extattr_get_file.2 extattr.2 \ 301 extattr_get_file.2 extattr_delete_fd.2 \ 302 extattr_get_file.2 extattr_delete_file.2 \ 303 extattr_get_file.2 extattr_delete_list.2 \ 304 extattr_get_file.2 extattr_get_fd.2 \ 305 extattr_get_file.2 extattr_get_list.2 \ 306 extattr_get_file.2 extattr_list_fd.2 \ 307 extattr_get_file.2 extattr_list_file.2 \ 308 extattr_get_file.2 extattr_list_link.2 \ 309 extattr_get_file.2 extattr_set_fd.2 \ 310 extattr_get_file.2 extattr_set_file.2 \ 311 extattr_get_file.2 extattr_set_link.2 312MLINKS+=ffclock.2 ffclock_getcounter.2 \ 313 ffclock.2 ffclock_getestimate.2 \ 314 ffclock.2 ffclock_setestimate.2 315MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2 316MLINKS+=getdirentries.2 getdents.2 317MLINKS+=getfh.2 lgetfh.2 318MLINKS+=getgid.2 getegid.2 319MLINKS+=getitimer.2 setitimer.2 320MLINKS+=getlogin.2 getlogin_r.3 321MLINKS+=getlogin.2 setlogin.2 322MLINKS+=getloginclass.2 setloginclass.2 323MLINKS+=getpgrp.2 getpgid.2 324MLINKS+=getpid.2 getppid.2 325MLINKS+=getpriority.2 setpriority.2 326MLINKS+=getrlimit.2 setrlimit.2 327MLINKS+=getsockopt.2 setsockopt.2 328MLINKS+=gettimeofday.2 settimeofday.2 329MLINKS+=getuid.2 geteuid.2 330MLINKS+=intro.2 errno.2 331MLINKS+=jail.2 jail_attach.2 \ 332 jail.2 jail_get.2 \ 333 jail.2 jail_remove.2 \ 334 jail.2 jail_set.2 335MLINKS+=kldunload.2 kldunloadf.2 336MLINKS+=kqueue.2 kevent.2 \ 337 kqueue.2 EV_SET.3 338MLINKS+=link.2 linkat.2 339MLINKS+=madvise.2 posix_madvise.2 340MLINKS+=mkdir.2 mkdirat.2 341MLINKS+=mkfifo.2 mkfifoat.2 342MLINKS+=mknod.2 mknodat.2 343MLINKS+=mlock.2 munlock.2 344MLINKS+=mlockall.2 munlockall.2 345MLINKS+=modnext.2 modfnext.2 346MLINKS+=mount.2 nmount.2 \ 347 mount.2 unmount.2 348MLINKS+=mq_receive.2 mq_timedreceive.2 349MLINKS+=mq_send.2 mq_timedsend.2 350MLINKS+=ntp_adjtime.2 ntp_gettime.2 351MLINKS+=open.2 openat.2 352MLINKS+=pathconf.2 fpathconf.2 353MLINKS+=pathconf.2 lpathconf.2 354MLINKS+=pdfork.2 pdgetpid.2\ 355 pdfork.2 pdkill.2 \ 356 pdfork.2 pdwait4.2 357MLINKS+=pipe.2 pipe2.2 358MLINKS+=read.2 pread.2 \ 359 read.2 preadv.2 \ 360 read.2 readv.2 361MLINKS+=readlink.2 readlinkat.2 362MLINKS+=recv.2 recvfrom.2 \ 363 recv.2 recvmsg.2 364MLINKS+=rename.2 renameat.2 365MLINKS+=rtprio.2 rtprio_thread.2 366.if !defined(NO_P1003_1B) 367MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \ 368 sched_get_priority_max.2 sched_rr_get_interval.2 369MLINKS+=sched_setparam.2 sched_getparam.2 370MLINKS+=sched_setscheduler.2 sched_getscheduler.2 371.endif 372MLINKS+=select.2 FD_CLR.3 \ 373 select.2 FD_ISSET.3 \ 374 select.2 FD_SET.3 \ 375 select.2 FD_ZERO.3 376MLINKS+=send.2 sendmsg.2 \ 377 send.2 sendto.2 378MLINKS+=setpgid.2 setpgrp.2 379MLINKS+=setresuid.2 getresgid.2 \ 380 setresuid.2 getresuid.2 \ 381 setresuid.2 setresgid.2 382MLINKS+=setuid.2 setegid.2 \ 383 setuid.2 seteuid.2 \ 384 setuid.2 setgid.2 385MLINKS+=shmat.2 shmdt.2 386MLINKS+=shm_open.2 shm_unlink.2 387MLINKS+=sigwaitinfo.2 sigtimedwait.2 388MLINKS+=stat.2 fstat.2 \ 389 stat.2 fstatat.2 \ 390 stat.2 lstat.2 391MLINKS+=statfs.2 fstatfs.2 392MLINKS+=swapon.2 swapoff.2 393MLINKS+=symlink.2 symlinkat.2 394MLINKS+=syscall.2 __syscall.2 395MLINKS+=timer_settime.2 timer_getoverrun.2 \ 396 timer_settime.2 timer_gettime.2 397MLINKS+=truncate.2 ftruncate.2 398MLINKS+=unlink.2 unlinkat.2 399MLINKS+=utimes.2 futimes.2 \ 400 utimes.2 futimesat.2 \ 401 utimes.2 lutimes.2 402MLINKS+=wait.2 wait3.2 \ 403 wait.2 wait4.2 \ 404 wait.2 waitpid.2 \ 405 wait.2 waitid.2 \ 406 wait.2 wait6.2 407MLINKS+=write.2 pwrite.2 \ 408 write.2 pwritev.2 \ 409 write.2 writev.2 410