pmfile 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. -- $Source$
  2. -- $State$
  3. include "first/c.pm"
  4. include "first/yacc.pm"
  5. include "first/llgen.pm"
  6. include "config.pm"
  7. include "first/ack.pm"
  8. CINCLUDES = {
  9. "-I"..ROOTDIR.."h",
  10. "-I"..ROOTDIR.."modules/h",
  11. "-I"..HEADERDIR,
  12. }
  13. -- Load the pmfiles for the various modules.
  14. include "util/data/pmfile"
  15. include "modules/src/alloc/pmfile"
  16. include "modules/src/assert/pmfile"
  17. include "modules/src/system/pmfile"
  18. include "modules/src/string/pmfile"
  19. include "modules/src/read_em/pmfile"
  20. include "modules/src/em_code/pmfile"
  21. include "modules/src/em_mes/pmfile"
  22. include "modules/src/print/pmfile"
  23. include "modules/src/string/pmfile"
  24. include "modules/src/object/pmfile"
  25. include "modules/src/idf/pmfile"
  26. include "modules/src/print/pmfile"
  27. include "modules/src/input/pmfile"
  28. include "modules/src/flt_arith/pmfile"
  29. include "util/amisc/pmfile"
  30. include "util/cmisc/pmfile"
  31. include "util/ack/pmfile"
  32. include "util/arch/pmfile"
  33. include "util/cpp/pmfile"
  34. include "util/cgg/pmfile"
  35. include "util/ncgg/pmfile"
  36. include "util/ceg/pmfile"
  37. include "util/misc/pmfile"
  38. include "util/opt/pmfile"
  39. include "util/ego/pmfile"
  40. include "util/topgen/pmfile"
  41. include "util/led/pmfile"
  42. include "lang/cem/cemcom/pmfile"
  43. include "lang/cem/cemcom.ansi/pmfile"
  44. include "lang/pc/pmfile"
  45. include "lang/m2/pmfile"
  46. include "lang/occam/pmfile"
  47. include "lang/basic/pmfile"
  48. include "mach/proto/pmfile"
  49. include "mach/6500/pmfile"
  50. include "mach/6800/pmfile"
  51. include "mach/6805/pmfile"
  52. include "mach/6809/pmfile"
  53. include "mach/arm/pmfile"
  54. include "mach/i386/pmfile"
  55. include "mach/i80/pmfile"
  56. include "mach/i86/pmfile"
  57. include "mach/m68020/pmfile"
  58. include "mach/m68k2/pmfile"
  59. include "mach/m68k4/pmfile"
  60. include "mach/ns/pmfile"
  61. include "mach/pdp/pmfile"
  62. include "mach/s2650/pmfile"
  63. include "mach/vax4/pmfile"
  64. include "mach/z80/pmfile"
  65. include "mach/z8000/pmfile"
  66. -- This is the list of language runtimes that is built for each architecture.
  67. lang_runtimes = group {
  68. lang_pc_runtime,
  69. lang_occam_runtime,
  70. lang_basic_runtime,
  71. }
  72. default = group {
  73. -- Some of the dependency management across modules isn't entirely
  74. -- complete, for simplicity; as a result, the order here is important.
  75. -- In particular, referencing a library does not cause the library to
  76. -- be built, hence the reason why the modules must be built first. Also,
  77. -- some of these generate header files...
  78. module_em_data,
  79. module_system,
  80. module_alloc,
  81. module_assert,
  82. module_string,
  83. module_em_code,
  84. module_read_em,
  85. module_em_mes,
  86. module_print,
  87. module_object,
  88. module_idf,
  89. module_print,
  90. module_input,
  91. module_flt_arith,
  92. tool_tabgen,
  93. tool_aal,
  94. tool_ack,
  95. tool_cpp,
  96. tool_cgg,
  97. tool_ncgg,
  98. -- tool_ceg,
  99. tool_em_decode,
  100. tool_em_encode,
  101. tool_esize,
  102. tool_opt,
  103. tool_ego,
  104. tool_topgen,
  105. tool_led,
  106. lang_cem_cemcom,
  107. lang_cem_cemcom_ansi,
  108. lang_pc_compiler,
  109. lang_m2,
  110. lang_occam_compiler,
  111. lang_basic_compiler,
  112. mach_6500, lang_runtimes { ARCH="6500", OPTIMISATION="-O" },
  113. mach_6800,
  114. mach_6805,
  115. mach_6809,
  116. mach_arm, lang_runtimes { ARCH="arm", OPTIMISATION="-O" },
  117. mach_i386, lang_runtimes { ARCH="i386", OPTIMISATION="-O3" },
  118. mach_i80, lang_runtimes { ARCH="i80", OPTIMISATION="-O" },
  119. mach_i86, lang_runtimes { ARCH="i86", OPTIMISATION="-O6" },
  120. mach_m68020, lang_runtimes { ARCH="m68020", OPTIMISATION="-O6" },
  121. -- mach_m68k2, lang_runtimes { ARCH="m68k2", OPTIMISATION="-O" },
  122. -- mach_m68k4, lang_runtimes { ARCH="m68k4", OPTIMISATION="-O6" },
  123. mach_ns, lang_runtimes { ARCH="ns", OPTIMISATION="-O" },
  124. mach_pdp, lang_runtimes { ARCH="pdp", OPTIMISATION="-O6" },
  125. mach_s2650,
  126. -- mach_vax4, lang_runtimes { ARCH="vax4", OPTIMISATION="-O" },
  127. mach_z80, lang_runtimes { ARCH="z80", OPTIMISATION="-O" },
  128. mach_z8000, lang_runtimes { ARCH="z8000", OPTIMISATION="-O" },
  129. }
  130. -- Ensure that the work directories exist.
  131. posix.mkdir(TEMPDIR)
  132. posix.mkdir(HEADERDIR)
  133. -- Build the configuration headers, rather crudely. FIXME.
  134. configure = simple {
  135. outputs = {HEADERDIR.."local.h", HEADERDIR.."em_path.h"},
  136. command = "",
  137. __dobuild = function(self, inputs, outputs)
  138. -- Build 'local.h', rather crudely
  139. local f = io.open(HEADERDIR.."local.h", "w")
  140. f:write("#define VERSION 3\n") -- EM byte-code version
  141. f:write("#define ACKM \"", DEFAULT_ARCHITECTURE, "\"\n")
  142. f:write("#define BIGMACHINE 1\n") -- No, we don't have a 16-bit architecture
  143. f:write("#define SYS_5\n")
  144. f:close()
  145. -- Build 'em_path.h', rather crudely
  146. local f = io.open(HEADERDIR.."em_path.h", "w")
  147. f:write("#define TMP_DIR \"", ACK_TEMP_DIR, "\"\n")
  148. f:write("#define EM_DIR \"", PREFIX, "\"\n")
  149. f:write("#define ACK_PATH \"", PLATIND, "/descr\"\n")
  150. f:close()
  151. end
  152. }
  153. -- Revision history
  154. -- $Log$
  155. -- Revision 1.13 2006-07-27 22:07:38 dtrg
  156. -- Added support for the Pascal language runtime.
  157. --
  158. -- Revision 1.12 2006/07/27 21:58:13 dtrg
  159. -- Added support for the Basic and Occam language runtimes.
  160. --
  161. -- Revision 1.11 2006/07/26 23:08:09 dtrg
  162. -- Added support for the Basic compiler.
  163. --
  164. -- Revision 1.10 2006/07/26 18:23:32 dtrg
  165. -- Added support for the Occam compiler.
  166. --
  167. -- Revision 1.9 2006/07/26 17:12:19 dtrg
  168. -- Added support for the Modula-2 compiler.
  169. --
  170. -- Revision 1.8 2006/07/22 21:24:41 dtrg
  171. -- Really added support for the Pascal compiler.
  172. --
  173. -- Revision 1.7 2006/07/22 21:03:07 dtrg
  174. -- Added support for the Pascal compiler.
  175. --
  176. -- Revision 1.6 2006/07/22 20:10:41 dtrg
  177. -- Added support for the esize object inspection tool.
  178. --
  179. -- Revision 1.5 2006/07/22 20:04:41 dtrg
  180. -- Added support for the led link editor.
  181. --
  182. -- Revision 1.4 2006/07/22 12:31:19 dtrg
  183. -- Added support for the top target peephole optimiser.
  184. --
  185. -- Revision 1.3 2006/07/22 00:52:01 dtrg
  186. -- Added support for the ego global optimisation suite.
  187. --
  188. -- Revision 1.2 2006/07/20 23:24:42 dtrg
  189. -- Fixed revision history.