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