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