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