]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/Makefile
xnu-1456.1.26.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
6
7include $(MakeInc_cmd)
8include $(MakeInc_def)
9
10INSTINC_SUBDIRS = \
11 machine
12
13INSTINC_SUBDIRS_PPC = \
14 ppc
15
2d21ac55
A
16INSTINC_SUBDIRS_ARM = \
17 arm
18
1c79356b
A
19INSTINC_SUBDIRS_I386 = \
20 i386
21
b0d623f7
A
22INSTINC_SUBDIRS_X86_64 = \
23 i386
24
1c79356b
A
25EXPINC_SUBDIRS = \
26 machine
27
28EXPINC_SUBDIRS_PPC = \
29 ppc
30
31EXPINC_SUBDIRS_I386 = \
32 i386
33
b0d623f7
A
34EXPINC_SUBDIRS_X86_64 = \
35 i386
36
2d21ac55
A
37EXPINC_SUBDIRS_ARM = \
38 arm
39
1c79356b
A
40MIG_TYPES = \
41 clock_types.defs \
42 mach_types.defs \
43 std_types.defs
44
45MIG_DEFS = \
e5568f75 46 audit_triggers.defs \
1c79356b
A
47 clock.defs \
48 clock_priv.defs \
49 clock_reply.defs \
50 exc.defs \
55e303ae 51 host_notify_reply.defs \
1c79356b
A
52 host_priv.defs \
53 host_security.defs \
54 ledger.defs \
55 lock_set.defs \
2d21ac55 56 mach_exc.defs \
1c79356b
A
57 mach_host.defs \
58 mach_port.defs \
91447636 59 mach_vm.defs \
1c79356b
A
60 notify.defs \
61 processor.defs \
62 processor_set.defs \
2d21ac55 63 security.defs \
1c79356b 64 task.defs \
2d21ac55 65 task_access.defs \
1c79356b 66 thread_act.defs \
91447636 67 vm_map.defs
1c79356b 68
2d21ac55 69
1c79356b 70MACH_PRIVATE_DEFS = \
55e303ae 71 mach_notify.defs \
1c79356b
A
72 memory_object.defs \
73 memory_object_control.defs \
74 memory_object_default.defs \
91447636 75 memory_object_name.defs \
b0d623f7
A
76 upl.defs \
77 vm32_map.defs
1c79356b
A
78
79#
80# MIG-generated headers that are traditionally used by user
81# level code.
82#
83MIG_USHDRS = \
91447636 84 audit_triggers_server.h \
1c79356b
A
85 clock_reply_server.h \
86 exc_server.h \
2d21ac55 87 mach_exc_server.h \
1c79356b
A
88 memory_object_server.h \
89 memory_object_default_server.h \
2d21ac55
A
90 notify_server.h \
91 task_access_server.h
1c79356b
A
92
93MIG_UUHDRS = \
1c79356b
A
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 \
91447636 102 mach_vm.h \
1c79356b
A
103 memory_object_control.h \
104 memory_object_name.h \
105 processor.h \
106 processor_set.h \
2d21ac55 107 security.h \
1c79356b 108 task.h \
2d21ac55 109 task_access.h \
1c79356b
A
110 thread_act.h \
111 upl.h \
112 vm_map.h
113
114MIGINCLUDES = ${MIG_UUHDRS} ${MIG_USHDRS}
115
116DATAFILES = \
117 boolean.h \
1c79356b
A
118 clock_types.h \
119 error.h \
120 exception.h \
121 exception_types.h \
55e303ae 122 host_notify.h \
1c79356b
A
123 host_info.h \
124 host_reboot.h \
55e303ae 125 host_special_ports.h \
1c79356b
A
126 kern_return.h \
127 kmod.h \
1c79356b
A
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 \
1c79356b
A
138 ndr.h \
139 notify.h \
140 policy.h \
141 port.h \
142 processor_info.h \
143 rpc.h \
2d21ac55 144 sdt.h \
1c79356b
A
145 semaphore.h \
146 shared_memory_server.h \
2d21ac55 147 shared_region.h \
1c79356b
A
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 \
91447636 166 vm_purgable.h \
1c79356b
A
167 vm_region.h \
168 vm_statistics.h \
169 vm_sync.h \
170 vm_types.h \
171 ${MIG_TYPES} \
172 ${MIG_DEFS}
173
174INSTALL_MI_LIST = \
91447636 175 bootstrap.h \
1c79356b
A
176 ${DATAFILES}
177
91447636
A
178INSTALL_KF_MI_LIST = \
179 mach_interface.h \
180 $(filter-out mach_traps.h mach_syscalls.h thread_switch.h, ${DATAFILES})
181
182INSTALL_KF_MI_LCL_LIST = \
183 mach_interface.h \
184 $(filter-out mach_traps.h mach_syscalls.h thread_switch.h, ${DATAFILES})
185
1c79356b
A
186INSTALL_MI_GEN_LIST =
187
188INSTALL_MI_DIR = mach
189
190EXPORT_MI_LIST = \
191 mach_interface.h \
1c79356b
A
192 ${DATAFILES}
193
194EXPORT_MI_GEN_LIST = \
195 ${MIGINCLUDES}
196
197EXPORT_MI_DIR = mach
198
199.ORDER: ${MIGINCLUDES}
200
201${MIGINCLUDES} : ${MIG_TYPES}
202
203.ORDER: ${MIG_UUHDRS}
204
205${MIG_UUHDRS} : \
206 %.h : %.defs
2d21ac55
A
207 @echo MIG $@
208 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
209 -server /dev/null \
210 -user /dev/null \
211 -header $@ \
212 $<
213
214.ORDER: ${MIG_USHDRS}
215
216${MIG_USHDRS} : \
217 %_server.h : %.defs
2d21ac55
A
218 @echo MIG $@
219 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
220 -server /dev/null \
221 -user /dev/null \
222 -header /dev/null \
223 -sheader $@ \
224 $<
225
226#
227# Build path
228#
229COMP_SUBDIRS_I386 = \
230 i386
231
232INCFLAGS_MAKEFILE= -I..
233
234MIGKSFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_SERVER=1
235MIGKUFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_USER=1 -maxonstack 1024
236#
237# MIG-generated headers that are traditionally used by kernel
238# level code.
239#
240MIG_KUHDRS = \
91447636 241 audit_triggers.h \
1c79356b
A
242 clock_reply.h \
243 exc.h \
55e303ae 244 host_notify_reply.h \
2d21ac55 245 mach_exc.h \
55e303ae 246 mach_notify.h \
1c79356b 247 memory_object.h \
0b4e3aa0 248 memory_object_control.h \
1c79356b 249 memory_object_default.h \
2d21ac55 250 task_access.h \
1c79356b
A
251 upl.h \
252 vm_map.h
253
254MIG_KUSRC = \
e5568f75 255 audit_triggers_user.c \
1c79356b
A
256 clock_reply_user.c \
257 exc_user.c \
55e303ae 258 host_notify_reply_user.c \
2d21ac55 259 mach_exc_user.c \
55e303ae 260 mach_notify_user.c \
1c79356b 261 memory_object_user.c \
0b4e3aa0 262 memory_object_control_user.c \
1c79356b 263 memory_object_default_user.c \
2d21ac55 264 task_access_user.c \
1c79356b
A
265 upl_user.c \
266 vm_map_user.c
267
268MIG_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 \
2d21ac55 276 mach_exc_server.h \
1c79356b 277 mach_host_server.h \
55e303ae 278 mach_notify_server.h \
1c79356b 279 mach_port_server.h \
91447636 280 mach_vm_server.h \
1c79356b
A
281 memory_object_server.h \
282 memory_object_control_server.h \
283 memory_object_default_server.h \
284 memory_object_name_server.h \
1c79356b
A
285 processor_server.h \
286 processor_set_server.h \
2d21ac55 287 security_server.h \
1c79356b
A
288 task_server.h \
289 thread_act_server.h \
290 upl_server.h \
b0d623f7
A
291 vm_map_server.h \
292 vm32_map_server.h
1c79356b
A
293
294MIG_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 \
2d21ac55 302 mach_exc_server.c \
1c79356b 303 mach_host_server.c \
55e303ae 304 mach_notify_server.c \
1c79356b 305 mach_port_server.c \
91447636 306 mach_vm_server.c \
1c79356b
A
307 memory_object_server.c \
308 memory_object_control_server.c \
309 memory_object_default_server.c \
310 memory_object_name_server.c \
1c79356b
A
311 processor_server.c \
312 processor_set_server.c \
2d21ac55 313 security_server.c \
1c79356b
A
314 task_server.c \
315 thread_act_server.c \
316 upl_server.c \
b0d623f7
A
317 vm_map_server.c \
318 vm32_map_server.c
1c79356b
A
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#
336COMP_FILES = ${MIG_KUSRC} ${MIG_KSSRC}
337
338${COMP_FILES} : ${MIG_TYPES}
339
340.ORDER: ${MIG_KUSRC}
341
342${MIG_KUSRC} : \
343 %_user.c : %.defs
2d21ac55
A
344 @echo MIG $@
345 $(_v)${MIG} ${MIGFLAGS} ${MIGKUFLAGS} \
1c79356b
A
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
2d21ac55
A
356 @echo MIG $@
357 $(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \
1c79356b
A
358 -user /dev/null \
359 -header /dev/null \
360 -server $*_server.c \
361 -sheader $*_server.h \
362 $<
1c79356b
A
363
364include $(MakeInc_rule)
365include $(MakeInc_dir)