pmfile 5.8 KB

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