Amakefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. AMAKELIB = { . , /usr/local/lib/amake } ;
  2. %include std-amake.amk ;
  3. %include ack-defs.amk ;
  4. %include cc_hh_tools.amk ;
  5. %include tok_tools.amk ;
  6. %include op_tools.amk ;
  7. %include char_tools.amk ;
  8. %default grind ;
  9. %declare tokenname.c [
  10. gen_tokens,
  11. cc-dest = symbol2str.c,
  12. LL-dest = tokenfile.g
  13. ];
  14. CMD_LLSRC = {
  15. tokenname.c,
  16. commands.g
  17. } ;
  18. CSRC = {
  19. main.c,
  20. list.c,
  21. tree.c,
  22. expr.c,
  23. position.c,
  24. idf.c,
  25. run.c,
  26. symbol.c,
  27. print.c,
  28. type.c,
  29. rd.c,
  30. do_comm.c,
  31. modula-2.c,
  32. pascal.c,
  33. c.c
  34. } ;
  35. HSRC = {
  36. tokenname.h,
  37. operator.h,
  38. class.h,
  39. position.h,
  40. idf.h,
  41. message.h,
  42. avl.h,
  43. scope.h,
  44. langdep.h,
  45. sizes.h,
  46. token.h,
  47. expr.h,
  48. rd.h
  49. } ;
  50. HHSRC = {
  51. file.hh,
  52. type.hh,
  53. symbol.hh,
  54. tree.hh,
  55. avl.cc,
  56. scope.cc,
  57. itemlist.cc,
  58. langdep.cc
  59. } ;
  60. LIBRARIES = {
  61. $EMHOME/modules/lib/libassert.a,
  62. $EMHOME/modules/lib/liballoc.a,
  63. $EMHOME/modules/lib/malloc.o,
  64. $EMHOME/modules/lib/libstring.a,
  65. $EMHOME/modules/lib/libobject.a,
  66. $EMHOME/modules/lib/libsystem.a
  67. } ;
  68. DBFLAGS = { -O, -DDEBUG } ;
  69. PROFFLAGS = { } ;
  70. LDFLAGS = {
  71. -Bstatic,
  72. $PROFFLAGS,
  73. $DBFLAGS
  74. } ;
  75. INCLUDES = {
  76. -I$EMHOME/modules/h,
  77. -I$EMHOME/modules/pkg,
  78. -I$EMHOME/h
  79. } ;
  80. CFLAGS = {
  81. $INCLUDES,
  82. $PROFFLAGS,
  83. $DBFLAGS
  84. } ;
  85. DBS_LLTARGETS = {
  86. db_symtab.c,
  87. DBSpars.c,
  88. DBSpars.h
  89. } ;
  90. DBS_LLSRC = {
  91. db_symtab.g
  92. } ;
  93. %cluster {
  94. %targets $DBS_LLTARGETS ;
  95. %sources $DBS_LLSRC ;
  96. %use LLgen(prefix => DBS) ;
  97. } ;
  98. LINTFLAGS = {
  99. $INCLUDES
  100. } ;
  101. %cluster {
  102. %targets lint.out[type = lint-output];
  103. %sources $CSRC + $CMD_LLSRC + $DBS_LLTARGETS + $HHSRC + char.ct + operators.ot ;
  104. %use lint(realdest => lint.out) ;
  105. } ;
  106. %cluster {
  107. %targets grind[type = program];
  108. %sources $CSRC + $CMD_LLSRC + $DBS_LLTARGETS + $HHSRC + char.ct + operators.ot ;
  109. } ;