]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/Makefile
xnu-2422.1.72.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
6d2010ae 11INSTINC_SUBDIRS_X86_64 = i386
b0d623f7 12
6d2010ae 13EXPINC_SUBDIRS = machine
6d2010ae
A
14EXPINC_SUBDIRS_X86_64 = i386
15EXPINC_SUBDIRS_ARM = arm
2d21ac55 16
1c79356b
A
17MIG_TYPES = \
18 clock_types.defs \
19 mach_types.defs \
20 std_types.defs
21
22MIG_DEFS = \
e5568f75 23 audit_triggers.defs \
1c79356b
A
24 clock.defs \
25 clock_priv.defs \
26 clock_reply.defs \
27 exc.defs \
55e303ae 28 host_notify_reply.defs \
1c79356b
A
29 host_priv.defs \
30 host_security.defs \
1c79356b 31 lock_set.defs \
2d21ac55 32 mach_exc.defs \
1c79356b
A
33 mach_host.defs \
34 mach_port.defs \
91447636 35 mach_vm.defs \
1c79356b
A
36 notify.defs \
37 processor.defs \
38 processor_set.defs \
2d21ac55 39 security.defs \
1c79356b 40 task.defs \
2d21ac55 41 task_access.defs \
39236c6e 42 telemetry_notification.defs \
1c79356b 43 thread_act.defs \
91447636 44 vm_map.defs
1c79356b 45
2d21ac55 46
1c79356b 47MACH_PRIVATE_DEFS = \
55e303ae 48 mach_notify.defs \
1c79356b
A
49 memory_object.defs \
50 memory_object_control.defs \
51 memory_object_default.defs \
91447636 52 memory_object_name.defs \
b0d623f7
A
53 upl.defs \
54 vm32_map.defs
1c79356b
A
55
56#
57# MIG-generated headers that are traditionally used by user
58# level code.
59#
60MIG_USHDRS = \
91447636 61 audit_triggers_server.h \
1c79356b
A
62 clock_reply_server.h \
63 exc_server.h \
2d21ac55 64 mach_exc_server.h \
1c79356b
A
65 memory_object_server.h \
66 memory_object_default_server.h \
2d21ac55 67 notify_server.h \
39236c6e
A
68 task_access_server.h \
69 telemetry_notification_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
1c79356b
A
176${MIGINCLUDES} : ${MIG_TYPES}
177
1c79356b
A
178${MIG_UUHDRS} : \
179 %.h : %.defs
2d21ac55
A
180 @echo MIG $@
181 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
182 -server /dev/null \
183 -user /dev/null \
184 -header $@ \
185 $<
186
1c79356b
A
187${MIG_USHDRS} : \
188 %_server.h : %.defs
2d21ac55
A
189 @echo MIG $@
190 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
191 -server /dev/null \
192 -user /dev/null \
193 -header /dev/null \
194 -sheader $@ \
195 $<
196
197#
198# Build path
199#
1c79356b
A
200
201INCFLAGS_MAKEFILE= -I..
202
203MIGKSFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_SERVER=1
204MIGKUFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_USER=1 -maxonstack 1024
205#
206# MIG-generated headers that are traditionally used by kernel
207# level code.
208#
209MIG_KUHDRS = \
91447636 210 audit_triggers.h \
1c79356b
A
211 clock_reply.h \
212 exc.h \
55e303ae 213 host_notify_reply.h \
2d21ac55 214 mach_exc.h \
55e303ae 215 mach_notify.h \
1c79356b 216 memory_object.h \
0b4e3aa0 217 memory_object_control.h \
1c79356b 218 memory_object_default.h \
2d21ac55 219 task_access.h \
1c79356b
A
220 upl.h \
221 vm_map.h
222
223MIG_KUSRC = \
e5568f75 224 audit_triggers_user.c \
1c79356b
A
225 clock_reply_user.c \
226 exc_user.c \
55e303ae 227 host_notify_reply_user.c \
2d21ac55 228 mach_exc_user.c \
55e303ae 229 mach_notify_user.c \
1c79356b 230 memory_object_user.c \
0b4e3aa0 231 memory_object_control_user.c \
1c79356b 232 memory_object_default_user.c \
2d21ac55 233 task_access_user.c \
39236c6e 234 telemetry_notification_user.c \
1c79356b
A
235 upl_user.c \
236 vm_map_user.c
237
238MIG_KSHDRS = \
239 clock_server.h \
240 clock_priv_server.h \
241 exc_server.h \
242 host_priv_server.h \
243 host_security_server.h \
1c79356b 244 lock_set_server.h \
2d21ac55 245 mach_exc_server.h \
1c79356b 246 mach_host_server.h \
55e303ae 247 mach_notify_server.h \
1c79356b 248 mach_port_server.h \
91447636 249 mach_vm_server.h \
1c79356b
A
250 memory_object_server.h \
251 memory_object_control_server.h \
252 memory_object_default_server.h \
253 memory_object_name_server.h \
1c79356b
A
254 processor_server.h \
255 processor_set_server.h \
2d21ac55 256 security_server.h \
1c79356b
A
257 task_server.h \
258 thread_act_server.h \
259 upl_server.h \
b0d623f7
A
260 vm_map_server.h \
261 vm32_map_server.h
1c79356b
A
262
263MIG_KSSRC = \
264 clock_server.c \
265 clock_priv_server.c \
266 exc_server.c \
267 host_priv_server.c \
268 host_security_server.c \
1c79356b 269 lock_set_server.c \
2d21ac55 270 mach_exc_server.c \
1c79356b 271 mach_host_server.c \
55e303ae 272 mach_notify_server.c \
1c79356b 273 mach_port_server.c \
91447636 274 mach_vm_server.c \
1c79356b
A
275 memory_object_server.c \
276 memory_object_control_server.c \
277 memory_object_default_server.c \
278 memory_object_name_server.c \
1c79356b
A
279 processor_server.c \
280 processor_set_server.c \
2d21ac55 281 security_server.c \
1c79356b
A
282 task_server.c \
283 thread_act_server.c \
284 upl_server.c \
b0d623f7
A
285 vm_map_server.c \
286 vm32_map_server.c
1c79356b
A
287
288#
289# JMM -
290# Since there are two generated header files with the same name, one for
291# install and export, the other for internal use (and they are different)
292# we can't explicitly list two rules for the same target. So rules for
293# generating internal headers will be handled implicitly by creating rules
294# to generate the internal C sources, and the headers get created as a
295# side-effect.
296#
297#
298# This is all temporary scaffolding, as we are moving to a model where
299# the MIG-generated code is identical in all environments. At first, it
300# will contain some environment-specific ifdefs, but over time should not
301# even require that as we move towards making all the environments look
302# the same.
303#
304COMP_FILES = ${MIG_KUSRC} ${MIG_KSSRC}
305
39236c6e
A
306do_build_all:: $(COMP_FILES)
307
1c79356b 308${COMP_FILES} : ${MIG_TYPES}
1c79356b
A
309
310${MIG_KUSRC} : \
311 %_user.c : %.defs
2d21ac55
A
312 @echo MIG $@
313 $(_v)${MIG} ${MIGFLAGS} ${MIGKUFLAGS} \
1c79356b
A
314 -user $*_user.c \
315 -header $*.h \
316 -server /dev/null \
317 -sheader /dev/null \
318 $<
319
1c79356b
A
320${MIG_KSSRC}: \
321 %_server.c : %.defs
2d21ac55
A
322 @echo MIG $@
323 $(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \
1c79356b
A
324 -user /dev/null \
325 -header /dev/null \
326 -server $*_server.c \
327 -sheader $*_server.h \
328 $<
1c79356b
A
329
330include $(MakeInc_rule)
331include $(MakeInc_dir)