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