]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / mach / 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
6d2010ae 9INSTINC_SUBDIRS = machine
6d2010ae 10INSTINC_SUBDIRS_X86_64 = i386
fe8ab488 11INSTINC_SUBDIRS_X86_64H = i386
3e170ce0
A
12INSTINC_SUBDIRS_ARM = arm arm64
13INSTINC_SUBDIRS_ARM64 = arm arm64
b0d623f7 14
6d2010ae 15EXPINC_SUBDIRS = machine
6d2010ae 16EXPINC_SUBDIRS_X86_64 = i386
fe8ab488 17EXPINC_SUBDIRS_X86_64H = i386
3e170ce0
A
18EXPINC_SUBDIRS_ARM = arm arm64
19EXPINC_SUBDIRS_ARM64 = arm arm64
2d21ac55 20
1c79356b
A
21MIG_TYPES = \
22 clock_types.defs \
23 mach_types.defs \
24 std_types.defs
25
26MIG_DEFS = \
e5568f75 27 audit_triggers.defs \
1c79356b
A
28 clock.defs \
29 clock_priv.defs \
30 clock_reply.defs \
31 exc.defs \
55e303ae 32 host_notify_reply.defs \
1c79356b
A
33 host_priv.defs \
34 host_security.defs \
1c79356b 35 lock_set.defs \
2d21ac55 36 mach_exc.defs \
1c79356b
A
37 mach_host.defs \
38 mach_port.defs \
91447636 39 mach_vm.defs \
fe8ab488
A
40 mach_voucher.defs \
41 mach_voucher_attr_control.defs \
d9a64523 42 memory_entry.defs \
1c79356b
A
43 notify.defs \
44 processor.defs \
45 processor_set.defs \
46 task.defs \
2d21ac55 47 task_access.defs \
39236c6e 48 telemetry_notification.defs \
1c79356b 49 thread_act.defs \
91447636 50 vm_map.defs
1c79356b 51
cb323159 52MIG_PRIVATE_DEFS = \
f427ee49 53 mach_eventlink.defs \
cb323159
A
54 restartable.defs
55
1c79356b 56MACH_PRIVATE_DEFS = \
fe8ab488 57 coalition_notification.defs \
cb323159
A
58 fairplayd_notification.defs \
59 arcade_upcall.defs \
39037602 60 ktrace_background.defs \
55e303ae 61 mach_notify.defs \
1c79356b
A
62 memory_object_control.defs \
63 memory_object_default.defs \
3e170ce0 64 sysdiagnose_notification.defs \
b0d623f7 65 upl.defs \
cb323159 66 vfs_nspace.defs \
c3c9b80d
A
67 vm32_map.defs \
68 iocompressionstats_notification.defs
1c79356b
A
69
70#
71# MIG-generated headers that are traditionally used by user
72# level code.
73#
74MIG_USHDRS = \
91447636 75 audit_triggers_server.h \
1c79356b 76 clock_reply_server.h \
fe8ab488 77 coalition_notification_server.h \
1c79356b 78 exc_server.h \
cb323159
A
79 fairplayd_notification_server.h \
80 arcade_upcall_server.h \
2d21ac55 81 mach_exc_server.h \
1c79356b 82 memory_object_default_server.h \
2d21ac55 83 notify_server.h \
39236c6e 84 task_access_server.h \
3e170ce0 85 telemetry_notification_server.h \
cb323159 86 sysdiagnose_notification_server.h \
c3c9b80d 87 iocompressionstats_notification_server.h \
cb323159 88 vfs_nspace_server.h
1c79356b
A
89
90MIG_UUHDRS = \
1c79356b
A
91 clock.h \
92 clock_priv.h \
93 host_priv.h \
94 host_security.h \
39037602 95 ktrace_background.h \
1c79356b
A
96 lock_set.h \
97 mach_host.h \
98 mach_port.h \
91447636 99 mach_vm.h \
fe8ab488
A
100 mach_voucher.h \
101 mach_voucher_attr_control.h \
d9a64523 102 memory_entry.h \
1c79356b 103 memory_object_control.h \
1c79356b
A
104 processor.h \
105 processor_set.h \
106 task.h \
2d21ac55 107 task_access.h \
1c79356b
A
108 thread_act.h \
109 upl.h \
cb323159
A
110 vm_map.h \
111 vfs_nspace.h
1c79356b
A
112
113MIGINCLUDES = ${MIG_UUHDRS} ${MIG_USHDRS}
114
115DATAFILES = \
f427ee49 116 audit_triggers_types.h \
1c79356b 117 boolean.h \
1c79356b 118 clock_types.h \
39037602 119 dyld_kernel.h \
1c79356b
A
120 error.h \
121 exception.h \
122 exception_types.h \
55e303ae 123 host_notify.h \
1c79356b
A
124 host_info.h \
125 host_reboot.h \
55e303ae 126 host_special_ports.h \
1c79356b
A
127 kern_return.h \
128 kmod.h \
1c79356b
A
129 mach_param.h \
130 mach_time.h \
131 mach_traps.h \
132 mach_types.h \
fe8ab488 133 mach_voucher_types.h \
1c79356b
A
134 machine.h \
135 mach_syscalls.h \
136 memory_object_types.h \
137 message.h \
138 mig.h \
139 mig_errors.h \
fe8ab488 140 mig_voucher_support.h \
39037602 141 mig_strncpy_zerofill_support.h \
1c79356b
A
142 ndr.h \
143 notify.h \
144 policy.h \
145 port.h \
146 processor_info.h \
147 rpc.h \
2d21ac55 148 sdt.h \
1c79356b
A
149 semaphore.h \
150 shared_memory_server.h \
2d21ac55 151 shared_region.h \
1c79356b
A
152 std_types.h \
153 sync_policy.h \
154 syscall_sw.h \
155 task_info.h \
5ba3f43e 156 task_inspect.h \
1c79356b
A
157 task_policy.h \
158 task_special_ports.h \
159 thread_info.h \
160 thread_policy.h \
161 thread_special_ports.h \
162 thread_status.h \
163 thread_switch.h \
164 time_value.h \
165 vm_attributes.h \
166 vm_behavior.h \
167 vm_inherit.h \
168 vm_param.h \
169 vm_prot.h \
91447636 170 vm_purgable.h \
1c79356b
A
171 vm_region.h \
172 vm_statistics.h \
173 vm_sync.h \
174 vm_types.h \
175 ${MIG_TYPES} \
176 ${MIG_DEFS}
177
178INSTALL_MI_LIST = \
91447636 179 bootstrap.h \
1c79356b
A
180 ${DATAFILES}
181
39037602 182# installed into System.framework's PrivateHeaders/mach subdirectory
3e170ce0 183PRIVATE_DATAFILES = \
fe8ab488 184 bootstrap.h \
3e170ce0 185 coalition.h \
fe8ab488 186 coalition_notification.defs \
cb323159 187 fairplayd_notification.defs \
c3c9b80d 188 iocompressionstats_notification.defs \
cb323159 189 arcade_upcall.defs \
3e170ce0 190 host_info.h \
39037602 191 ktrace_background.defs \
f427ee49 192 mach_eventlink_types.h \
3e170ce0
A
193 mach_host.defs \
194 mach_traps.h \
195 memory_object_types.h \
196 mig.h \
813fb2f6 197 mk_timer.h \
3e170ce0 198 processor_info.h \
39037602
A
199 resource_notify.defs \
200 resource_monitors.h \
3e170ce0
A
201 semaphore.h \
202 sfi_class.h \
203 syscall_sw.h \
204 sysdiagnose_notification.defs \
205 task_info.h \
5ba3f43e 206 task_inspect.h \
3e170ce0
A
207 task_policy.h \
208 thread_policy.h \
209 thread_switch.h \
cb323159
A
210 vfs_nspace.defs \
211 vm_prot.h \
212 ${MIG_PRIVATE_DEFS}
3e170ce0
A
213
214INSTALL_MI_LCL_LIST = ${PRIVATE_DATAFILES}
fe8ab488 215
91447636
A
216INSTALL_KF_MI_LIST = \
217 mach_interface.h \
218 $(filter-out mach_traps.h mach_syscalls.h thread_switch.h, ${DATAFILES})
219
220INSTALL_KF_MI_LCL_LIST = \
3e170ce0 221 coalition.h \
91447636
A
222 mach_interface.h \
223 $(filter-out mach_traps.h mach_syscalls.h thread_switch.h, ${DATAFILES})
224
1c79356b
A
225INSTALL_MI_GEN_LIST =
226
227INSTALL_MI_DIR = mach
228
229EXPORT_MI_LIST = \
3e170ce0 230 coalition.h \
1c79356b 231 mach_interface.h \
39037602 232 resource_monitors.h \
f427ee49 233 mach_eventlink_types.h \
fe8ab488 234 sfi_class.h \
1c79356b
A
235 ${DATAFILES}
236
237EXPORT_MI_GEN_LIST = \
238 ${MIGINCLUDES}
239
240EXPORT_MI_DIR = mach
241
1c79356b
A
242${MIGINCLUDES} : ${MIG_TYPES}
243
1c79356b
A
244${MIG_UUHDRS} : \
245 %.h : %.defs
f427ee49 246 @$(LOG_MIG) $@
2d21ac55 247 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
248 -server /dev/null \
249 -user /dev/null \
39037602 250 -header $@ \
1c79356b
A
251 $<
252
1c79356b
A
253${MIG_USHDRS} : \
254 %_server.h : %.defs
f427ee49 255 @$(LOG_MIG) $@
2d21ac55 256 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
257 -server /dev/null \
258 -user /dev/null \
259 -header /dev/null \
39037602 260 -sheader $@ \
1c79356b
A
261 $<
262
263#
264# Build path
265#
1c79356b
A
266
267INCFLAGS_MAKEFILE= -I..
268
269MIGKSFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_SERVER=1
270MIGKUFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_USER=1 -maxonstack 1024
271#
272# MIG-generated headers that are traditionally used by kernel
273# level code.
274#
39037602
A
275
276# sender-side ("user") headers generated by MIG from corresponding .defs
1c79356b 277MIG_KUHDRS = \
91447636 278 audit_triggers.h \
1c79356b
A
279 clock_reply.h \
280 exc.h \
55e303ae 281 host_notify_reply.h \
39037602 282 ktrace_background.h \
2d21ac55 283 mach_exc.h \
55e303ae 284 mach_notify.h \
1c79356b 285 memory_object.h \
0b4e3aa0 286 memory_object_control.h \
1c79356b 287 memory_object_default.h \
39037602 288 resource_notify.h \
2d21ac55 289 task_access.h \
1c79356b
A
290 upl.h \
291 vm_map.h
292
39037602 293# sender-side ("user") source files generated by MIG from corresponding .defs
1c79356b 294MIG_KUSRC = \
e5568f75 295 audit_triggers_user.c \
1c79356b 296 clock_reply_user.c \
fe8ab488 297 coalition_notification_user.c \
1c79356b 298 exc_user.c \
cb323159
A
299 fairplayd_notification_user.c \
300 arcade_upcall_user.c \
55e303ae 301 host_notify_reply_user.c \
39037602 302 ktrace_background_user.c \
2d21ac55 303 mach_exc_user.c \
55e303ae 304 mach_notify_user.c \
1c79356b 305 memory_object_user.c \
0b4e3aa0 306 memory_object_control_user.c \
1c79356b 307 memory_object_default_user.c \
39037602 308 resource_notify_user.c \
2d21ac55 309 task_access_user.c \
39236c6e 310 telemetry_notification_user.c \
c3c9b80d 311 iocompressionstats_notification_user.c \
1c79356b 312 upl_user.c \
cb323159 313 vfs_nspace_user.c \
3e170ce0
A
314 vm_map_user.c \
315 sysdiagnose_notification_user.c
1c79356b
A
316
317MIG_KSHDRS = \
cb323159 318 arcade_register_server.h \
1c79356b
A
319 clock_server.h \
320 clock_priv_server.h \
f427ee49 321 mach_eventlink_server.h \
1c79356b
A
322 exc_server.h \
323 host_priv_server.h \
324 host_security_server.h \
1c79356b 325 lock_set_server.h \
2d21ac55 326 mach_exc_server.h \
1c79356b 327 mach_host_server.h \
55e303ae 328 mach_notify_server.h \
1c79356b 329 mach_port_server.h \
91447636 330 mach_vm_server.h \
fe8ab488
A
331 mach_voucher_server.h \
332 mach_voucher_attr_control_server.h \
d9a64523 333 memory_entry_server.h \
1c79356b
A
334 memory_object_control_server.h \
335 memory_object_default_server.h \
1c79356b
A
336 processor_server.h \
337 processor_set_server.h \
cb323159 338 restartable_server.h \
1c79356b
A
339 task_server.h \
340 thread_act_server.h \
341 upl_server.h \
b0d623f7
A
342 vm_map_server.h \
343 vm32_map_server.h
1c79356b
A
344
345MIG_KSSRC = \
cb323159 346 arcade_register_server.c \
1c79356b
A
347 clock_server.c \
348 clock_priv_server.c \
f427ee49 349 mach_eventlink_server.c \
1c79356b
A
350 exc_server.c \
351 host_priv_server.c \
352 host_security_server.c \
1c79356b 353 lock_set_server.c \
2d21ac55 354 mach_exc_server.c \
1c79356b 355 mach_host_server.c \
55e303ae 356 mach_notify_server.c \
1c79356b 357 mach_port_server.c \
91447636 358 mach_vm_server.c \
fe8ab488
A
359 mach_voucher_server.c \
360 mach_voucher_attr_control_server.c \
d9a64523 361 memory_entry_server.c \
1c79356b
A
362 memory_object_control_server.c \
363 memory_object_default_server.c \
1c79356b
A
364 processor_server.c \
365 processor_set_server.c \
cb323159 366 restartable_server.c \
1c79356b
A
367 task_server.c \
368 thread_act_server.c \
369 upl_server.c \
b0d623f7
A
370 vm_map_server.c \
371 vm32_map_server.c
1c79356b
A
372
373#
374# JMM -
375# Since there are two generated header files with the same name, one for
376# install and export, the other for internal use (and they are different)
377# we can't explicitly list two rules for the same target. So rules for
378# generating internal headers will be handled implicitly by creating rules
379# to generate the internal C sources, and the headers get created as a
380# side-effect.
381#
382#
383# This is all temporary scaffolding, as we are moving to a model where
384# the MIG-generated code is identical in all environments. At first, it
385# will contain some environment-specific ifdefs, but over time should not
386# even require that as we move towards making all the environments look
387# the same.
388#
389COMP_FILES = ${MIG_KUSRC} ${MIG_KSSRC}
390
39236c6e
A
391do_build_all:: $(COMP_FILES)
392
1c79356b 393${COMP_FILES} : ${MIG_TYPES}
1c79356b
A
394
395${MIG_KUSRC} : \
396 %_user.c : %.defs
f427ee49 397 @$(LOG_MIG) $@
2d21ac55 398 $(_v)${MIG} ${MIGFLAGS} ${MIGKUFLAGS} \
1c79356b
A
399 -user $*_user.c \
400 -header $*.h \
401 -server /dev/null \
402 -sheader /dev/null \
403 $<
404
1c79356b
A
405${MIG_KSSRC}: \
406 %_server.c : %.defs
f427ee49 407 @$(LOG_MIG) $@
2d21ac55 408 $(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \
1c79356b
A
409 -user /dev/null \
410 -header /dev/null \
411 -server $*_server.c \
412 -sheader $*_server.h \
413 $<
1c79356b
A
414
415include $(MakeInc_rule)
416include $(MakeInc_dir)