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