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