xref: /freebsd/lib/libc/sys/Makefile.inc (revision 8e537d168674d6b65869f73c20813001af875738)
1#	@(#)Makefile.inc	8.1 (Berkeley) 6/17/93
2#	$Id: Makefile.inc,v 1.19 1996/05/28 16:24:53 phk Exp $
3
4# sys sources
5.PATH: ${.CURDIR}/${MACHINE}/sys ${.CURDIR}/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=	accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \
17	chown.o chroot.o close.o connect.o dup.o dup2.o execve.o fchdir.o \
18	fchflags.o fchmod.o fchown.o fcntl.o flock.o fpathconf.o fstat.o \
19	fstatfs.o fsync.o getdirentries.o getdtablesize.o getegid.o \
20	geteuid.o getfh.o getfsstat.o getgid.o getgroups.o getitimer.o \
21	getpeername.o getpgrp.o getpid.o getppid.o getpriority.o \
22	getrlimit.o getrusage.o getsockname.o getsockopt.o gettimeofday.o \
23	getuid.o ioctl.o kill.o ktrace.o lfs_bmapv.o lfs_markv.o \
24	lfs_segclean.o lfs_segwait.o link.o listen.o lstat.o \
25	madvise.o mincore.o minherit.o mkdir.o mkfifo.o mknod.o mlock.o \
26	mount.o \
27	mprotect.o msgsys.o msync.o munlock.o munmap.o nfssvc.o \
28	ntp_adjtime.o open.o pathconf.o profil.o quotactl.o read.o \
29	readlink.o readv.o recvfrom.o recvmsg.o rename.o revoke.o rmdir.o \
30	rtprio.o select.o semsys.o sendmsg.o sendto.o setegid.o seteuid.o \
31	setgid.o \
32	setgroups.o setitimer.o	setpgid.o setpriority.o	\
33	setregid.o setreuid.o setrlimit.o \
34	setsid.o setsockopt.o settimeofday.o setuid.o shmsys.o shutdown.o \
35	sigaction.o sigaltstack.o socket.o socketpair.o stat.o statfs.o \
36	swapon.o symlink.o sync.o sysarch.o \
37	umask.o unlink.o unmount.o utimes.o utrace.o \
38	vadvise.o wait4.o write.o writev.o __syscall.o __sysctl.o
39
40PSEUDO=	_exit.o _getlogin.o
41
42OBJS+=	${ASM} ${PSEUDO}
43
44${ASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h
45	@${ECHO} creating ${.PREFIX}.o
46	@printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
47	    ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o
48	@${LD} -O ${.PREFIX}.o -x -r ${.PREFIX}.o
49
50PASM=	${ASM:.o=.po}
51${PASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h
52	@${ECHO} creating ${.PREFIX}.po
53	@printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
54	    ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po
55	@${LD} -O ${.PREFIX}.po -x -r ${.PREFIX}.po
56
57SASM=	${ASM:.o=.so}
58${SASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h
59	@${ECHO} creating ${.PREFIX}.so
60	@printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
61	    ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so
62
63${PSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h
64	@${ECHO} creating ${.PREFIX}.o
65	@printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \
66	    ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o
67	@${LD} -O ${.PREFIX}.o -x -r ${.PREFIX}.o
68
69PPSEUDO=${PSEUDO:.o=.po}
70${PPSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h
71	@${ECHO} creating ${.PREFIX}.po
72	@printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \
73	    ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po
74	@${LD} -O ${.PREFIX}.po -x -r ${.PREFIX}.po
75
76SPSEUDO=${PSEUDO:.o=.so}
77${SPSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h
78	@${ECHO} creating ${.PREFIX}.so
79	@printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \
80	    ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so
81
82MAN2+=	sys/accept.2 sys/access.2 sys/acct.2 sys/adjtime.2 sys/bind.2 \
83	sys/brk.2 sys/chdir.2 sys/chflags.2 sys/chmod.2 sys/chown.2 \
84	sys/chroot.2 sys/close.2 sys/connect.2 sys/dup.2 sys/execve.2 \
85	sys/_exit.2 sys/fcntl.2 sys/flock.2 sys/fork.2 sys/fsync.2 \
86	sys/getdirentries.2 sys/getdtablesize.2 sys/getfh.2 sys/getfsstat.2 \
87	sys/getgid.2 sys/getgroups.2 sys/getitimer.2 sys/getlogin.2 \
88	sys/getpeername.2 sys/getpgrp.2 sys/getpid.2 sys/getpriority.2 \
89	sys/getrlimit.2 sys/getrusage.2 sys/getsockname.2 sys/getsockopt.2 \
90	sys/gettimeofday.2 sys/getuid.2 sys/intro.2 sys/ioctl.2 sys/kill.2 \
91	sys/ktrace.2 sys/link.2 sys/listen.2 sys/lseek.2 sys/mkdir.2 \
92	sys/mkfifo.2 sys/mknod.2 sys/madvise.2 sys/mincore.2 sys/minherit.2 \
93	sys/mlock.2 \
94	sys/mmap.2 sys/mount.2 sys/mprotect.2 sys/msync.2 sys/munmap.2 \
95	sys/ptrace.2 sys/nfssvc.2 sys/open.2 sys/pathconf.2 sys/pipe.2 \
96	sys/profil.2 sys/quotactl.2 sys/read.2 sys/readlink.2 sys/reboot.2 \
97	sys/recv.2 sys/rename.2 sys/revoke.2 sys/rfork.2 sys/rmdir.2 \
98	sys/rtprio.2 sys/select.2 \
99	sys/semctl.2 sys/semget.2 sys/semop.2 \
100	sys/send.2 sys/setgroups.2 \
101	sys/setpgid.2 sys/setregid.2 sys/setreuid.2 \
102	sys/setsid.2 sys/setuid.2 sys/shmat.2 sys/shmctl.2 sys/shmget.2 \
103	sys/shutdown.2 \
104	sys/sigaction.2 sys/sigpending.2 sys/sigprocmask.2 sys/sigreturn.2 \
105	sys/sigaltstack.2 sys/sigstack.2 sys/sigsuspend.2 sys/socket.2 \
106	sys/socketpair.2 sys/stat.2 sys/statfs.2 sys/swapon.2 sys/symlink.2 \
107	sys/sync.2 sys/syscall.2 sys/truncate.2 sys/umask.2 sys/unlink.2 \
108	sys/utimes.2 sys/vfork.2 sys/wait.2 sys/write.2
109
110MLINKS+=brk.2 sbrk.2
111MLINKS+=dup.2 dup2.2
112MLINKS+=chdir.2 fchdir.2
113MLINKS+=chflags.2 fchflags.2
114MLINKS+=chmod.2 fchmod.2
115MLINKS+=chown.2 fchown.2
116MLINKS+=getgid.2 getegid.2
117MLINKS+=getitimer.2 setitimer.2
118MLINKS+=getlogin.2 setlogin.2
119MLINKS+=getpid.2 getppid.2
120MLINKS+=getpriority.2 setpriority.2
121MLINKS+=getrlimit.2 setrlimit.2
122MLINKS+=getsockopt.2 setsockopt.2
123MLINKS+=gettimeofday.2 settimeofday.2
124MLINKS+=getuid.2 geteuid.2
125MLINKS+=intro.2 errno.2
126MLINKS+=lseek.2 seek.2
127MLINKS+=mlock.2 munlock.2
128MLINKS+=mount.2 unmount.2
129MLINKS+=pathconf.2 fpathconf.2
130MLINKS+=read.2 readv.2
131MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
132MLINKS+=send.2 sendmsg.2 send.2 sendto.2
133MLINKS+=setpgid.2 setpgrp.2
134MLINKS+=setuid.2 setegid.2 setuid.2 seteuid.2 setuid.2 setgid.2
135MLINKS+=shmat.2 shmdt.2
136MLINKS+=stat.2 fstat.2 stat.2 lstat.2
137MLINKS+=statfs.2 fstatfs.2
138MLINKS+=syscall.2 __syscall.2
139MLINKS+=truncate.2 ftruncate.2
140MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2
141MLINKS+=write.2 writev.2
142