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