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