pmfile 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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_occam_runtime,
  69. lang_basic_runtime,
  70. }
  71. default = group {
  72. -- Some of the dependency management across modules isn't entirely
  73. -- complete, for simplicity; as a result, the order here is important.
  74. -- In particular, referencing a library does not cause the library to
  75. -- be built, hence the reason why the modules must be built first. Also,
  76. -- some of these generate header files...
  77. module_em_data,
  78. module_system,
  79. module_alloc,
  80. module_assert,
  81. module_string,
  82. module_em_code,
  83. module_read_em,
  84. module_em_mes,
  85. module_print,
  86. module_object,
  87. module_idf,
  88. module_print,
  89. module_input,
  90. module_flt_arith,
  91. tool_tabgen,
  92. tool_aal,
  93. tool_ack,
  94. tool_cpp,
  95. tool_cgg,
  96. tool_ncgg,
  97. -- tool_ceg,
  98. tool_em_decode,
  99. tool_em_encode,
  100. tool_esize,
  101. tool_opt,
  102. tool_ego,
  103. tool_topgen,
  104. tool_led,
  105. lang_cem_cemcom,
  106. lang_cem_cemcom_ansi,
  107. lang_pc,
  108. lang_m2,
  109. lang_occam_compiler,
  110. lang_basic_compiler,
  111. mach_6500, lang_runtimes { ARCH="6500", OPTIMISATION="-O" },
  112. mach_6800,
  113. mach_6805,
  114. mach_6809,
  115. mach_arm, lang_runtimes { ARCH="arm", OPTIMISATION="-O" },
  116. mach_i386, lang_runtimes { ARCH="i386", OPTIMISATION="-O3" },
  117. mach_i80, lang_runtimes { ARCH="i80", OPTIMISATION="-O" },
  118. mach_i86, lang_runtimes { ARCH="i86", OPTIMISATION="-O6" },
  119. mach_m68020, lang_runtimes { ARCH="m68020", OPTIMISATION="-O6" },
  120. -- mach_m68k2, lang_runtimes { ARCH="m68k2", OPTIMISATION="-O" },
  121. -- mach_m68k4, lang_runtimes { ARCH="m68k4", OPTIMISATION="-O6" },
  122. mach_ns, lang_runtimes { ARCH="ns", OPTIMISATION="-O" },
  123. mach_pdp, lang_runtimes { ARCH="pdp", OPTIMISATION="-O6" },
  124. mach_s2650,
  125. -- mach_vax4, lang_runtimes { ARCH="vax4", OPTIMISATION="-O" },
  126. mach_z80, lang_runtimes { ARCH="z80", OPTIMISATION="-O" },
  127. mach_z8000, lang_runtimes { ARCH="z8000", OPTIMISATION="-O" },
  128. }
  129. -- Ensure that the work directories exist.
  130. posix.mkdir(TEMPDIR)
  131. posix.mkdir(HEADERDIR)
  132. -- Build the configuration headers, rather crudely. FIXME.
  133. configure = simple {
  134. outputs = {HEADERDIR.."local.h", HEADERDIR.."em_path.h"},
  135. command = "",
  136. __dobuild = function(self, inputs, outputs)
  137. -- Build 'local.h', rather crudely
  138. local f = io.open(HEADERDIR.."local.h", "w")
  139. f:write("#define VERSION 3\n") -- EM byte-code version
  140. f:write("#define ACKM \"", DEFAULT_ARCHITECTURE, "\"\n")
  141. f:write("#define BIGMACHINE 1\n") -- No, we don't have a 16-bit architecture
  142. f:write("#define SYS_5\n")
  143. f:close()
  144. -- Build 'em_path.h', rather crudely
  145. local f = io.open(HEADERDIR.."em_path.h", "w")
  146. f:write("#define TMP_DIR \"", ACK_TEMP_DIR, "\"\n")
  147. f:write("#define EM_DIR \"", PREFIX, "\"\n")
  148. f:write("#define ACK_PATH \"", PLATIND, "/descr\"\n")
  149. f:close()
  150. end
  151. }
  152. -- Revision history
  153. -- $Log$
  154. -- Revision 1.12 2006-07-27 21:58:13 dtrg
  155. -- Added support for the Basic and Occam language runtimes.
  156. --
  157. -- Revision 1.11 2006/07/26 23:08:09 dtrg
  158. -- Added support for the Basic compiler.
  159. --
  160. -- Revision 1.10 2006/07/26 18:23:32 dtrg
  161. -- Added support for the Occam compiler.
  162. --
  163. -- Revision 1.9 2006/07/26 17:12:19 dtrg
  164. -- Added support for the Modula-2 compiler.
  165. --
  166. -- Revision 1.8 2006/07/22 21:24:41 dtrg
  167. -- Really added support for the Pascal compiler.
  168. --
  169. -- Revision 1.7 2006/07/22 21:03:07 dtrg
  170. -- Added support for the Pascal compiler.
  171. --
  172. -- Revision 1.6 2006/07/22 20:10:41 dtrg
  173. -- Added support for the esize object inspection tool.
  174. --
  175. -- Revision 1.5 2006/07/22 20:04:41 dtrg
  176. -- Added support for the led link editor.
  177. --
  178. -- Revision 1.4 2006/07/22 12:31:19 dtrg
  179. -- Added support for the top target peephole optimiser.
  180. --
  181. -- Revision 1.3 2006/07/22 00:52:01 dtrg
  182. -- Added support for the ego global optimisation suite.
  183. --
  184. -- Revision 1.2 2006/07/20 23:24:42 dtrg
  185. -- Fixed revision history.