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