pmfile 4.6 KB

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