Makefrag.am 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. # Main Makefile fragment for GNU Mach.
  2. # Copyright (C) 1997, 1999, 2004, 2006, 2007, 2009 Free Software
  3. # Foundation, Inc.
  4. # Permission to use, copy, modify and distribute this software and its
  5. # documentation is hereby granted, provided that both the copyright
  6. # notice and this permission notice appear in all copies of the
  7. # software, derivative works or modified versions, and any portions
  8. # thereof, and that both notices appear in supporting documentation.
  9. #
  10. # THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
  11. # "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
  12. # LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
  13. # USE OF THIS SOFTWARE.
  14. #
  15. # DDB support --- eventually to die. Please.
  16. #
  17. # Do we want the icky kernel debugger?
  18. if enable_kdb
  19. libkernel_a_SOURCES += \
  20. ddb/db_access.c \
  21. ddb/db_access.h \
  22. ddb/db_aout.c \
  23. ddb/db_aout.h \
  24. ddb/db_elf.c \
  25. ddb/db_elf.h \
  26. ddb/db_break.c \
  27. ddb/db_break.h \
  28. ddb/db_command.c \
  29. ddb/db_command.h \
  30. ddb/db_cond.c \
  31. ddb/db_cond.h \
  32. ddb/db_examine.c \
  33. ddb/db_examine.h \
  34. ddb/db_expr.c \
  35. ddb/db_expr.h \
  36. ddb/db_ext_symtab.c \
  37. ddb/db_input.c \
  38. ddb/db_input.h \
  39. ddb/db_lex.c \
  40. ddb/db_lex.h \
  41. ddb/db_macro.c \
  42. ddb/db_macro.h \
  43. ddb/db_mp.c \
  44. ddb/db_mp.h \
  45. ddb/db_output.c \
  46. ddb/db_output.h \
  47. ddb/db_print.c \
  48. ddb/db_print.h \
  49. ddb/db_run.c \
  50. ddb/db_run.h \
  51. ddb/db_sym.c \
  52. ddb/db_sym.h \
  53. ddb/db_task_thread.c \
  54. ddb/db_task_thread.h \
  55. ddb/db_trap.c \
  56. ddb/db_trap.h \
  57. ddb/db_variables.c \
  58. ddb/db_variables.h \
  59. ddb/db_watch.c \
  60. ddb/db_watch.h \
  61. ddb/db_write_cmd.c \
  62. ddb/db_write_cmd.h \
  63. ddb/nlist.h \
  64. ddb/stab.h \
  65. ddb/tr.h
  66. # We need frame pointers for trace to work properly.
  67. AM_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
  68. endif
  69. #
  70. # IPC implementation.
  71. #
  72. libkernel_a_SOURCES += \
  73. ipc/ipc_entry.c \
  74. ipc/ipc_entry.h \
  75. ipc/ipc_init.c \
  76. ipc/ipc_init.h \
  77. ipc/ipc_kmsg.c \
  78. ipc/ipc_kmsg.h \
  79. ipc/ipc_kmsg_queue.h \
  80. ipc/ipc_machdep.h \
  81. ipc/ipc_marequest.c \
  82. ipc/ipc_marequest.h \
  83. ipc/ipc_mqueue.c \
  84. ipc/ipc_mqueue.h \
  85. ipc/ipc_notify.c \
  86. ipc/ipc_notify.h \
  87. ipc/ipc_object.c \
  88. ipc/ipc_object.h \
  89. ipc/ipc_port.c \
  90. ipc/ipc_port.h \
  91. ipc/ipc_print.h \
  92. ipc/ipc_pset.c \
  93. ipc/ipc_pset.h \
  94. ipc/ipc_right.c \
  95. ipc/ipc_right.h \
  96. ipc/ipc_space.c \
  97. ipc/ipc_space.h \
  98. ipc/ipc_table.c \
  99. ipc/ipc_table.h \
  100. ipc/ipc_target.c \
  101. ipc/ipc_target.h \
  102. ipc/ipc_thread.c \
  103. ipc/ipc_thread.h \
  104. ipc/ipc_types.h \
  105. ipc/mach_msg.c \
  106. ipc/mach_msg.h \
  107. ipc/mach_port.c \
  108. ipc/mach_port.h \
  109. ipc/mach_rpc.c \
  110. ipc/mach_debug.c \
  111. ipc/port.h
  112. EXTRA_DIST += \
  113. ipc/mach_port.srv \
  114. ipc/notify.defs
  115. #
  116. # `kernel' implementation (tasks, threads, trivia, etc.).
  117. #
  118. libkernel_a_SOURCES += \
  119. kern/act.c \
  120. kern/act.h \
  121. kern/assert.h \
  122. kern/ast.c \
  123. kern/ast.h \
  124. kern/atomic.h \
  125. kern/boot_script.h \
  126. kern/bootstrap.c \
  127. kern/bootstrap.h \
  128. kern/counters.c \
  129. kern/counters.h \
  130. kern/cpu_number.h \
  131. kern/debug.c \
  132. kern/debug.h \
  133. kern/eventcount.c \
  134. kern/eventcount.h \
  135. kern/exception.c \
  136. kern/exception.h \
  137. kern/gsync.c \
  138. kern/gsync.h \
  139. kern/host.c \
  140. kern/host.h \
  141. kern/ipc_host.c \
  142. kern/ipc_host.h \
  143. kern/ipc_kobject.c \
  144. kern/ipc_kobject.h \
  145. kern/ipc_mig.c \
  146. kern/ipc_mig.h \
  147. kern/ipc_sched.c \
  148. kern/ipc_sched.h \
  149. kern/ipc_tt.c \
  150. kern/ipc_tt.h \
  151. kern/kalloc.h \
  152. kern/kern_types.h \
  153. kern/kmutex.c \
  154. kern/kmutex.h \
  155. kern/list.h \
  156. kern/lock.c \
  157. kern/lock.h \
  158. kern/lock_mon.c \
  159. kern/log2.h \
  160. kern/mach_clock.c \
  161. kern/mach_clock.h \
  162. kern/mach_factor.c \
  163. kern/mach_factor.h \
  164. kern/machine.c \
  165. kern/machine.h \
  166. kern/macros.h \
  167. kern/pc_sample.c \
  168. kern/pc_sample.h \
  169. kern/printf.c \
  170. kern/printf.h \
  171. kern/priority.c \
  172. kern/priority.h \
  173. kern/processor.c \
  174. kern/processor.h \
  175. kern/profile.c \
  176. kern/queue.c \
  177. kern/queue.h \
  178. kern/rbtree.c \
  179. kern/rbtree.h \
  180. kern/rbtree_i.h \
  181. kern/rdxtree.c \
  182. kern/rdxtree.h \
  183. kern/rdxtree_i.h \
  184. kern/refcount.h \
  185. kern/slab.c \
  186. kern/slab.h \
  187. kern/sched.h \
  188. kern/sched_prim.c \
  189. kern/sched_prim.h \
  190. kern/shuttle.h \
  191. kern/startup.c \
  192. kern/startup.h \
  193. kern/strings.c \
  194. kern/syscall_emulation.c \
  195. kern/syscall_emulation.h \
  196. kern/syscall_subr.c \
  197. kern/syscall_subr.h \
  198. kern/syscall_sw.c \
  199. kern/syscall_sw.h \
  200. kern/task.c \
  201. kern/task.h \
  202. kern/thread.c \
  203. kern/thread.h \
  204. kern/thread_swap.c \
  205. kern/thread_swap.h \
  206. kern/time_stamp.c \
  207. kern/time_stamp.h \
  208. kern/timer.c \
  209. kern/timer.h \
  210. kern/xpr.c \
  211. kern/xpr.h \
  212. kern/elf-load.c \
  213. kern/boot_script.c
  214. EXTRA_DIST += \
  215. kern/exc.defs \
  216. kern/mach.srv \
  217. kern/mach4.srv \
  218. kern/gnumach.srv \
  219. kern/mach_debug.srv \
  220. kern/mach_host.srv \
  221. kern/task_notify.cli
  222. #
  223. # Still more trivia.
  224. #
  225. libkernel_a_SOURCES += \
  226. util/putchar.c \
  227. util/putchar.h \
  228. util/puts.c \
  229. util/atoi.c \
  230. util/atoi.h
  231. #
  232. # Virtual memory implementation.
  233. #
  234. libkernel_a_SOURCES += \
  235. vm/memory_object_proxy.c \
  236. vm/memory_object_proxy.h \
  237. vm/memory_object.c \
  238. vm/memory_object.h \
  239. vm/pmap.h \
  240. vm/vm_debug.c \
  241. vm/vm_external.c \
  242. vm/vm_external.h \
  243. vm/vm_fault.c \
  244. vm/vm_fault.h \
  245. vm/vm_init.c \
  246. vm/vm_init.h \
  247. vm/vm_kern.c \
  248. vm/vm_kern.h \
  249. vm/vm_map.c \
  250. vm/vm_map.h \
  251. vm/vm_object.c \
  252. vm/vm_object.h \
  253. vm/vm_page.c \
  254. vm/vm_page.h \
  255. vm/vm_pageout.c \
  256. vm/vm_pageout.h \
  257. vm/vm_print.h \
  258. vm/vm_resident.c \
  259. vm/vm_resident.h \
  260. vm/vm_types.h \
  261. vm/vm_user.c \
  262. vm/vm_user.h
  263. EXTRA_DIST += \
  264. vm/memory_object_default.cli \
  265. vm/memory_object_user.cli
  266. #
  267. # Device driver support.
  268. #
  269. # These device support files are always needed; the others are needed only if
  270. # particular drivers want the routines.
  271. # TODO. Functions in device/subrs.c should each be moved elsewhere.
  272. libkernel_a_SOURCES += \
  273. device/blkio.c \
  274. device/blkio.h \
  275. device/buf.h \
  276. device/chario.c \
  277. device/chario.h \
  278. device/cirbuf.h \
  279. device/conf.h \
  280. device/cons.c \
  281. device/cons.h \
  282. device/device_emul.h \
  283. device/dev_hdr.h \
  284. device/dev_lookup.c \
  285. device/dev_master.h \
  286. device/dev_name.c \
  287. device/dev_pager.c \
  288. device/dev_pager.h \
  289. device/device_init.c \
  290. device/device_init.h \
  291. device/device_port.h \
  292. device/device_types_kernel.h \
  293. device/ds_routines.c \
  294. device/ds_routines.h \
  295. device/if_ether.h \
  296. device/if_hdr.h \
  297. device/io_req.h \
  298. device/net_io.c \
  299. device/net_io.h \
  300. device/param.h \
  301. device/subrs.c \
  302. device/subrs.h \
  303. device/tty.h
  304. EXTRA_DIST += \
  305. device/device.srv \
  306. device/device_pager.srv \
  307. device/device_reply.cli \
  308. device/memory_object_reply.cli
  309. #
  310. # `kmsg' device.
  311. #
  312. if enable_kmsg
  313. libkernel_a_SOURCES += \
  314. device/kmsg.c \
  315. device/kmsg.h
  316. endif
  317. #
  318. # Version number.
  319. #
  320. nodist_libkernel_a_SOURCES += \
  321. version.c
  322. #
  323. # Installation.
  324. #
  325. include_devicedir = $(includedir)/device
  326. include_device_HEADERS = \
  327. include/device/audio_status.h \
  328. include/device/bpf.h \
  329. include/device/device.defs \
  330. include/device/device_reply.defs \
  331. include/device/device_request.defs \
  332. include/device/device_types.defs \
  333. include/device/device_types.h \
  334. include/device/disk_status.h \
  335. include/device/net_status.h \
  336. include/device/tape_status.h \
  337. include/device/tty_status.h
  338. include_machdir = $(includedir)/mach
  339. include_mach_HEADERS = \
  340. include/mach/bootstrap.defs \
  341. include/mach/default_pager.defs \
  342. include/mach/default_pager_helper.defs \
  343. include/mach/default_pager_types.defs \
  344. include/mach/exc.defs \
  345. include/mach/mach.defs \
  346. include/mach/mach4.defs \
  347. include/mach/gnumach.defs \
  348. include/mach/task_notify.defs \
  349. include/mach/mach_host.defs \
  350. include/mach/mach_port.defs \
  351. include/mach/mach_types.defs \
  352. include/mach/memory_object.defs \
  353. include/mach/memory_object_default.defs \
  354. include/mach/notify.defs \
  355. include/mach/std_types.defs \
  356. include/mach/alert.h \
  357. include/mach/boolean.h \
  358. include/mach/boot.h \
  359. include/mach/default_pager_types.h \
  360. include/mach/exception.h \
  361. include/mach/host_info.h \
  362. include/mach/kern_return.h \
  363. include/mach/mach_param.h \
  364. include/mach/mach_types.h \
  365. include/mach/machine.h \
  366. include/mach/macro_help.h \
  367. include/mach/memory_object.h \
  368. include/mach/message.h \
  369. include/mach/mig_errors.h \
  370. include/mach/msg_type.h \
  371. include/mach/multiboot.h \
  372. include/mach/notify.h \
  373. include/mach/pc_sample.h \
  374. include/mach/policy.h \
  375. include/mach/port.h \
  376. include/mach/processor_info.h \
  377. include/mach/profil.h \
  378. include/mach/profilparam.h \
  379. include/mach/rpc.h \
  380. include/mach/std_types.h \
  381. include/mach/syscall_sw.h \
  382. include/mach/task_info.h \
  383. include/mach/task_special_ports.h \
  384. include/mach/thread_info.h \
  385. include/mach/thread_special_ports.h \
  386. include/mach/thread_status.h \
  387. include/mach/thread_switch.h \
  388. include/mach/time_value.h \
  389. include/mach/version.h \
  390. include/mach/vm_attributes.h \
  391. include/mach/vm_cache_statistics.h \
  392. include/mach/vm_inherit.h \
  393. include/mach/vm_param.h \
  394. include/mach/vm_prot.h \
  395. include/mach/vm_statistics.h \
  396. include/mach/vm_wire.h \
  397. include/mach/inline.h \
  398. include/mach/xen.h
  399. # If we name this `*_execdir', Automake won't add it to `install-data'...
  400. include_mach_eXecdir = $(includedir)/mach/exec
  401. include_mach_eXec_HEADERS = \
  402. include/mach/exec/a.out.h \
  403. include/mach/exec/elf.h \
  404. include/mach/exec/exec.h
  405. include_mach_debugdir = $(includedir)/mach_debug
  406. include_mach_debug_HEADERS = \
  407. $(addprefix include/mach_debug/, \
  408. hash_info.h \
  409. ipc_info.h \
  410. mach_debug.defs \
  411. mach_debug_types.defs \
  412. mach_debug_types.h \
  413. pc_info.h \
  414. vm_info.h \
  415. slab_info.h \
  416. )
  417. # Other headers for the distribution. We don't install these, because the
  418. # GNU C library has correct versions for users to use.
  419. # other-sys-headers := types.h time.h reboot.h ioctl.h
  420. # other-mach-headers := mig_support.h mach_traps.h error.h
  421. # other-headers := alloca.h
  422. install-data-hook:
  423. rm -f '$(DESTDIR)$(include_machdir)'/machine
  424. ln -s '$(systype)' '$(DESTDIR)$(include_machdir)'/machine
  425. #
  426. # Building a distribution.
  427. #
  428. # Enable all available features.
  429. DISTCHECK_CONFIGURE_FLAGS += \
  430. --enable-kdb
  431. # Instead of listing each file individually...
  432. EXTRA_DIST += \
  433. include
  434. #
  435. # Automatically generated source files.
  436. #
  437. # See Makerules.mig.am.
  438. #
  439. # User stubs.
  440. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  441. vm/memory_object_user.user.defs.c \
  442. vm/memory_object_default.user.defs.c
  443. nodist_libkernel_a_SOURCES += \
  444. vm/memory_object_user.user.h \
  445. vm/memory_object_user.user.c \
  446. vm/memory_object_user.user.msgids \
  447. vm/memory_object_default.user.h \
  448. vm/memory_object_default.user.c \
  449. vm/memory_object_default.user.msgids
  450. # vm/memory_object_user.user.defs
  451. # vm/memory_object_default.user.defs
  452. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  453. device/device_reply.user.defs.c \
  454. device/memory_object_reply.user.defs.c
  455. nodist_libkernel_a_SOURCES += \
  456. device/device_reply.user.h \
  457. device/device_reply.user.c \
  458. device/device_reply.user.msgids \
  459. device/memory_object_reply.user.h \
  460. device/memory_object_reply.user.c \
  461. device/memory_object_reply.user.msgids
  462. # device/device_reply.user.defs
  463. # device/memory_object_reply.user.defs
  464. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  465. kern/task_notify.user.defs.c
  466. nodist_libkernel_a_SOURCES += \
  467. kern/task_notify.user.h \
  468. kern/task_notify.user.c \
  469. kern/task_notify.user.msgids
  470. # Server stubs.
  471. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  472. device/device.server.defs.c \
  473. device/device_pager.server.defs.c
  474. nodist_libkernel_a_SOURCES += \
  475. device/device.server.h \
  476. device/device.server.c \
  477. device/device.server.msgids \
  478. device/device_pager.server.h \
  479. device/device_pager.server.c \
  480. device/device_pager.server.msgids
  481. # device/device.server.defs
  482. # device/device_pager.server.defs
  483. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  484. ipc/mach_port.server.defs.c
  485. nodist_libkernel_a_SOURCES += \
  486. ipc/mach_port.server.h \
  487. ipc/mach_port.server.c \
  488. ipc/mach_port.server.msgids
  489. # ipc/mach_port.server.defs
  490. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  491. kern/mach.server.defs.c \
  492. kern/mach4.server.defs.c \
  493. kern/gnumach.server.defs.c \
  494. kern/mach_debug.server.defs.c \
  495. kern/mach_host.server.defs.c
  496. nodist_libkernel_a_SOURCES += \
  497. kern/mach.server.h \
  498. kern/mach.server.c \
  499. kern/mach.server.msgids \
  500. kern/mach4.server.h \
  501. kern/mach4.server.c \
  502. kern/mach4.server.msgids \
  503. kern/gnumach.server.h \
  504. kern/gnumach.server.c \
  505. kern/gnumach.server.msgids \
  506. kern/mach_debug.server.h \
  507. kern/mach_debug.server.c \
  508. kern/mach_debug.server.msgids \
  509. kern/mach_host.server.h \
  510. kern/mach_host.server.c \
  511. kern/mach_host.server.msgids
  512. # kern/mach.server.defs
  513. # kern/mach4.server.defs
  514. # kern/gnumach.server.defs
  515. # kern/mach_debug.server.defs
  516. # kern/mach_host.server.defs
  517. # Stand-alone rule to generate the list of message ids when neither
  518. # the client nor the server stubs are required.
  519. nodist_lib_dep_tr_for_defs_a_SOURCES += \
  520. ipc/notify.none.defs.c \
  521. kern/exc.none.defs.c
  522. nodist_libkernel_a_SOURCES += \
  523. ipc/notify.none.msgids \
  524. kern/exc.none.msgids
  525. # ipc/notify.none.defs
  526. # rpctrace can make use of that.
  527. MOSTLYCLEANFILES += \
  528. gnumach.msgids
  529. gnumach.msgids: $(filter %.msgids,$(nodist_libkernel_a_SOURCES))
  530. $(AM_V_at) cat $^ > $@.new
  531. $(AM_V_GEN) mv $@.new $@
  532. # `exec_' prefix, so that we don't try to build that file during when running
  533. # `make install-data', as it may fail there, but isn't needed there either.
  534. exec_msgidsdir = $(datadir)/msgids
  535. exec_msgids_DATA = gnumach.msgids
  536. #
  537. # Specific code.
  538. #
  539. # Linux device drivers and the glue code.
  540. include linux/Makefrag.am
  541. #
  542. # Platform specific parts.
  543. #
  544. # Xen.
  545. if PLATFORM_xen
  546. include xen/Makefrag.am
  547. endif
  548. #
  549. # Architecture specific parts.
  550. #
  551. # ix86.
  552. if HOST_ix86
  553. include i386/Makefrag.am
  554. endif