]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/Makefile
xnu-3789.70.16.tar.gz
[apple/xnu.git] / bsd / sys / Makefile
CommitLineData
1c79356b
A
1export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
1c79356b
A
6include $(MakeInc_cmd)
7include $(MakeInc_def)
8
39236c6e
A
9INSTINC_SUBDIRS = \
10 _types
593a1d5f 11
39236c6e
A
12EXPINC_SUBDIRS = \
13 _types
1c79356b 14
39037602 15# Installs header file for user level -
2d21ac55
A
16# $(DSTROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
17# $(DSTROOT)/usr/include/
1c79356b 18DATAFILES = \
39037602
A
19 appleapiopts.h acct.h aio.h attr.h \
20 buf.h cdefs.h clonefile.h conf.h \
2d21ac55
A
21 dir.h dirent.h disk.h dkstat.h dtrace.h dtrace_glue.h dtrace_impl.h \
22 errno.h ev.h event.h fasttrap.h fasttrap_isa.h fcntl.h file.h filedesc.h filio.h gmon.h \
91447636 23 ioccom.h ioctl.h \
3e170ce0 24 ioctl_compat.h ipc.h kernel.h kernel_types.h kern_event.h lctx.h loadable_fs.h lock.h lockf.h \
39037602 25 kauth.h kdebug.h kdebug_signpost.h kern_control.h lockstat.h malloc.h \
b0d623f7 26 mbuf.h mman.h mount.h msg.h msgbuf.h netport.h param.h paths.h pipe.h poll.h \
39037602
A
27 proc.h proc_info.h ptrace.h queue.h quota.h reboot.h resource.h resourcevar.h \
28 sbuf.h posix_sem.h posix_shm.h random.h sdt.h\
fe8ab488 29 select.h sem.h semaphore.h shm.h signal.h signalvar.h socket.h socketvar.h sockio.h stat.h stdio.h \
b0d623f7 30 sysctl.h syslimits.h syslog.h sys_domain.h termios.h time.h \
1c79356b 31 timeb.h times.h tprintf.h trace.h tty.h ttychars.h ttycom.h \
9bccf70c 32 ttydefaults.h ttydev.h types.h ubc.h ucontext.h ucred.h uio.h un.h unistd.h unpcb.h \
2d21ac55 33 user.h utfconv.h utsname.h vadvise.h vcmd.h \
91447636 34 vm.h vmmeter.h vmparam.h vnioctl.h vnode.h vnode_if.h vstat.h wait.h xattr.h \
2d21ac55
A
35 _select.h _structs.h _types.h _endian.h domain.h protosw.h \
36 spawn.h
91447636 37
39037602 38# Installs header file for Apple internal use in user level -
2d21ac55 39# $(DSTROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
91447636 40PRIVATE_DATAFILES = \
3e170ce0
A
41 attr.h \
42 cdefs.h \
39037602 43 clonefile.h \
fe8ab488 44 coalition.h \
2d21ac55 45 codesign.h \
6d2010ae 46 content_protection.h \
fe8ab488 47 csr.h \
316670eb 48 decmpfs.h \
3e170ce0 49 disk.h \
91447636 50 disklabel.h \
3e170ce0
A
51 domain.h \
52 event.h \
53 fcntl.h \
6d2010ae 54 fileport.h \
b0d623f7 55 fsctl.h \
3e170ce0 56 fsevents.h \
b0d623f7 57 fsgetpath.h \
2d21ac55 58 fslog.h \
39236c6e 59 guarded.h \
6d2010ae 60 imgsrc.h \
91447636 61 ipcs.h \
316670eb 62 kas_info.h \
3e170ce0
A
63 kdebug.h \
64 kern_control.h \
65 kern_event.h \
fe8ab488 66 kern_memorystatus.h \
39236c6e 67 kern_overrides.h \
3e170ce0
A
68 mbuf.h \
69 mman.h \
490019cf 70 persona.h \
3e170ce0
A
71 priv.h \
72 proc.h \
73 proc_info.h \
74 proc_uuid_policy.h \
75 process_policy.h \
39037602 76 reason.h \
3e170ce0 77 resource.h \
fe8ab488 78 sfi.h \
91447636 79 shm_internal.h \
39037602 80 snapshot.h \
3e170ce0
A
81 socket.h \
82 socketvar.h \
83 sockio.h \
84 spawn.h \
2d21ac55 85 spawn_internal.h \
3e170ce0
A
86 stackshot.h \
87 sys_domain.h \
b0d623f7 88 tree.h \
39037602 89 ulock.h \
3e170ce0 90 unpcb.h \
91447636 91 ux_exception.h \
3e170ce0 92 work_interval.h \
6d2010ae 93 process_policy.h \
39236c6e 94 proc_uuid_policy.h \
3e170ce0
A
95 priv.h \
96 pgo.h \
97 memory_maintenance.h
91447636 98
39037602 99# Installs header file for kernel extensions -
2d21ac55
A
100# $(DSTROOT)/System/Library/Frameworks/Kernel.framework/Headers
101# $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders
91447636 102KERNELFILES = \
39037602 103 appleapiopts.h attr.h \
91447636 104 buf.h cdefs.h conf.h \
2d21ac55 105 dir.h dirent.h disk.h disklabel.h dkstat.h \
b0d623f7 106 errno.h ev.h event.h fcntl.h file.h filio.h \
2d21ac55 107 ioccom.h ioctl.h ipc.h \
3e170ce0 108 ioctl_compat.h kernel.h kernel_types.h kern_event.h lock.h lockf.h \
fe8ab488 109 kauth.h kdebug.h md5.h kern_control.h imgact.h malloc.h namei.h \
b0d623f7
A
110 mman.h mbuf.h mount.h netport.h param.h paths.h \
111 proc.h queue.h random.h resource.h \
2d21ac55 112 sbuf.h posix_sem.h posix_shm.h sem.h shm.h \
fe8ab488 113 select.h signal.h socket.h socketvar.h sockio.h stat.h stdio.h \
91447636
A
114 sysctl.h syslimits.h syslog.h systm.h sys_domain.h time.h \
115 types.h ubc.h ucontext.h ucred.h uio.h un.h unistd.h unpcb.h \
2d21ac55
A
116 utfconv.h vm.h vmparam.h vnode.h vnode_if.h xattr.h \
117 _select.h _structs.h _types.h _endian.h protosw.h domain.h \
91447636 118 kpi_mbuf.h kpi_socket.h kpi_socketfilter.h \
2d21ac55 119 ttycom.h termios.h msg.h \
b0d623f7 120 wait.h \
2d21ac55
A
121 spawn.h
122# The last line was added to export needed headers for the MAC calls
123# whose source is outside of the xnu/bsd tree.
91447636 124
39037602 125# Installs header file for Apple internal use for kernel extensions -
2d21ac55 126# $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders
91447636 127PRIVATE_KERNELFILES = \
6d2010ae 128 codesign.h \
d1ecb069 129 cprotect.h \
6d2010ae 130 content_protection.h \
fe8ab488 131 csr.h \
b0d623f7 132 decmpfs.h \
91447636 133 disktab.h \
2d21ac55 134 fbt.h \
6d2010ae 135 fileport.h \
b0d623f7 136 fsctl.h \
2d21ac55 137 fslog.h \
fe8ab488
A
138 kasl.h \
139 kern_memorystatus.h \
3e170ce0 140 kpi_private.h \
39037602 141 ktrace.h \
91447636
A
142 mach_swapon.h \
143 msgbuf.h \
144 eventvar.h \
490019cf 145 persona.h \
fe8ab488 146 proc_info.h \
39236c6e 147 pthread_shims.h \
b0d623f7 148 quota.h \
2d21ac55
A
149 sem_internal.h \
150 shm_internal.h \
91447636 151 signalvar.h \
3e170ce0 152 stackshot.h \
91447636
A
153 tty.h ttychars.h \
154 ttydefaults.h ttydev.h \
155 user.h \
2d21ac55
A
156 vfs_context.h \
157 vmmeter.h \
39037602 158 reason.h \
6d2010ae 159 spawn_internal.h \
3e170ce0
A
160 priv.h \
161 pgo.h \
39037602
A
162 memory_maintenance.h \
163 doc_tombstone.h \
164 fsevents.h
1c79356b 165
3e170ce0 166# /usr/include
1c79356b
A
167INSTALL_MI_LIST = ${DATAFILES}
168
6d2010ae 169INSTALL_MI_GEN_LIST = syscall.h _posix_availability.h _symbol_aliasing.h
b0d623f7 170
1c79356b
A
171INSTALL_MI_DIR = sys
172
6d2010ae 173EXPORT_MI_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES} linker_set.h bsdtask_info.h pthread_internal.h filedesc.h pipe.h resourcevar.h semaphore.h \
b0d623f7 174 vnode_internal.h proc_internal.h file_internal.h mount_internal.h \
39037602 175 uio_internal.h tree.h munge.h guarded.h ulock.h
b0d623f7 176
04b8595b 177EXPORT_MI_GEN_LIST = syscall.h sysproto.h kdebugevents.h
1c79356b
A
178
179EXPORT_MI_DIR = sys
180
91447636 181# /System/Library/Frameworks/System.framework/PrivateHeaders
3e170ce0 182INSTALL_MI_LCL_LIST = ${PRIVATE_DATAFILES}
91447636
A
183
184# /System/Library/Frameworks/Kernel.framework/PrivateHeaders
91447636
A
185INSTALL_KF_MI_LCL_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES}
186
b0d623f7
A
187INSTALL_KF_MI_LCL_GEN_LIST = sysproto.h
188
91447636 189# /System/Library/Frameworks/Kernel.framework/Headers
91447636 190INSTALL_KF_MI_LIST = ${KERNELFILES}
1c79356b 191
04b8595b 192INSTALL_KF_MI_GEN_LIST =
b0d623f7
A
193
194MAKESYSCALLS = $(SRCROOT)/bsd/kern/makesyscalls.sh
04b8595b 195MAKEKDEBUGEVENTS = $(SRCROOT)/bsd/kern/makekdebugevents.py
b0d623f7 196
fe8ab488
A
197$(OBJROOT)/cscope.genhdrs:
198 $(_v)mkdir -p $(OBJROOT)/cscope.genhdrs
199
39037602
A
200$(OBJROOT)/syscall.codes: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS)
201 @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)$@$(Color0) from $(ColorF)$<$(Color0)";
202 $(_v)$(MAKESYSCALLS) $< trace > $@
203
204$(OBJROOT)/trace.codes: $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes
205 $(_v)sort -g $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes >$@
206
fe8ab488 207syscall.h: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS) $(OBJROOT)/cscope.genhdrs
39037602 208 @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$<$(Color0)";
fe8ab488 209 @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path
b0d623f7
A
210 $(_v)$(MAKESYSCALLS) $< header > /dev/null
211
fe8ab488 212sysproto.h: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS) $(OBJROOT)/cscope.genhdrs
39037602 213 @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$<$(Color0)";
fe8ab488 214 @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path
b0d623f7
A
215 $(_v)$(MAKESYSCALLS) $< proto > /dev/null
216
39037602
A
217kdebugevents.h: $(OBJROOT)/trace.codes $(MAKEKDEBUGEVENTS) $(OBJROOT)/cscope.genhdrs
218 @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$<$(Color0)";
3e170ce0 219 @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path
04b8595b
A
220 $(_v)$(MAKEKDEBUGEVENTS) $< > "$(OBJPATH)/bsd/sys/$@"
221
6d2010ae
A
222MAKE_POSIX_AVAILABILITY = $(SRCROOT)/bsd/sys/make_posix_availability.sh
223_posix_availability.h: $(MAKE_POSIX_AVAILABILITY)
39037602 224 @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0)";
316670eb 225 $(_v)$(MAKE_POSIX_AVAILABILITY) "$@"
6d2010ae
A
226
227MAKE_SYMBOL_ALIASING = $(SRCROOT)/bsd/sys/make_symbol_aliasing.sh
228_symbol_aliasing.h: $(MAKE_SYMBOL_ALIASING)
39037602 229 @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0)";
316670eb 230 $(_v)$(MAKE_SYMBOL_ALIASING) "$(SDKROOT)" "$@"
6d2010ae 231
39037602
A
232TRACE_CODES_DEST = \
233 $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR)/trace.codes
1c79356b 234
39037602
A
235$(TRACE_CODES_DEST): $(OBJROOT)/trace.codes
236 $(_v)$(MKDIR) $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR)
237 @echo INSTALL $(@F)
238 $(_v)$(INSTALL) $(INSTALL_FLAGS) $(OBJROOT)/trace.codes $@
1c79356b 239
39037602
A
240do_textfiles_install:: $(TRACE_CODES_DEST)
241
242include $(MakeInc_rule)
243include $(MakeInc_dir)