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