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