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