pmfile 4.0 KB

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