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