pmfile 4.3 KB

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