]> git.saurik.com Git - apple/xnu.git/blame_incremental - osfmk/mach/Makefile
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / osfmk / mach / Makefile
... / ...
CommitLineData
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
6include $(MakeInc_cmd)
7include $(MakeInc_def)
8
9INSTINC_SUBDIRS = machine
10INSTINC_SUBDIRS_X86_64 = i386
11INSTINC_SUBDIRS_X86_64H = i386
12INSTINC_SUBDIRS_ARM = arm arm64
13INSTINC_SUBDIRS_ARM64 = arm arm64
14
15EXPINC_SUBDIRS = machine
16EXPINC_SUBDIRS_X86_64 = i386
17EXPINC_SUBDIRS_X86_64H = i386
18EXPINC_SUBDIRS_ARM = arm arm64
19EXPINC_SUBDIRS_ARM64 = arm arm64
20
21MIG_TYPES = \
22 clock_types.defs \
23 mach_types.defs \
24 std_types.defs
25
26MIG_DEFS = \
27 audit_triggers.defs \
28 clock.defs \
29 clock_priv.defs \
30 clock_reply.defs \
31 exc.defs \
32 host_notify_reply.defs \
33 host_priv.defs \
34 host_security.defs \
35 lock_set.defs \
36 mach_exc.defs \
37 mach_host.defs \
38 mach_port.defs \
39 mach_vm.defs \
40 mach_voucher.defs \
41 mach_voucher_attr_control.defs \
42 memory_entry.defs \
43 notify.defs \
44 processor.defs \
45 processor_set.defs \
46 task.defs \
47 task_access.defs \
48 telemetry_notification.defs \
49 thread_act.defs \
50 vm_map.defs
51
52MIG_PRIVATE_DEFS = \
53 mach_eventlink.defs \
54 restartable.defs
55
56MACH_PRIVATE_DEFS = \
57 coalition_notification.defs \
58 fairplayd_notification.defs \
59 arcade_upcall.defs \
60 ktrace_background.defs \
61 mach_notify.defs \
62 memory_object_control.defs \
63 memory_object_default.defs \
64 sysdiagnose_notification.defs \
65 upl.defs \
66 vfs_nspace.defs \
67 vm32_map.defs
68
69#
70# MIG-generated headers that are traditionally used by user
71# level code.
72#
73MIG_USHDRS = \
74 audit_triggers_server.h \
75 clock_reply_server.h \
76 coalition_notification_server.h \
77 exc_server.h \
78 fairplayd_notification_server.h \
79 arcade_upcall_server.h \
80 mach_exc_server.h \
81 memory_object_default_server.h \
82 notify_server.h \
83 task_access_server.h \
84 telemetry_notification_server.h \
85 sysdiagnose_notification_server.h \
86 vfs_nspace_server.h
87
88MIG_UUHDRS = \
89 clock.h \
90 clock_priv.h \
91 host_priv.h \
92 host_security.h \
93 ktrace_background.h \
94 lock_set.h \
95 mach_host.h \
96 mach_port.h \
97 mach_vm.h \
98 mach_voucher.h \
99 mach_voucher_attr_control.h \
100 memory_entry.h \
101 memory_object_control.h \
102 processor.h \
103 processor_set.h \
104 task.h \
105 task_access.h \
106 thread_act.h \
107 upl.h \
108 vm_map.h \
109 vfs_nspace.h
110
111MIGINCLUDES = ${MIG_UUHDRS} ${MIG_USHDRS}
112
113DATAFILES = \
114 audit_triggers_types.h \
115 boolean.h \
116 clock_types.h \
117 dyld_kernel.h \
118 error.h \
119 exception.h \
120 exception_types.h \
121 host_notify.h \
122 host_info.h \
123 host_reboot.h \
124 host_special_ports.h \
125 kern_return.h \
126 kmod.h \
127 mach_param.h \
128 mach_time.h \
129 mach_traps.h \
130 mach_types.h \
131 mach_voucher_types.h \
132 machine.h \
133 mach_syscalls.h \
134 memory_object_types.h \
135 message.h \
136 mig.h \
137 mig_errors.h \
138 mig_voucher_support.h \
139 mig_strncpy_zerofill_support.h \
140 ndr.h \
141 notify.h \
142 policy.h \
143 port.h \
144 processor_info.h \
145 rpc.h \
146 sdt.h \
147 semaphore.h \
148 shared_memory_server.h \
149 shared_region.h \
150 std_types.h \
151 sync_policy.h \
152 syscall_sw.h \
153 task_info.h \
154 task_inspect.h \
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 \
168 vm_purgable.h \
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 = \
177 bootstrap.h \
178 ${DATAFILES}
179
180# installed into System.framework's PrivateHeaders/mach subdirectory
181PRIVATE_DATAFILES = \
182 bootstrap.h \
183 coalition.h \
184 coalition_notification.defs \
185 fairplayd_notification.defs \
186 arcade_upcall.defs \
187 host_info.h \
188 ktrace_background.defs \
189 mach_eventlink_types.h \
190 mach_host.defs \
191 mach_traps.h \
192 memory_object_types.h \
193 mig.h \
194 mk_timer.h \
195 processor_info.h \
196 resource_notify.defs \
197 resource_monitors.h \
198 semaphore.h \
199 sfi_class.h \
200 syscall_sw.h \
201 sysdiagnose_notification.defs \
202 task_info.h \
203 task_inspect.h \
204 task_policy.h \
205 thread_policy.h \
206 thread_switch.h \
207 vfs_nspace.defs \
208 vm_prot.h \
209 ${MIG_PRIVATE_DEFS}
210
211INSTALL_MI_LCL_LIST = ${PRIVATE_DATAFILES}
212
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 = \
218 coalition.h \
219 mach_interface.h \
220 $(filter-out mach_traps.h mach_syscalls.h thread_switch.h, ${DATAFILES})
221
222INSTALL_MI_GEN_LIST =
223
224INSTALL_MI_DIR = mach
225
226EXPORT_MI_LIST = \
227 coalition.h \
228 mach_interface.h \
229 resource_monitors.h \
230 mach_eventlink_types.h \
231 sfi_class.h \
232 ${DATAFILES}
233
234EXPORT_MI_GEN_LIST = \
235 ${MIGINCLUDES}
236
237EXPORT_MI_DIR = mach
238
239${MIGINCLUDES} : ${MIG_TYPES}
240
241${MIG_UUHDRS} : \
242 %.h : %.defs
243 @$(LOG_MIG) $@
244 $(_v)$(MIG) $(MIGFLAGS) \
245 -server /dev/null \
246 -user /dev/null \
247 -header $@ \
248 $<
249
250${MIG_USHDRS} : \
251 %_server.h : %.defs
252 @$(LOG_MIG) $@
253 $(_v)$(MIG) $(MIGFLAGS) \
254 -server /dev/null \
255 -user /dev/null \
256 -header /dev/null \
257 -sheader $@ \
258 $<
259
260#
261# Build path
262#
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#
272
273# sender-side ("user") headers generated by MIG from corresponding .defs
274MIG_KUHDRS = \
275 audit_triggers.h \
276 clock_reply.h \
277 exc.h \
278 host_notify_reply.h \
279 ktrace_background.h \
280 mach_exc.h \
281 mach_notify.h \
282 memory_object.h \
283 memory_object_control.h \
284 memory_object_default.h \
285 resource_notify.h \
286 task_access.h \
287 upl.h \
288 vm_map.h
289
290# sender-side ("user") source files generated by MIG from corresponding .defs
291MIG_KUSRC = \
292 audit_triggers_user.c \
293 clock_reply_user.c \
294 coalition_notification_user.c \
295 exc_user.c \
296 fairplayd_notification_user.c \
297 arcade_upcall_user.c \
298 host_notify_reply_user.c \
299 ktrace_background_user.c \
300 mach_exc_user.c \
301 mach_notify_user.c \
302 memory_object_user.c \
303 memory_object_control_user.c \
304 memory_object_default_user.c \
305 resource_notify_user.c \
306 task_access_user.c \
307 telemetry_notification_user.c \
308 upl_user.c \
309 vfs_nspace_user.c \
310 vm_map_user.c \
311 sysdiagnose_notification_user.c
312
313MIG_KSHDRS = \
314 arcade_register_server.h \
315 clock_server.h \
316 clock_priv_server.h \
317 mach_eventlink_server.h \
318 exc_server.h \
319 host_priv_server.h \
320 host_security_server.h \
321 lock_set_server.h \
322 mach_exc_server.h \
323 mach_host_server.h \
324 mach_notify_server.h \
325 mach_port_server.h \
326 mach_vm_server.h \
327 mach_voucher_server.h \
328 mach_voucher_attr_control_server.h \
329 memory_entry_server.h \
330 memory_object_control_server.h \
331 memory_object_default_server.h \
332 processor_server.h \
333 processor_set_server.h \
334 restartable_server.h \
335 task_server.h \
336 thread_act_server.h \
337 upl_server.h \
338 vm_map_server.h \
339 vm32_map_server.h
340
341MIG_KSSRC = \
342 arcade_register_server.c \
343 clock_server.c \
344 clock_priv_server.c \
345 mach_eventlink_server.c \
346 exc_server.c \
347 host_priv_server.c \
348 host_security_server.c \
349 lock_set_server.c \
350 mach_exc_server.c \
351 mach_host_server.c \
352 mach_notify_server.c \
353 mach_port_server.c \
354 mach_vm_server.c \
355 mach_voucher_server.c \
356 mach_voucher_attr_control_server.c \
357 memory_entry_server.c \
358 memory_object_control_server.c \
359 memory_object_default_server.c \
360 processor_server.c \
361 processor_set_server.c \
362 restartable_server.c \
363 task_server.c \
364 thread_act_server.c \
365 upl_server.c \
366 vm_map_server.c \
367 vm32_map_server.c
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
387do_build_all:: $(COMP_FILES)
388
389${COMP_FILES} : ${MIG_TYPES}
390
391${MIG_KUSRC} : \
392 %_user.c : %.defs
393 @$(LOG_MIG) $@
394 $(_v)${MIG} ${MIGFLAGS} ${MIGKUFLAGS} \
395 -user $*_user.c \
396 -header $*.h \
397 -server /dev/null \
398 -sheader /dev/null \
399 $<
400
401${MIG_KSSRC}: \
402 %_server.c : %.defs
403 @$(LOG_MIG) $@
404 $(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \
405 -user /dev/null \
406 -header /dev/null \
407 -server $*_server.c \
408 -sheader $*_server.h \
409 $<
410
411include $(MakeInc_rule)
412include $(MakeInc_dir)