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