1# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 2# $Id: Makefile.inc,v 1.33 1997/06/01 09:20:30 peter Exp $ 3 4# sys sources 5.PATH: ${.CURDIR}/../libc/${MACHINE}/sys ${.CURDIR}/../libc/sys 6 7# modules with non-default implementations on at least one architecture: 8SRCS+= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S ptrace.S reboot.S \ 9 rfork.S sbrk.S setlogin.S sigpending.S sigprocmask.S sigreturn.S \ 10 sigsuspend.S syscall.S 11 12# glue to provide compatibility between GCC 1.X and 2.X 13SRCS+= ftruncate.c lseek.c mmap.c truncate.c 14 15# modules with default implementations on all architectures: 16ASM= access.o acct.o adjtime.o chdir.o chflags.o chmod.o \ 17 chown.o chroot.o \ 18 clock_getres.o clock_gettime.o clock_settime.o \ 19 getdtablesize.o getegid.o \ 20 geteuid.o getfh.o getfsstat.o getgid.o getgroups.o getitimer.o \ 21 getpgrp.o getpid.o getppid.o getpriority.o \ 22 getrlimit.o getrusage.o gettimeofday.o \ 23 getuid.o issetugid.o kill.o ktrace.o lchown.o \ 24 lfs_bmapv.o lfs_markv.o \ 25 lfs_segclean.o lfs_segwait.o link.o lstat.o \ 26 madvise.o mincore.o minherit.o mkdir.o mlock.o \ 27 mount.o \ 28 mprotect.o msgsys.o msync.o munlock.o munmap.o \ 29 ntp_adjtime.o pathconf.o profil.o quotactl.o \ 30 readlink.o rename.o revoke.o rmdir.o \ 31 rtprio.o semsys.o setegid.o seteuid.o \ 32 setgid.o \ 33 setgroups.o setitimer.o setpgid.o setpriority.o \ 34 setregid.o setreuid.o setrlimit.o \ 35 setsid.o settimeofday.o setuid.o shmsys.o \ 36 stat.o statfs.o \ 37 swapon.o symlink.o sync.o sysarch.o \ 38 umask.o undelete.o unlink.o unmount.o utimes.o utrace.o \ 39 vadvise.o __syscall.o __sysctl.o \ 40 modnext.o modstat.o modfnext.o modfind.o \ 41 kldload.o kldunload.o kldfind.o kldnext.o kldstat.o kldfirstmod.o 42 43# Syscalls renamed as _thread_sys_{syscall} when building libc_r. 44ASMR= accept.o bind.o close.o connect.o dup.o dup2.o \ 45 execve.o fchdir.o fchflags.o fchmod.o fchown.o fcntl.o \ 46 flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \ 47 getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \ 48 mkfifo.o mknod.o nanosleep.o nfssvc.o open.o read.o readv.o \ 49 recvfrom.o recvmsg.o select.o sendmsg.o sendto.o setsockopt.o \ 50 shutdown.o sigaction.o sigaltstack.o signanosleep.o socket.o \ 51 socketpair.o \ 52 wait4.o write.o writev.o 53 54PSEUDO= _getlogin.o 55 56# Pseudo syscalls that are renamed as _thread_sys_{pseudo} when 57# building libc_r. 58PSEUDOR= _exit.o 59 60OBJS+= ${ASM} ${ASMR} ${PSEUDO} ${PSEUDOR} 61 62SASM= ${ASM:S/.o/.S/} 63 64SASMR= ${ASMR:S/.o/.S/} 65 66SPSEUDO= ${PSEUDO:S/.o/.S/} 67 68SPSEUDOR= ${PSEUDOR:S/.o/.S/} 69 70SRCS+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR} 71 72# Generated files 73CLEANFILES+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR} 74 75${SASM}: 76 printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} 77 78${SASMR}: 79 printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.TARGET} 80 81${SPSEUDO}: 82 printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \ 83 > ${.TARGET} 84 85${SPSEUDOR}: 86 printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \ 87 > ${.TARGET} 88 89# Only build man pages with libc. 90.if ${LIB} == "c" 91MAN2+= sys/accept.2 sys/access.2 sys/acct.2 sys/adjtime.2 sys/bind.2 \ 92 sys/brk.2 sys/chdir.2 sys/chflags.2 sys/chmod.2 sys/chown.2 \ 93 sys/chroot.2 sys/clock_gettime.2 sys/close.2 sys/connect.2 sys/dup.2 \ 94 sys/execve.2 \ 95 sys/_exit.2 sys/fcntl.2 sys/flock.2 sys/fork.2 sys/fsync.2 \ 96 sys/getdirentries.2 sys/getdtablesize.2 sys/getfh.2 sys/getfsstat.2 \ 97 sys/getgid.2 sys/getgroups.2 sys/getitimer.2 sys/getlogin.2 \ 98 sys/getpeername.2 sys/getpgrp.2 sys/getpid.2 sys/getpriority.2 \ 99 sys/getrlimit.2 sys/getrusage.2 sys/getsockname.2 sys/getsockopt.2 \ 100 sys/gettimeofday.2 sys/getuid.2 sys/intro.2 sys/ioctl.2 \ 101 sys/issetugid.2 sys/kill.2 \ 102 sys/ktrace.2 sys/link.2 sys/listen.2 sys/lseek.2 sys/mkdir.2 \ 103 sys/mkfifo.2 sys/mknod.2 sys/madvise.2 sys/mincore.2 sys/minherit.2 \ 104 sys/mlock.2 \ 105 sys/mmap.2 sys/mount.2 sys/mprotect.2 sys/msync.2 sys/munmap.2 \ 106 sys/nanosleep.2 \ 107 sys/ptrace.2 sys/nfssvc.2 sys/open.2 sys/pathconf.2 sys/pipe.2 \ 108 sys/profil.2 sys/quotactl.2 sys/read.2 sys/readlink.2 sys/reboot.2 \ 109 sys/recv.2 sys/rename.2 sys/revoke.2 sys/rfork.2 sys/rmdir.2 \ 110 sys/rtprio.2 sys/select.2 \ 111 sys/semctl.2 sys/semget.2 sys/semop.2 \ 112 sys/send.2 sys/setgroups.2 \ 113 sys/setpgid.2 sys/setregid.2 sys/setreuid.2 \ 114 sys/setsid.2 sys/setuid.2 sys/shmat.2 sys/shmctl.2 sys/shmget.2 \ 115 sys/shutdown.2 \ 116 sys/sigaction.2 sys/sigpending.2 sys/sigprocmask.2 sys/sigreturn.2 \ 117 sys/sigaltstack.2 sys/sigstack.2 sys/sigsuspend.2 sys/socket.2 \ 118 sys/socketpair.2 sys/stat.2 sys/statfs.2 sys/swapon.2 sys/symlink.2 \ 119 sys/sync.2 sys/syscall.2 sys/truncate.2 sys/umask.2 sys/unlink.2 \ 120 sys/undelete.2 sys/utimes.2 sys/vfork.2 sys/wait.2 sys/write.2 121 122MLINKS+=brk.2 sbrk.2 123MLINKS+=dup.2 dup2.2 124MLINKS+=chdir.2 fchdir.2 125MLINKS+=chflags.2 fchflags.2 126MLINKS+=chmod.2 fchmod.2 127MLINKS+=chown.2 fchown.2 chown.2 lchown.2 128MLINKS+=clock_gettime.2 clock_settime.2 clock_gettime.2 clock_getres.2 129MLINKS+=getgid.2 getegid.2 130MLINKS+=getitimer.2 setitimer.2 131MLINKS+=getlogin.2 setlogin.2 132MLINKS+=getpid.2 getppid.2 133MLINKS+=getpriority.2 setpriority.2 134MLINKS+=getrlimit.2 setrlimit.2 135MLINKS+=getsockopt.2 setsockopt.2 136MLINKS+=gettimeofday.2 settimeofday.2 137MLINKS+=getuid.2 geteuid.2 138MLINKS+=intro.2 errno.2 139MLINKS+=lseek.2 seek.2 140MLINKS+=mlock.2 munlock.2 141MLINKS+=mount.2 unmount.2 142MLINKS+=nanosleep.2 signanosleep.2 143MLINKS+=pathconf.2 fpathconf.2 144MLINKS+=read.2 readv.2 145MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2 146MLINKS+=send.2 sendmsg.2 send.2 sendto.2 147MLINKS+=setpgid.2 setpgrp.2 148MLINKS+=setuid.2 setegid.2 setuid.2 seteuid.2 setuid.2 setgid.2 149MLINKS+=shmat.2 shmdt.2 150MLINKS+=stat.2 fstat.2 stat.2 lstat.2 151MLINKS+=statfs.2 fstatfs.2 152MLINKS+=syscall.2 __syscall.2 153MLINKS+=truncate.2 ftruncate.2 154MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2 155MLINKS+=write.2 writev.2 156.endif 157