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