]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/Makefile
xnu-7195.101.1.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 21 dir.h dirent.h disk.h dkstat.h dtrace.h dtrace_glue.h dtrace_impl.h \
5ba3f43e 22 errno.h ev.h event.h fasttrap.h fasttrap_isa.h fcntl.h file.h filedesc.h filio.h fsgetpath.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\
5ba3f43e 29 select.h sem.h semaphore.h shm.h signal.h signalvar.h snapshot.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 \
f427ee49 34 vm.h vmmeter.h vmparam.h vnioctl.h vnode.h vnode_if.h vsock.h vstat.h wait.h xattr.h \
2d21ac55 35 _select.h _structs.h _types.h _endian.h domain.h protosw.h \
cb323159
A
36 spawn.h timex.h commpage.h log_data.h
37
38# Installs header file for DriverKit drivers -
39# $(DSTROOT)/System/DriverKit/System/usr/include/
40DRIVERKIT_DATAFILES = \
f427ee49 41 cdefs.h _types.h _endian.h
91447636 42
39037602 43# Installs header file for Apple internal use in user level -
2d21ac55 44# $(DSTROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
91447636 45PRIVATE_DATAFILES = \
3e170ce0
A
46 attr.h \
47 cdefs.h \
39037602 48 clonefile.h \
fe8ab488 49 coalition.h \
2d21ac55 50 codesign.h \
6d2010ae 51 content_protection.h \
fe8ab488 52 csr.h \
316670eb 53 decmpfs.h \
3e170ce0 54 disk.h \
91447636 55 disklabel.h \
3e170ce0
A
56 domain.h \
57 event.h \
58 fcntl.h \
6d2010ae 59 fileport.h \
b0d623f7 60 fsctl.h \
3e170ce0 61 fsevents.h \
b0d623f7 62 fsgetpath.h \
2d21ac55 63 fslog.h \
39236c6e 64 guarded.h \
6d2010ae 65 imgsrc.h \
91447636 66 ipcs.h \
316670eb 67 kas_info.h \
3e170ce0
A
68 kdebug.h \
69 kern_control.h \
70 kern_event.h \
fe8ab488 71 kern_memorystatus.h \
cb323159
A
72 kern_memorystatus_freeze.h \
73 kern_memorystatus_notify.h \
39236c6e 74 kern_overrides.h \
cb323159 75 kern_sysctl.h \
3e170ce0
A
76 mbuf.h \
77 mman.h \
5ba3f43e 78 monotonic.h \
490019cf 79 persona.h \
3e170ce0
A
80 priv.h \
81 proc.h \
82 proc_info.h \
83 proc_uuid_policy.h \
84 process_policy.h \
39037602 85 reason.h \
3e170ce0 86 resource.h \
fe8ab488 87 sfi.h \
91447636 88 shm_internal.h \
39037602 89 snapshot.h \
3e170ce0
A
90 socket.h \
91 socketvar.h \
92 sockio.h \
93 spawn.h \
2d21ac55 94 spawn_internal.h \
3e170ce0
A
95 stackshot.h \
96 sys_domain.h \
b0d623f7 97 tree.h \
39037602 98 ulock.h \
3e170ce0 99 unpcb.h \
91447636 100 ux_exception.h \
f427ee49 101 vsock.h \
3e170ce0 102 work_interval.h \
6d2010ae 103 process_policy.h \
39236c6e 104 proc_uuid_policy.h \
3e170ce0
A
105 priv.h \
106 pgo.h \
5ba3f43e
A
107 memory_maintenance.h \
108 commpage.h
91447636 109
cb323159
A
110# Installs header file for Apple internal use by DriverKit drivers -
111# $(DSTROOT)/System/DriverKit/System/usr/local/include/
112DRIVERKIT_PRIVATE_DATAFILES = \
113 appleapiopts.h kdebug.h
114
39037602 115# Installs header file for kernel extensions -
2d21ac55
A
116# $(DSTROOT)/System/Library/Frameworks/Kernel.framework/Headers
117# $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders
91447636 118KERNELFILES = \
39037602 119 appleapiopts.h attr.h \
91447636 120 buf.h cdefs.h conf.h \
2d21ac55 121 dir.h dirent.h disk.h disklabel.h dkstat.h \
b0d623f7 122 errno.h ev.h event.h fcntl.h file.h filio.h \
2d21ac55 123 ioccom.h ioctl.h ipc.h \
3e170ce0 124 ioctl_compat.h kernel.h kernel_types.h kern_event.h lock.h lockf.h \
cb323159
A
125 kauth.h kdebug.h kdebug_kernel.h md5.h kern_control.h imgact.h malloc.h \
126 namei.h mman.h mbuf.h mount.h netport.h param.h paths.h \
b0d623f7 127 proc.h queue.h random.h resource.h \
2d21ac55 128 sbuf.h posix_sem.h posix_shm.h sem.h shm.h \
fe8ab488 129 select.h signal.h socket.h socketvar.h sockio.h stat.h stdio.h \
91447636
A
130 sysctl.h syslimits.h syslog.h systm.h sys_domain.h time.h \
131 types.h ubc.h ucontext.h ucred.h uio.h un.h unistd.h unpcb.h \
f427ee49 132 utfconv.h unicode.h vm.h vmparam.h vnode.h vnode_if.h vsock.h xattr.h \
2d21ac55 133 _select.h _structs.h _types.h _endian.h protosw.h domain.h \
91447636 134 kpi_mbuf.h kpi_socket.h kpi_socketfilter.h \
2d21ac55 135 ttycom.h termios.h msg.h \
b0d623f7 136 wait.h \
5ba3f43e 137 spawn.h timex.h commpage.h
2d21ac55
A
138# The last line was added to export needed headers for the MAC calls
139# whose source is outside of the xnu/bsd tree.
91447636 140
39037602 141# Installs header file for Apple internal use for kernel extensions -
2d21ac55 142# $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders
91447636 143PRIVATE_KERNELFILES = \
6d2010ae 144 codesign.h \
d1ecb069 145 cprotect.h \
6d2010ae 146 content_protection.h \
fe8ab488 147 csr.h \
b0d623f7 148 decmpfs.h \
91447636 149 disktab.h \
5ba3f43e 150 eventhandler.h \
2d21ac55 151 fbt.h \
6d2010ae 152 fileport.h \
b0d623f7 153 fsctl.h \
2d21ac55 154 fslog.h \
fe8ab488
A
155 kasl.h \
156 kern_memorystatus.h \
cb323159
A
157 kern_memorystatus_freeze.h \
158 kern_memorystatus_notify.h \
3e170ce0 159 kpi_private.h \
39037602 160 ktrace.h \
f427ee49 161 linker_set.h \
91447636 162 mach_swapon.h \
5ba3f43e 163 monotonic.h \
91447636
A
164 msgbuf.h \
165 eventvar.h \
490019cf 166 persona.h \
fe8ab488 167 proc_info.h \
39236c6e 168 pthread_shims.h \
b0d623f7 169 quota.h \
5ba3f43e 170 reboot.h \
2d21ac55
A
171 sem_internal.h \
172 shm_internal.h \
91447636 173 signalvar.h \
3e170ce0 174 stackshot.h \
91447636
A
175 tty.h ttychars.h \
176 ttydefaults.h ttydev.h \
177 user.h \
2d21ac55
A
178 vfs_context.h \
179 vmmeter.h \
39037602 180 reason.h \
6d2010ae 181 spawn_internal.h \
3e170ce0
A
182 priv.h \
183 pgo.h \
39037602
A
184 memory_maintenance.h \
185 doc_tombstone.h \
5ba3f43e
A
186 fsevents.h \
187 work_interval.h \
cb323159 188 kern_sysctl.h \
f427ee49 189 vsock_transport.h \
1c79356b 190
d9a64523
A
191XNU_ONLY_EXPORTS = \
192 bsdtask_info.h \
193 file_internal.h \
194 filedesc.h \
195 guarded.h \
d9a64523
A
196 mount_internal.h \
197 munge.h \
198 pipe.h \
199 proc_internal.h \
f427ee49 200 proc_require.h \
d9a64523
A
201 pthread_internal.h \
202 resourcevar.h \
203 semaphore.h \
204 tree.h \
205 uio_internal.h \
206 ulock.h \
207 ux_exception.h \
f427ee49
A
208 vnode_internal.h \
209 vsock_domain.h
210
211MODULEMAP_INCDIR_FILES = \
212 sys__types.modulemap \
213 sys_types.modulemap \
214 sys_cdefs.modulemap
d9a64523 215
3e170ce0 216# /usr/include
1c79356b
A
217INSTALL_MI_LIST = ${DATAFILES}
218
cb323159
A
219INSTALL_DRIVERKIT_MI_LIST = ${DRIVERKIT_DATAFILES}
220
f427ee49
A
221INSTALL_MODULEMAP_INCDIR_MI_LIST = ${MODULEMAP_INCDIR_FILES}
222
6d2010ae 223INSTALL_MI_GEN_LIST = syscall.h _posix_availability.h _symbol_aliasing.h
b0d623f7 224
cb323159
A
225INSTALL_DRIVERKIT_MI_GEN_LIST = _posix_availability.h _symbol_aliasing.h
226
1c79356b
A
227INSTALL_MI_DIR = sys
228
d9a64523 229EXPORT_MI_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES} ${XNU_ONLY_EXPORTS}
b0d623f7 230
f427ee49 231EXPORT_MI_GEN_LIST = syscall.h sysproto.h
1c79356b
A
232
233EXPORT_MI_DIR = sys
234
91447636 235# /System/Library/Frameworks/System.framework/PrivateHeaders
3e170ce0 236INSTALL_MI_LCL_LIST = ${PRIVATE_DATAFILES}
91447636 237
cb323159
A
238INSTALL_DRIVERKIT_MI_LCL_LIST = ${DRIVERKIT_PRIVATE_DATAFILES}
239
91447636 240# /System/Library/Frameworks/Kernel.framework/PrivateHeaders
91447636
A
241INSTALL_KF_MI_LCL_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES}
242
b0d623f7
A
243INSTALL_KF_MI_LCL_GEN_LIST = sysproto.h
244
91447636 245# /System/Library/Frameworks/Kernel.framework/Headers
91447636 246INSTALL_KF_MI_LIST = ${KERNELFILES}
1c79356b 247
04b8595b 248INSTALL_KF_MI_GEN_LIST =
b0d623f7
A
249
250MAKESYSCALLS = $(SRCROOT)/bsd/kern/makesyscalls.sh
251
fe8ab488
A
252$(OBJROOT)/cscope.genhdrs:
253 $(_v)mkdir -p $(OBJROOT)/cscope.genhdrs
254
f427ee49
A
255$(OBJROOT)/syscall.codes: $(TARGET)/bsd.syscalls.master
256 @$(LOG_GENERATE) "$(ColorLF)$@$(Color0) from $(ColorF)$(<F)$(Color0)"
39037602
A
257 $(_v)$(MAKESYSCALLS) $< trace > $@
258
259$(OBJROOT)/trace.codes: $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes
260 $(_v)sort -g $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes >$@
261
f427ee49
A
262syscall.h: $(TARGET)/bsd.syscalls.master $(OBJROOT)/cscope.genhdrs
263 @$(LOG_GENERATE) "$(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$(<F)$(Color0)"
fe8ab488 264 @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path
b0d623f7
A
265 $(_v)$(MAKESYSCALLS) $< header > /dev/null
266
f427ee49
A
267sysproto.h: $(TARGET)/bsd.syscalls.master $(OBJROOT)/cscope.genhdrs
268 @$(LOG_GENERATE) "bsd/sys/$@$(Color0) from $(ColorF)$(<F)$(Color0)"
fe8ab488 269 @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path
b0d623f7
A
270 $(_v)$(MAKESYSCALLS) $< proto > /dev/null
271
6d2010ae
A
272MAKE_POSIX_AVAILABILITY = $(SRCROOT)/bsd/sys/make_posix_availability.sh
273_posix_availability.h: $(MAKE_POSIX_AVAILABILITY)
f427ee49 274 @$(LOG_GENERATE) "bsd/sys/$@$(Color0)"
316670eb 275 $(_v)$(MAKE_POSIX_AVAILABILITY) "$@"
6d2010ae
A
276
277MAKE_SYMBOL_ALIASING = $(SRCROOT)/bsd/sys/make_symbol_aliasing.sh
278_symbol_aliasing.h: $(MAKE_SYMBOL_ALIASING)
f427ee49 279 @$(LOG_GENERATE) "bsd/sys/$@$(Color0)"
316670eb 280 $(_v)$(MAKE_SYMBOL_ALIASING) "$(SDKROOT)" "$@"
6d2010ae 281
cb323159
A
282# generated headers needed early (used by iig during installhdrs of iokit/DriverKit)
283SETUP_GEN_LIST = _posix_availability.h _symbol_aliasing.h
284
285do_build_setup:: $(SETUP_GEN_LIST)
286
39037602
A
287TRACE_CODES_DEST = \
288 $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR)/trace.codes
1c79356b 289
39037602
A
290$(TRACE_CODES_DEST): $(OBJROOT)/trace.codes
291 $(_v)$(MKDIR) $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR)
f427ee49 292 @$(LOG) INSTALL "$(@F)"
39037602 293 $(_v)$(INSTALL) $(INSTALL_FLAGS) $(OBJROOT)/trace.codes $@
1c79356b 294
f427ee49 295do_textfiles_install_mi:: $(TRACE_CODES_DEST)
39037602
A
296
297include $(MakeInc_rule)
298include $(MakeInc_dir)