summaryrefslogtreecommitdiff
path: root/Makefrag.am
blob: 155635bb1baffa622fb058b7e9b78dc823500909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# Main Makefile fragment for GNU Mach.

# Copyright (C) 1997, 1999, 2004, 2006, 2007, 2009 Free Software
# Foundation, Inc.

# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
#
# THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
# "AS IS" CONDITION.  THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
# LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
# USE OF THIS SOFTWARE.

#
# DDB support --- eventually to die.  Please.
#

# Do we want the icky kernel debugger?
if enable_kdb
libkernel_a_SOURCES += \
	ddb/db_access.c \
	ddb/db_access.h \
	ddb/db_aout.c \
	ddb/db_aout.h \
	ddb/db_break.c \
	ddb/db_break.h \
	ddb/db_command.c \
	ddb/db_command.h \
	ddb/db_cond.c \
	ddb/db_cond.h \
	ddb/db_examine.c \
	ddb/db_examine.h \
	ddb/db_expr.c \
	ddb/db_expr.h \
	ddb/db_ext_symtab.c \
	ddb/db_input.c \
	ddb/db_input.h \
	ddb/db_lex.c \
	ddb/db_lex.h \
	ddb/db_macro.c \
	ddb/db_macro.h \
	ddb/db_mp.c \
	ddb/db_mp.h \
	ddb/db_output.c \
	ddb/db_output.h \
	ddb/db_print.c \
	ddb/db_print.h \
	ddb/db_run.c \
	ddb/db_run.h \
	ddb/db_sym.c \
	ddb/db_sym.h \
	ddb/db_task_thread.c \
	ddb/db_task_thread.h \
	ddb/db_trap.c \
	ddb/db_trap.h \
	ddb/db_variables.c \
	ddb/db_variables.h \
	ddb/db_watch.c \
	ddb/db_watch.h \
	ddb/db_write_cmd.c \
	ddb/db_write_cmd.h \
	ddb/nlist.h \
	ddb/stab.h \
	ddb/tr.h

# We need frame pointers for trace to work properly.
AM_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
endif


#
# IPC implementation.
#

libkernel_a_SOURCES += \
	ipc/ipc_entry.c \
	ipc/ipc_entry.h \
	ipc/ipc_hash.c \
	ipc/ipc_hash.h \
	ipc/ipc_init.c \
	ipc/ipc_init.h \
	ipc/ipc_kmsg.c \
	ipc/ipc_kmsg.h \
	ipc/ipc_kmsg_queue.h \
	ipc/ipc_machdep.h \
	ipc/ipc_marequest.c \
	ipc/ipc_marequest.h \
	ipc/ipc_mqueue.c \
	ipc/ipc_mqueue.h \
	ipc/ipc_notify.c \
	ipc/ipc_notify.h \
	ipc/ipc_object.c \
	ipc/ipc_object.h \
	ipc/ipc_port.c \
	ipc/ipc_port.h \
	ipc/ipc_print.h \
	ipc/ipc_pset.c \
	ipc/ipc_pset.h \
	ipc/ipc_right.c \
	ipc/ipc_right.h \
	ipc/ipc_space.c \
	ipc/ipc_space.h \
	ipc/ipc_splay.c \
	ipc/ipc_splay.h \
	ipc/ipc_table.c \
	ipc/ipc_table.h \
	ipc/ipc_target.c \
	ipc/ipc_target.h \
	ipc/ipc_thread.c \
	ipc/ipc_thread.h \
	ipc/ipc_types.h \
	ipc/mach_msg.c \
	ipc/mach_msg.h \
	ipc/mach_port.c \
	ipc/mach_port.h \
	ipc/mach_rpc.c \
	ipc/mach_debug.c \
	ipc/port.h
EXTRA_DIST += \
	ipc/mach_port.srv


#
# `kernel' implementation (tasks, threads, trivia, etc.).
#

libkernel_a_SOURCES += \
	kern/act.c \
	kern/act.h \
	kern/assert.h \
	kern/ast.c \
	kern/ast.h \
	kern/boot_script.h \
	kern/bootstrap.c \
	kern/bootstrap.h \
	kern/counters.c \
	kern/counters.h \
	kern/cpu_number.h \
	kern/debug.c \
	kern/debug.h \
	kern/eventcount.c \
	kern/eventcount.h \
	kern/exception.c \
	kern/exception.h \
	kern/host.c \
	kern/host.h \
	kern/ipc_host.c \
	kern/ipc_host.h \
	kern/ipc_kobject.c \
	kern/ipc_kobject.h \
	kern/ipc_mig.c \
	kern/ipc_mig.h \
	kern/ipc_sched.c \
	kern/ipc_sched.h \
	kern/ipc_tt.c \
	kern/ipc_tt.h \
	kern/kalloc.h \
	kern/kern_types.h \
	kern/list.h \
	kern/lock.c \
	kern/lock.h \
	kern/lock_mon.c \
	kern/mach_clock.c \
	kern/mach_clock.h \
	kern/mach_factor.c \
	kern/mach_factor.h \
	kern/machine.c \
	kern/machine.h \
	kern/macro_help.h \
	kern/pc_sample.c \
	kern/pc_sample.h \
	kern/printf.c \
	kern/printf.h \
	kern/priority.c \
	kern/priority.h \
	kern/processor.c \
	kern/processor.h \
	kern/profile.c \
	kern/queue.c \
	kern/queue.h \
	kern/rbtree.c \
	kern/rbtree.h \
	kern/rbtree_i.h \
	kern/refcount.h \
	kern/slab.c \
	kern/slab.h \
	kern/sched.h \
	kern/sched_prim.c \
	kern/sched_prim.h \
	kern/shuttle.h \
	kern/startup.c \
	kern/startup.h \
	kern/strings.c \
	kern/syscall_emulation.c \
	kern/syscall_emulation.h \
	kern/syscall_subr.c \
	kern/syscall_subr.h \
	kern/syscall_sw.c \
	kern/syscall_sw.h \
	kern/task.c \
	kern/task.h \
	kern/thread.c \
	kern/thread.h \
	kern/thread_swap.c \
	kern/thread_swap.h \
	kern/time_stamp.c \
	kern/time_stamp.h \
	kern/timer.c \
	kern/timer.h \
	kern/xpr.c \
	kern/xpr.h \
	kern/elf-load.c \
	kern/boot_script.c
EXTRA_DIST += \
	kern/mach.srv \
	kern/mach4.srv \
	kern/gnumach.srv \
	kern/mach_debug.srv \
	kern/mach_host.srv


#
# Still more trivia.
#

libkernel_a_SOURCES += \
	util/putchar.c \
	util/putchar.h \
	util/puts.c \
	util/atoi.c \
	util/atoi.h

#
# Virtual memory implementation.
#

libkernel_a_SOURCES += \
	vm/memory_object_proxy.c \
	vm/memory_object_proxy.h \
	vm/memory_object.c \
	vm/memory_object.h \
	vm/pmap.h \
	vm/vm_debug.c \
	vm/vm_external.c \
	vm/vm_external.h \
	vm/vm_fault.c \
	vm/vm_fault.h \
	vm/vm_init.c \
	vm/vm_init.h \
	vm/vm_kern.c \
	vm/vm_kern.h \
	vm/vm_map.c \
	vm/vm_map.h \
	vm/vm_object.c \
	vm/vm_object.h \
	vm/vm_page.h \
	vm/vm_pageout.c \
	vm/vm_pageout.h \
	vm/vm_print.h \
	vm/vm_resident.c \
	vm/vm_resident.h \
	vm/vm_types.h \
	vm/vm_user.c \
	vm/vm_user.h
EXTRA_DIST += \
	vm/memory_object_default.cli \
	vm/memory_object_user.cli


#
# Device driver support.
#

# These device support files are always needed; the others are needed only if
# particular drivers want the routines.
# TODO.  Functions in device/subrs.c should each be moved elsewhere.
libkernel_a_SOURCES += \
	device/blkio.c \
	device/buf.h \
	device/chario.c \
	device/chario.h \
	device/cirbuf.h \
	device/conf.h \
	device/cons.c \
	device/cons.h \
	device/device_emul.h \
	device/dev_hdr.h \
	device/dev_lookup.c \
	device/dev_master.h \
	device/dev_name.c \
	device/dev_pager.c \
	device/dev_pager.h \
	device/device_init.c \
	device/device_init.h \
	device/device_port.h \
	device/device_types_kernel.h \
	device/ds_routines.c \
	device/ds_routines.h \
	device/if_ether.h \
	device/if_hdr.h \
	device/io_req.h \
	device/net_io.c \
	device/net_io.h \
	device/param.h \
	device/subrs.c \
	device/subrs.h \
	device/tty.h
EXTRA_DIST += \
	device/device.srv \
	device/device_pager.srv \
	device/device_reply.cli \
	device/memory_object_reply.cli


#
# `kmsg' device.
#

if enable_kmsg
libkernel_a_SOURCES += \
	device/kmsg.c \
	device/kmsg.h
endif


#
# Version number.
#

nodist_libkernel_a_SOURCES += \
	version.c

#
# Installation.
#

include_devicedir = $(includedir)/device
include_device_HEADERS = \
	include/device/audio_status.h \
	include/device/bpf.h \
	include/device/device.defs \
	include/device/device_reply.defs \
	include/device/device_request.defs \
	include/device/device_types.defs \
	include/device/device_types.h \
	include/device/disk_status.h \
	include/device/net_status.h \
	include/device/tape_status.h \
	include/device/tty_status.h

include_machdir = $(includedir)/mach
include_mach_HEADERS = \
	include/mach/bootstrap.defs \
	include/mach/default_pager.defs \
	include/mach/default_pager_helper.defs \
	include/mach/default_pager_types.defs \
	include/mach/exc.defs \
	include/mach/mach.defs \
	include/mach/mach4.defs \
	include/mach/gnumach.defs \
	include/mach/mach_host.defs \
	include/mach/mach_port.defs \
	include/mach/mach_types.defs \
	include/mach/memory_object.defs \
	include/mach/memory_object_default.defs \
	include/mach/notify.defs \
	include/mach/std_types.defs \
	include/mach/alert.h \
	include/mach/boolean.h \
	include/mach/boot.h \
	include/mach/default_pager_types.h \
	include/mach/exception.h \
	include/mach/host_info.h \
	include/mach/kern_return.h \
	include/mach/mach_param.h \
	include/mach/mach_types.h \
	include/mach/machine.h \
	include/mach/macro_help.h \
	include/mach/memory_object.h \
	include/mach/message.h \
	include/mach/mig_errors.h \
	include/mach/msg_type.h \
	include/mach/multiboot.h \
	include/mach/notify.h \
	include/mach/pc_sample.h \
	include/mach/policy.h \
	include/mach/port.h \
	include/mach/processor_info.h \
	include/mach/profil.h \
	include/mach/profilparam.h \
	include/mach/rpc.h \
	include/mach/std_types.h \
	include/mach/syscall_sw.h \
	include/mach/task_info.h \
	include/mach/task_special_ports.h \
	include/mach/thread_info.h \
	include/mach/thread_special_ports.h \
	include/mach/thread_status.h \
	include/mach/thread_switch.h \
	include/mach/time_value.h \
	include/mach/version.h \
	include/mach/vm_attributes.h \
	include/mach/vm_cache_statistics.h \
	include/mach/vm_inherit.h \
	include/mach/vm_param.h \
	include/mach/vm_prot.h \
	include/mach/vm_statistics.h \
	include/mach/inline.h \
	include/mach/xen.h

# If we name this `*_execdir', Automake won't add it to `install-data'...
include_mach_eXecdir = $(includedir)/mach/exec
include_mach_eXec_HEADERS = \
	include/mach/exec/a.out.h \
	include/mach/exec/elf.h \
	include/mach/exec/exec.h

# mach-debug-headers:= $(addprefix mach_debug/, hash_info.h ipc_info.h \
# 		mach_debug.defs mach_debug_types.defs mach_debug_types.h \
# 		pc_info.h vm_info.h slab_info.h)

# Other headers for the distribution.  We don't install these, because the
# GNU C library has correct versions for users to use.
# other-sys-headers := types.h time.h reboot.h ioctl.h
# other-mach-headers := mig_support.h mach_traps.h error.h
# other-headers := alloca.h

install-data-hook:
	rm -f '$(DESTDIR)$(include_machdir)'/machine
	ln -s '$(systype)' '$(DESTDIR)$(include_machdir)'/machine

#
# Building a distribution.
#

# Enable all available features.
DISTCHECK_CONFIGURE_FLAGS += \
	--enable-kdb

# Instead of listing each file individually...
EXTRA_DIST += \
	include

#
# Automatically generated source files.
#
# See Makerules.mig.am.
#

# User stubs.
nodist_lib_dep_tr_for_defs_a_SOURCES += \
	vm/memory_object_user.user.defs.c \
	vm/memory_object_default.user.defs.c
nodist_libkernel_a_SOURCES += \
	vm/memory_object_user.user.h \
	vm/memory_object_user.user.c \
	vm/memory_object_user.user.msgids \
	vm/memory_object_default.user.h \
	vm/memory_object_default.user.c \
	vm/memory_object_default.user.msgids
#	vm/memory_object_user.user.defs
#	vm/memory_object_default.user.defs
nodist_lib_dep_tr_for_defs_a_SOURCES += \
	device/device_reply.user.defs.c \
	device/memory_object_reply.user.defs.c
nodist_libkernel_a_SOURCES += \
	device/device_reply.user.h \
	device/device_reply.user.c \
	device/device_reply.user.msgids \
	device/memory_object_reply.user.h \
	device/memory_object_reply.user.c \
	device/memory_object_reply.user.msgids
#	device/device_reply.user.defs
#	device/memory_object_reply.user.defs

# Server stubs.
nodist_lib_dep_tr_for_defs_a_SOURCES += \
	device/device.server.defs.c \
	device/device_pager.server.defs.c
nodist_libkernel_a_SOURCES += \
	device/device.server.h \
	device/device.server.c \
	device/device.server.msgids \
	device/device_pager.server.h \
	device/device_pager.server.c \
	device/device_pager.server.msgids
#	device/device.server.defs
#	device/device_pager.server.defs
nodist_lib_dep_tr_for_defs_a_SOURCES += \
	ipc/mach_port.server.defs.c
nodist_libkernel_a_SOURCES += \
	ipc/mach_port.server.h \
	ipc/mach_port.server.c \
	ipc/mach_port.server.msgids
#	ipc/mach_port.server.defs
nodist_lib_dep_tr_for_defs_a_SOURCES += \
	kern/mach.server.defs.c \
	kern/mach4.server.defs.c \
	kern/gnumach.server.defs.c \
	kern/mach_debug.server.defs.c \
	kern/mach_host.server.defs.c
nodist_libkernel_a_SOURCES += \
	kern/mach.server.h \
	kern/mach.server.c \
	kern/mach.server.msgids \
	kern/mach4.server.h \
	kern/mach4.server.c \
	kern/mach4.server.msgids \
	kern/gnumach.server.h \
	kern/gnumach.server.c \
	kern/gnumach.server.msgids \
	kern/mach_debug.server.h \
	kern/mach_debug.server.c \
	kern/mach_debug.server.msgids \
	kern/mach_host.server.h \
	kern/mach_host.server.c \
	kern/mach_host.server.msgids
#	kern/mach.server.defs
#	kern/mach4.server.defs
#	kern/gnumach.server.defs
#	kern/mach_debug.server.defs
#	kern/mach_host.server.defs

# rpctrace can make use of that.
MOSTLYCLEANFILES += \
	gnumach.msgids
gnumach.msgids: $(filter %.msgids,$(nodist_libkernel_a_SOURCES))
	$(AM_V_at) cat $^ > $@.new
	$(AM_V_GEN) mv $@.new $@
# `exec_' prefix, so that we don't try to build that file during when running
# `make install-data', as it may fail there, but isn't needed there either.
exec_msgidsdir = $(datadir)/msgids
exec_msgids_DATA = gnumach.msgids

#
# Specific code.
#

# Linux device drivers and the glue code.
include linux/Makefrag.am

#
# Platform specific parts.
#

# Xen.
if PLATFORM_xen
include xen/Makefrag.am
endif

#
# Architecture specific parts.
#

# ix86.
if HOST_ix86
include i386/Makefrag.am
endif