pmfile 4.2 KB

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