]> git.saurik.com Git - apple/libc.git/blame - sys/Makefile.inc
Libc-763.13.tar.gz
[apple/libc.git] / sys / Makefile.inc
CommitLineData
5b2abdfb
A
1# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
2# $FreeBSD: src/lsys/Makefile.inc,v 1.91 2001/09/21 21:35:22 rwatson Exp $
3
5b2abdfb
A
4# Include machine dependent definitions.
5#
b5d655f7 6.sinclude "${.CURDIR}/${MACHINE_ARCH}/sys/Makefile.inc"
5b2abdfb 7
59e0d9fe
A
8# sys sources
9.PATH: ${.CURDIR}/sys
b5d655f7 10CWD := ${.CURDIR}/sys
59e0d9fe 11
5b2abdfb 12# Sources common to both syscall interfaces:
5b2abdfb 13
1f2f436a
A
14MISRCS += chmodx_np.c crt_externs.c \
15 errno.c fork.c \
16 getiopolicy_np.c gettimeofday.c \
17 __libc_init.c _libc_fork_child.c \
224c7076
A
18 openx_np.c \
19 posix_spawn.c \
1f2f436a
A
20 settimeofday.c \
21 sigaction.c sigcatch.c \
22 sigtramp.c slot_name.c statx_np.c \
23 umaskx_np.c
5b2abdfb 24
b5d655f7
A
25.ifdef FEATURE_MEM_THERM_NOTIFICATION_APIS
26MISRCS += OSMemoryNotification.c OSThermalNotification.c
27.endif
28
224c7076
A
29.if (${MACHINE_ARCH} != ppc)
30.if (${MACHINE_ARCH} != i386)
34e8f829 31.if (${MACHINE_ARCH} != x86_64)
224c7076
A
32MISRCS+= context-stubs.c
33.endif
34.endif
34e8f829 35.endif
224c7076 36
eb1cde05
A
37.include "Makefile.obsd_begin"
38OBSDMISRCS= stack_protector.c
39.include "Makefile.obsd_end"
40
34e8f829
A
41DARWINEXTSNSRCS += getgroups.c
42
224c7076
A
43INODE32SRCS += statx_np.c
44
1f2f436a 45DYLDSRCS += errno.c
224c7076 46
1f2f436a
A
47LEGACYSRCS += msgctl.c \
48 semctl.c \
49 shmctl.c
224c7076 50
224c7076
A
51.for _src in msgctl.c semctl.c shmctl.c
52CFLAGS-${_src} += -DKERNEL
53.endfor
54
55# sigtramp.c can only compile with __DARWIN_UNIX03=0 (for ppc64) because
56# the structure field names are renamed with __ prefix when __DARWIN_UNIX03=1.
57# If sigtramp.c ever needs to build variant, this will have to be fix properly
58CFLAGS-sigtramp.c = -U__DARWIN_UNIX03 -D__DARWIN_UNIX03=0
59
60# set the LIBC_ALIAS_* macros so we can decorate the symbol independent
61# of other macro settings
62CFLAGS-accept.c += -DLIBC_ALIAS_ACCEPT
63#CFLAGS-aio_suspend.c += -DLIBC_ALIAS_AIO_SUSPEND
64CFLAGS-bind.c += -DLIBC_ALIAS_BIND
65CFLAGS-chmod.c += -DLIBC_ALIAS_CHMOD
66#CFLAGS-close.c += -DLIBC_ALIAS_CLOSE
67CFLAGS-connect.c += -DLIBC_ALIAS_CONNECT
68CFLAGS-fchmod.c += -DLIBC_ALIAS_FCHMOD
224c7076
A
69#CFLAGS-fsync.c += -DLIBC_ALIAS_FSYNC
70CFLAGS-getattrlist.c += -DLIBC_ALIAS_GETATTRLIST
71CFLAGS-getpeername.c += -DLIBC_ALIAS_GETPEERNAME
224c7076 72CFLAGS-getsockname.c += -DLIBC_ALIAS_GETSOCKNAME
224c7076 73CFLAGS-lchmod.c += -DLIBC_ALIAS_LCHMOD
b5d655f7 74CFLAGS-lchown.c += -DLIBC_ALIAS_LCHOWN
224c7076 75CFLAGS-listen.c += -DLIBC_ALIAS_LISTEN
224c7076
A
76CFLAGS-msgctl.c += -DLIBC_ALIAS_MSGCTL
77#CFLAGS-msgrcv.c += -DLIBC_ALIAS_MSGRCV
78#CFLAGS-msgsnd.c += -DLIBC_ALIAS_MSGSND
224c7076
A
79#CFLAGS-poll.c += -DLIBC_ALIAS_POLL
80#CFLAGS-pread.c += -DLIBC_ALIAS_PREAD
81#CFLAGS-pwrite.c += -DLIBC_ALIAS_PWRITE
82#CFLAGS-read.c += -DLIBC_ALIAS_READ
83#CFLAGS-readv.c += -DLIBC_ALIAS_READV
84CFLAGS-recvfrom.c += -DLIBC_ALIAS_RECVFROM
85CFLAGS-recvmsg.c += -DLIBC_ALIAS_RECVMSG
224c7076
A
86#CFLAGS-sem_wait.c += -DLIBC_ALIAS_SEM_WAIT
87CFLAGS-semctl.c += -DLIBC_ALIAS_SEMCTL
88CFLAGS-sendmsg.c += -DLIBC_ALIAS_SENDMSG
89CFLAGS-sendto.c += -DLIBC_ALIAS_SENDTO
90CFLAGS-setattrlist.c += -DLIBC_ALIAS_SETATTRLIST
224c7076 91CFLAGS-shmctl.c += -DLIBC_ALIAS_SHMCTL
224c7076 92CFLAGS-socketpair.c += -DLIBC_ALIAS_SOCKETPAIR
1f2f436a 93CFLAGS-stack_protector-obsd.c += -fno-stack-protector
224c7076
A
94#CFLAGS-waitid.c += -DLIBC_ALIAS_WAITID
95#CFLAGS-write.c += -DLIBC_ALIAS_WRITE
96#CFLAGS-writev.c += -DLIBC_ALIAS_WRITEV
3d9156a7 97
5b2abdfb
A
98.if ${LIB} == "c"
99MAN2+= pthread_kill.2 pthread_sigmask.2 \
1f2f436a 100 sigwait.2 nanosleep.2
224c7076 101MAN3+= atomic.3 barrier.3 getiopolicy_np.3 spinlock.3 cache.3
59e0d9fe 102MLINKS+= atomic.3 OSAtomicAdd32.3
224c7076 103MLINKS+= atomic.3 OSAtomicAdd32Barrier.3
59e0d9fe 104MLINKS+= atomic.3 OSAtomicAdd64.3
224c7076
A
105MLINKS+= atomic.3 OSAtomicAdd64Barrier.3
106MLINKS+= atomic.3 OSAtomicAnd32.3
107MLINKS+= atomic.3 OSAtomicAnd32Barrier.3
108MLINKS+= atomic.3 OSAtomicAnd32Orig.3
109MLINKS+= atomic.3 OSAtomicAnd32OrigBarrier.3
59e0d9fe 110MLINKS+= atomic.3 OSAtomicCompareAndSwap32.3
224c7076 111MLINKS+= atomic.3 OSAtomicCompareAndSwap32Barrier.3
59e0d9fe 112MLINKS+= atomic.3 OSAtomicCompareAndSwap64.3
224c7076
A
113MLINKS+= atomic.3 OSAtomicCompareAndSwap64Barrier.3
114MLINKS+= atomic.3 OSAtomicCompareAndSwapInt.3
115MLINKS+= atomic.3 OSAtomicCompareAndSwapIntBarrier.3
116MLINKS+= atomic.3 OSAtomicCompareAndSwapLong.3
117MLINKS+= atomic.3 OSAtomicCompareAndSwapLongBarrier.3
118MLINKS+= atomic.3 OSAtomicCompareAndSwapPtr.3
119MLINKS+= atomic.3 OSAtomicCompareAndSwapPtrBarrier.3
120MLINKS+= atomic.3 OSAtomicDecrement32.3
121MLINKS+= atomic.3 OSAtomicDecrement32Barrier.3
122MLINKS+= atomic.3 OSAtomicDecrement64.3
123MLINKS+= atomic.3 OSAtomicDecrement64Barrier.3
124MLINKS+= atomic.3 OSAtomicDequeue.3
125MLINKS+= atomic.3 OSAtomicEnqueue.3
126MLINKS+= atomic.3 OSAtomicIncrement32.3
127MLINKS+= atomic.3 OSAtomicIncrement32Barrier.3
128MLINKS+= atomic.3 OSAtomicIncrement64.3
129MLINKS+= atomic.3 OSAtomicIncrement64Barrier.3
130MLINKS+= atomic.3 OSAtomicOr32.3
131MLINKS+= atomic.3 OSAtomicOr32Barrier.3
132MLINKS+= atomic.3 OSAtomicOr32Orig.3
133MLINKS+= atomic.3 OSAtomicOr32OrigBarrier.3
59e0d9fe 134MLINKS+= atomic.3 OSAtomicTestAndClear.3
224c7076
A
135MLINKS+= atomic.3 OSAtomicTestAndClearBarrier.3
136MLINKS+= atomic.3 OSAtomicTestAndSet.3
137MLINKS+= atomic.3 OSAtomicTestAndSetBarrier.3
138MLINKS+= atomic.3 OSAtomicXor32.3
139MLINKS+= atomic.3 OSAtomicXor32Barrier.3
140MLINKS+= atomic.3 OSAtomicXor32Orig.3
141MLINKS+= atomic.3 OSAtomicXor32OrigBarrier.3
59e0d9fe 142MLINKS+= barrier.3 OSMemoryBarrier.3
224c7076
A
143
144MLINKS+= getiopolicy_np.3 setiopolicy_np.3
145
224c7076
A
146MLINKS+= cache.3 sys_cache_control.3
147MLINKS+= cache.3 sys_icache_invalidate.3
148MLINKS+= cache.3 sys_dcache_flush.3
149
150MLINKS+= spinlock.3 OSSpinLockLock.3 \
151 spinlock.3 OSSpinLockTry.3 \
152 spinlock.3 OSSpinLockUnlock.3
59e0d9fe 153
5b2abdfb
A
154#MAN+= _exit.2 accept.2 access.2 acct.2 adjtime.2 \
155# aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \
156# aio_suspend.2 aio_waitcomplete.2 aio_write.2 \
157# bind.2 brk.2 chdir.2 chflags.2 \
158# chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 \
159# connect.2 dup.2 execve.2 extattr_get_file.2 \
160# fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \
161# getdirentries.2 getdtablesize.2 \
162# getfh.2 getfsstat.2 getgid.2 getgroups.2 getitimer.2 getlogin.2 \
1f2f436a 163# getpeername.2 getpgrp.2 getpid.2 getpriority.2 \
5b2abdfb
A
164# getrusage.2 getsid.2 getsockname.2 \
165# getsockopt.2 gettimeofday.2 getuid.2 \
1f2f436a 166# intro.2 ioctl.2 issetugid.2 jail.2 \
5b2abdfb 167# kldfind.2 kldfirstmod.2 kldload.2 kldnext.2 kldstat.2 kldsym.2 \
224c7076 168# kldunload.2 kqueue.2 link.2 listen.2 lseek.2 \
1f2f436a 169# madvise.2 mincore.2 minherit.2 mkdir.2 mkfifo.2 mknod.2 mlock.2 \
5b2abdfb 170# modfind.2 modnext.2 modstat.2 \
1f2f436a
A
171# mount.2 nanosleep.2 \
172# nfssvc.2 pathconf.2 pipe.2 poll.2 profil.2 ptrace.2 quotactl.2 \
173# read.2 readlink.2 reboot.2 recv.2 revoke.2 rfork.2 \
174# rtprio.2 semctl.2 semget.2 semop.2 send.2 sendfile.2 \
5b2abdfb
A
175# setgroups.2 setpgid.2 setregid.2 setresuid.2 setreuid.2 setsid.2 \
176# setuid.2 shmat.2 shmctl.2 shmget.2 shutdown.2 \
177# sigaction.2 sigaltstack.2 sigpending.2 sigprocmask.2 sigreturn.2 \
1f2f436a 178# sigstack.2 socket.2 socketpair.2 stat.2 statfs.2 \
5b2abdfb
A
179# swapon.2 symlink.2 sync.2 sysarch.2 syscall.2 \
180# truncate.2 umask.2 undelete.2 \
1f2f436a 181# utimes.2 vfork.2 wait.2 write.2
5b2abdfb
A
182#.if !defined(NO_P1003_1B)
183#MAN+= sched_get_priority_max.2 sched_setparam.2 \
184# sched_setscheduler.2 sched_yield.2
185#.endif
186
187#MLINKS+=access.2 eaccess.2
188#MLINKS+=brk.2 sbrk.2
189#MLINKS+=chdir.2 fchdir.2
190#MLINKS+=chflags.2 fchflags.2
191#MLINKS+=chmod.2 fchmod.2 chmod.2 lchmod.2
192#MLINKS+=chown.2 fchown.2 chown.2 lchown.2
193#MLINKS+=clock_gettime.2 clock_getres.2 clock_gettime.2 clock_settime.2
194#MLINKS+=dup.2 dup2.2
195#MLINKS+=extattr_get_file.2 extattr_set_file.2 \
196# extattr_get_file.2 extattr_delete_file.2 \
197# extattr_get_file.2 extattr_get_fd.2 \
198# extattr_get_file.2 extattr_set_fd.2 \
199# extattr_get_file.2 extattr_delete_fd.2 \
200# extattr_get_file.2 extattr.2
201#MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2
202#MLINKS+=getdirentries.2 getdents.2
203#MLINKS+=getgid.2 getegid.2
204#MLINKS+=getitimer.2 setitimer.2
205#MLINKS+=getlogin.2 getlogin_r.3
206#MLINKS+=getlogin.2 setlogin.2
207#MLINKS+=getpgrp.2 getpgid.2
208#MLINKS+=getpid.2 getppid.2
209#MLINKS+=getpriority.2 setpriority.2
5b2abdfb
A
210#MLINKS+=getsockopt.2 setsockopt.2
211#MLINKS+=gettimeofday.2 settimeofday.2
212#MLINKS+=getuid.2 geteuid.2
213#MLINKS+=intro.2 errno.2
214#MLINKS+=kqueue.2 kevent.2
215#MLINKS+=mlock.2 munlock.2
216#MLINKS+=modnext.2 modfnext.2
217#MLINKS+=mount.2 unmount.2
218#MLINKS+=pathconf.2 fpathconf.2
219#MLINKS+=read.2 pread.2 read.2 readv.2
220#MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
221#MLINKS+=send.2 sendmsg.2 send.2 sendto.2
222#MLINKS+=setpgid.2 setpgrp.2
223#MLINKS+=setresuid.2 setresgid.2 setresuid.2 getresuid.2 setresuid.2 getresgid.2
224#MLINKS+=setuid.2 setegid.2 setuid.2 seteuid.2 setuid.2 setgid.2
225#MLINKS+=shmat.2 shmdt.2
226#MLINKS+=stat.2 fstat.2 stat.2 lstat.2
227#MLINKS+=statfs.2 fstatfs.2
228#MLINKS+=syscall.2 __syscall.2
229#MLINKS+=truncate.2 ftruncate.2
230#MLINKS+=utimes.2 futimes.2 utimes.2 lutimes.2
231#MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2
232#MLINKS+=write.2 pwrite.2 write.2 writev.2
233#.if !defined(NO_P1003_1B)
234#MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \
235# sched_get_priority_max.2 sched_rr_get_interval.2
236#MLINKS+=sched_setparam.2 sched_getparam.2
237#MLINKS+=sched_setscheduler.2 sched_getscheduler.2
238#.endif
239.endif