]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/Makefile
xnu-124.13.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 = \
34 bootstrap.defs \
35 clock.defs \
36 clock_priv.defs \
37 clock_reply.defs \
38 exc.defs \
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 = \
54 memory_object.defs \
55 memory_object_control.defs \
56 memory_object_default.defs \
57 memory_object_name.defs
58
59#
60# MIG-generated headers that are traditionally used by user
61# level code.
62#
63MIG_USHDRS = \
64 clock_reply_server.h \
65 exc_server.h \
66 memory_object_server.h \
67 memory_object_default_server.h \
68 notify_server.h
69
70MIG_UUHDRS = \
71 bootstrap.h \
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 \
94 clock_types.h \
95 error.h \
96 exception.h \
97 exception_types.h \
98 host_info.h \
99 host_reboot.h \
100 kern_return.h \
101 kmod.h \
102 mach_ioctl.h \
103 mach_param.h \
104 mach_time.h \
105 mach_traps.h \
106 mach_types.h \
107 machine.h \
108 mach_syscalls.h \
109 memory_object_types.h \
110 message.h \
111 mig.h \
112 mig_errors.h \
113 mig_log.h \
114 ndr.h \
115 notify.h \
116 policy.h \
117 port.h \
118 processor_info.h \
119 rpc.h \
120 semaphore.h \
121 shared_memory_server.h \
122 std_types.h \
123 sync_policy.h \
124 syscall_sw.h \
125 task_info.h \
126 task_ledger.h \
127 task_policy.h \
128 task_special_ports.h \
129 thread_info.h \
130 thread_policy.h \
131 thread_special_ports.h \
132 thread_status.h \
133 thread_switch.h \
134 time_value.h \
135 vm_attributes.h \
136 vm_behavior.h \
137 vm_inherit.h \
138 vm_param.h \
139 vm_prot.h \
140 vm_region.h \
141 vm_statistics.h \
142 vm_sync.h \
143 vm_types.h \
144 ${MIG_TYPES} \
145 ${MIG_DEFS}
146
147INSTALL_MI_LIST = \
148 ${DATAFILES}
149
150INSTALL_MI_GEN_LIST =
151
152INSTALL_MI_DIR = mach
153
154EXPORT_MI_LIST = \
155 mach_interface.h \
156 etap.h etap_events.h \
157 ${DATAFILES}
158
159EXPORT_MI_GEN_LIST = \
160 ${MIGINCLUDES}
161
162EXPORT_MI_DIR = mach
163
164.ORDER: ${MIGINCLUDES}
165
166${MIGINCLUDES} : ${MIG_TYPES}
167
168.ORDER: ${MIG_UUHDRS}
169
170${MIG_UUHDRS} : \
171 %.h : %.defs
172 $(MIG) $(MIGFLAGS) \
173 -server /dev/null \
174 -user /dev/null \
175 -header $@ \
176 $<
177
178.ORDER: ${MIG_USHDRS}
179
180${MIG_USHDRS} : \
181 %_server.h : %.defs
182 $(MIG) $(MIGFLAGS) \
183 -server /dev/null \
184 -user /dev/null \
185 -header /dev/null \
186 -sheader $@ \
187 $<
188
189#
190# Build path
191#
192COMP_SUBDIRS_I386 = \
193 i386
194
195INCFLAGS_MAKEFILE= -I..
196
197MIGKSFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_SERVER=1
198MIGKUFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_USER=1 -maxonstack 1024
199#
200# MIG-generated headers that are traditionally used by kernel
201# level code.
202#
203MIG_KUHDRS = \
204 clock_reply.h \
205 exc.h \
206 memory_object.h \
207 memory_object_default.h \
208 upl.h \
209 vm_map.h
210
211MIG_KUSRC = \
212 clock_reply_user.c \
213 exc_user.c \
214 memory_object_user.c \
215 memory_object_default_user.c \
216 upl_user.c \
217 vm_map_user.c
218
219MIG_KSHDRS = \
220 clock_server.h \
221 clock_priv_server.h \
222 exc_server.h \
223 host_priv_server.h \
224 host_security_server.h \
225 ledger_server.h \
226 lock_set_server.h \
227 mach_host_server.h \
228 mach_port_server.h \
229 memory_object_server.h \
230 memory_object_control_server.h \
231 memory_object_default_server.h \
232 memory_object_name_server.h \
233 notify_server.h \
234 processor_server.h \
235 processor_set_server.h \
236 semaphore_server.h \
237 task_server.h \
238 thread_act_server.h \
239 upl_server.h \
240 vm_map_server.h
241
242MIG_KSSRC = \
243 clock_server.c \
244 clock_priv_server.c \
245 exc_server.c \
246 host_priv_server.c \
247 host_security_server.c \
248 ledger_server.c \
249 lock_set_server.c \
250 mach_host_server.c \
251 mach_port_server.c \
252 memory_object_server.c \
253 memory_object_control_server.c \
254 memory_object_default_server.c \
255 memory_object_name_server.c \
256 notify_server.c \
257 processor_server.c \
258 processor_set_server.c \
259 semaphore_server.c \
260 task_server.c \
261 thread_act_server.c \
262 upl_server.c \
263 vm_map_server.c
264
265#
266# JMM -
267# Since there are two generated header files with the same name, one for
268# install and export, the other for internal use (and they are different)
269# we can't explicitly list two rules for the same target. So rules for
270# generating internal headers will be handled implicitly by creating rules
271# to generate the internal C sources, and the headers get created as a
272# side-effect.
273#
274#
275# This is all temporary scaffolding, as we are moving to a model where
276# the MIG-generated code is identical in all environments. At first, it
277# will contain some environment-specific ifdefs, but over time should not
278# even require that as we move towards making all the environments look
279# the same.
280#
281COMP_FILES = ${MIG_KUSRC} ${MIG_KSSRC}
282
283${COMP_FILES} : ${MIG_TYPES}
284
285.ORDER: ${MIG_KUSRC}
286
287${MIG_KUSRC} : \
288 %_user.c : %.defs
289 ${MIG} ${MIGFLAGS} ${MIGKUFLAGS} \
290 -user $*_user.c \
291 -header $*.h \
292 -server /dev/null \
293 -sheader /dev/null \
294 $<
295
296.ORDER: ${MIG_KSSRC}
297
298${MIG_KSSRC}: \
299 %_server.c : %.defs
300 ${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \
301 -user /dev/null \
302 -header /dev/null \
303 -server $*_server.c \
304 -sheader $*_server.h \
305 $<
306
307
308include $(MakeInc_rule)
309include $(MakeInc_dir)