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" || ${MACHINE_ARCH:Marmv6*} 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 thr_exit.2 \ 305 thr_kill.2 \ 306 thr_new.2 \ 307 thr_self.2 \ 308 thr_set_name.2 \ 309 timer_create.2 \ 310 timer_delete.2 \ 311 timer_settime.2 \ 312 truncate.2 \ 313 umask.2 \ 314 undelete.2 \ 315 unlink.2 \ 316 utimensat.2 \ 317 utimes.2 \ 318 utrace.2 \ 319 uuidgen.2 \ 320 vfork.2 \ 321 wait.2 \ 322 write.2 \ 323 _umtx_op.2 324 325MLINKS+=accept.2 accept4.2 326MLINKS+=access.2 eaccess.2 \ 327 access.2 faccessat.2 328MLINKS+=brk.2 sbrk.2 329MLINKS+=cap_enter.2 cap_getmode.2 330MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 331MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 332MLINKS+=cap_rights_limit.2 cap_rights_get.2 333MLINKS+=chdir.2 fchdir.2 334MLINKS+=chflags.2 chflagsat.2 \ 335 chflags.2 fchflags.2 \ 336 chflags.2 lchflags.2 337MLINKS+=chmod.2 fchmod.2 \ 338 chmod.2 fchmodat.2 \ 339 chmod.2 lchmod.2 340MLINKS+=chown.2 fchown.2 \ 341 chown.2 fchownat.2 \ 342 chown.2 lchown.2 343MLINKS+=clock_gettime.2 clock_getres.2 \ 344 clock_gettime.2 clock_settime.2 345MLINKS+=cpuset.2 cpuset_getid.2 \ 346 cpuset.2 cpuset_setid.2 347MLINKS+=cpuset_getaffinity.2 cpuset_setaffinity.2 348MLINKS+=dup.2 dup2.2 349MLINKS+=execve.2 fexecve.2 350MLINKS+=extattr_get_file.2 extattr.2 \ 351 extattr_get_file.2 extattr_delete_fd.2 \ 352 extattr_get_file.2 extattr_delete_file.2 \ 353 extattr_get_file.2 extattr_delete_link.2 \ 354 extattr_get_file.2 extattr_get_fd.2 \ 355 extattr_get_file.2 extattr_get_link.2 \ 356 extattr_get_file.2 extattr_list_fd.2 \ 357 extattr_get_file.2 extattr_list_file.2 \ 358 extattr_get_file.2 extattr_list_link.2 \ 359 extattr_get_file.2 extattr_set_fd.2 \ 360 extattr_get_file.2 extattr_set_file.2 \ 361 extattr_get_file.2 extattr_set_link.2 362MLINKS+=ffclock.2 ffclock_getcounter.2 \ 363 ffclock.2 ffclock_getestimate.2 \ 364 ffclock.2 ffclock_setestimate.2 365MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2 366MLINKS+=getdirentries.2 getdents.2 367MLINKS+=getfh.2 lgetfh.2 368MLINKS+=getgid.2 getegid.2 369MLINKS+=getitimer.2 setitimer.2 370MLINKS+=getlogin.2 getlogin_r.3 371MLINKS+=getlogin.2 setlogin.2 372MLINKS+=getloginclass.2 setloginclass.2 373MLINKS+=getpgrp.2 getpgid.2 374MLINKS+=getpid.2 getppid.2 375MLINKS+=getpriority.2 setpriority.2 376MLINKS+=getrlimit.2 setrlimit.2 377MLINKS+=getsockopt.2 setsockopt.2 378MLINKS+=gettimeofday.2 settimeofday.2 379MLINKS+=getuid.2 geteuid.2 380MLINKS+=intro.2 errno.2 381MLINKS+=jail.2 jail_attach.2 \ 382 jail.2 jail_get.2 \ 383 jail.2 jail_remove.2 \ 384 jail.2 jail_set.2 385MLINKS+=kldunload.2 kldunloadf.2 386MLINKS+=kqueue.2 kevent.2 \ 387 kqueue.2 EV_SET.3 388MLINKS+=link.2 linkat.2 389MLINKS+=madvise.2 posix_madvise.2 390MLINKS+=mkdir.2 mkdirat.2 391MLINKS+=mkfifo.2 mkfifoat.2 392MLINKS+=mknod.2 mknodat.2 393MLINKS+=mlock.2 munlock.2 394MLINKS+=mlockall.2 munlockall.2 395MLINKS+=modnext.2 modfnext.2 396MLINKS+=mount.2 nmount.2 \ 397 mount.2 unmount.2 398MLINKS+=mq_receive.2 mq_timedreceive.2 399MLINKS+=mq_send.2 mq_timedsend.2 400MLINKS+=ntp_adjtime.2 ntp_gettime.2 401MLINKS+=numa_getaffinity.2 numa_setaffinity.2 402MLINKS+=open.2 openat.2 403MLINKS+=pathconf.2 fpathconf.2 404MLINKS+=pathconf.2 lpathconf.2 405MLINKS+=pdfork.2 pdgetpid.2\ 406 pdfork.2 pdkill.2 \ 407 pdfork.2 pdwait4.2 408MLINKS+=pipe.2 pipe2.2 409MLINKS+=poll.2 ppoll.2 410MLINKS+=read.2 pread.2 \ 411 read.2 preadv.2 \ 412 read.2 readv.2 413MLINKS+=readlink.2 readlinkat.2 414MLINKS+=recv.2 recvfrom.2 \ 415 recv.2 recvmsg.2 416MLINKS+=rename.2 renameat.2 417MLINKS+=rtprio.2 rtprio_thread.2 418.if !defined(NO_P1003_1B) 419MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \ 420 sched_get_priority_max.2 sched_rr_get_interval.2 421MLINKS+=sched_setparam.2 sched_getparam.2 422MLINKS+=sched_setscheduler.2 sched_getscheduler.2 423.endif 424MLINKS+=select.2 FD_CLR.3 \ 425 select.2 FD_ISSET.3 \ 426 select.2 FD_SET.3 \ 427 select.2 FD_ZERO.3 428MLINKS+=send.2 sendmsg.2 \ 429 send.2 sendto.2 430MLINKS+=setpgid.2 setpgrp.2 431MLINKS+=setresuid.2 getresgid.2 \ 432 setresuid.2 getresuid.2 \ 433 setresuid.2 setresgid.2 434MLINKS+=setuid.2 setegid.2 \ 435 setuid.2 seteuid.2 \ 436 setuid.2 setgid.2 437MLINKS+=shmat.2 shmdt.2 438MLINKS+=shm_open.2 shm_unlink.2 439MLINKS+=sigwaitinfo.2 sigtimedwait.2 440MLINKS+=stat.2 fstat.2 \ 441 stat.2 fstatat.2 \ 442 stat.2 lstat.2 443MLINKS+=statfs.2 fstatfs.2 444MLINKS+=swapon.2 swapoff.2 445MLINKS+=symlink.2 symlinkat.2 446MLINKS+=syscall.2 __syscall.2 447MLINKS+=timer_settime.2 timer_getoverrun.2 \ 448 timer_settime.2 timer_gettime.2 449MLINKS+=thr_kill.2 thr_kill2.2 450MLINKS+=truncate.2 ftruncate.2 451MLINKS+=unlink.2 unlinkat.2 452MLINKS+=utimensat.2 futimens.2 453MLINKS+=utimes.2 futimes.2 \ 454 utimes.2 futimesat.2 \ 455 utimes.2 lutimes.2 456MLINKS+=wait.2 wait3.2 \ 457 wait.2 wait4.2 \ 458 wait.2 waitpid.2 \ 459 wait.2 waitid.2 \ 460 wait.2 wait6.2 461MLINKS+=write.2 pwrite.2 \ 462 write.2 pwritev.2 \ 463 write.2 writev.2 464