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