Makefile.erik 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. # $Header$
  2. # M A K E F I L E F O R A C K C - C O M P I L E R
  3. # Some paths
  4. BIN =/user1/$$USER/bin# # provisional ???
  5. EM = /usr/em# # where to find the ACK tree
  6. ACK = $(EM)/bin/ack# # old ACK C compiler
  7. EM_INCLUDES =$(EM)/h# # directory containing EM interface definition
  8. # Where to install the compiler and its driver
  9. CEMCOM = $(BIN)/cemcom
  10. DRIVER = $(BIN)/cem
  11. # What C compiler to use and how
  12. CC = $(ACK) -.c
  13. CC = CC
  14. CC = /bin/cc
  15. COPTIONS =
  16. # What parser generator to use and how
  17. GEN = /user0/ceriel/bin/LLgen
  18. GENOPTIONS = -vv
  19. # Special #defines during compilation
  20. CDEFS = $(MAP) -I$(EM_INCLUDES)
  21. CFLAGS = $(CDEFS) $(COPTIONS) -O# # we cannot pass the COPTIONS to lint!
  22. # Grammar files and their objects
  23. LSRC = tokenfile.g declar.g statement.g expression.g program.g
  24. LOBJ = tokenfile.o declar.o statement.o expression.o program.o Lpars.o
  25. # Objects of hand-written C files
  26. COBJ = main.o idf.o declarator.o decspecs.o struct.o \
  27. expr.o ch7.o ch7bin.o cstoper.o arith.o \
  28. alloc.o asm.o code.o dumpidf.o error.o field.o\
  29. tokenname.o LLlex.o LLmessage.o \
  30. input.o domacro.o replace.o init.o options.o \
  31. scan.o skip.o stack.o type.o ch7mon.o label.o eval.o \
  32. switch.o storage.o ival.o conversion.o \
  33. em.o blocks.o dataflow.o system.o string.o
  34. # Objects of other generated C files
  35. GOBJ = char.o symbol2str.o next.o writeem.o
  36. # generated source files
  37. GSRC = char.c symbol2str.c next.c writeem.c \
  38. code.h declar.h decspecs.h def.h expr.h field.h \
  39. idf.h macro.h stack.h struct.h switch.h type.h \
  40. writeem.h
  41. # .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
  42. GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \
  43. idepth.h idfsize.h ifdepth.h inputtype.h inumlength.h lapbuf.h \
  44. maxincl.h myalloc.h nobitfield.h nopp.h \
  45. nparams.h numsize.h parbufsize.h pathlength.h predefine.h \
  46. proc_intf.h strsize.h target_sizes.h textsize.h use_tmp.h \
  47. bufsiz.h str_params.h spec_arith.h
  48. # Other generated files, for 'make clean' only
  49. GENERATED = tab tokenfile.g Lpars.h LLfiles LL.output lint.out \
  50. print Xref lxref hfiles cfiles
  51. # include files containing ALLOCDEF specifications
  52. NEXTFILES = code.str declarator.str decspecs.str def.str expr.str field.str \
  53. idf.str macro.str stack.str struct.str switch.str type.str
  54. .SUFFIXES: .str .h
  55. .str.h:
  56. ./make.allocd <$*.str >$*.h
  57. all: cc
  58. cc:
  59. make hfiles
  60. make LLfiles
  61. make main
  62. cem: cem.c string.o
  63. $(CC) -O cem.c string.o -o cem
  64. lint.cem: cem.c string.c
  65. lint -abx cem.c
  66. hfiles: Parameters
  67. ./make.hfiles Parameters
  68. @touch hfiles
  69. LLfiles: $(LSRC)
  70. $(GEN) $(GENOPTIONS) $(LSRC)
  71. @touch LLfiles
  72. tokenfile.g: tokenname.c make.tokfile
  73. <tokenname.c ./make.tokfile >tokenfile.g
  74. symbol2str.c: tokenname.c make.tokcase
  75. <tokenname.c ./make.tokcase >symbol2str.c
  76. char.c: tab char.tab
  77. tab -fchar.tab >char.c
  78. next.c: make.next $(NEXTFILES)
  79. ./make.next $(NEXTFILES) >next.c
  80. code.h: make.allocd
  81. declar.h: make.allocd
  82. decspecs.h: make.allocd
  83. def.h: make.allocd
  84. expr.h: make.allocd
  85. field.h: make.allocd
  86. idf.h: make.allocd
  87. macro.h: make.allocd
  88. stack.h: make.allocd
  89. struct.h: make.allocd
  90. switch.h: make.allocd
  91. type.h: make.allocd
  92. writeem.c: make.emfun emcode.def
  93. ./make.emfun emcode.def >writeem.c
  94. writeem.h: make.emmac emcode.def
  95. ./make.emmac emcode.def >writeem.h
  96. # Objects needed for 'main'
  97. OBJ = $(COBJ) $(LOBJ) $(GOBJ)
  98. main: $(OBJ) Makefile
  99. $(CC) $(COPTIONS) $(LFLAGS) $(OBJ) -o main
  100. size main
  101. cfiles: hfiles LLfiles $(GSRC)
  102. @touch cfiles
  103. install: main cem
  104. cp main $(CEMCOM)
  105. cp cem $(DRIVER)
  106. print: files
  107. pr `cat files` > print
  108. tags: cfiles
  109. ctags `sources $(OBJ)`
  110. shar: files
  111. shar `cat files`
  112. listcfiles:
  113. @echo `sources $(OBJ)`
  114. listobjects:
  115. @echo $(OBJ)
  116. depend: cfiles
  117. sed '/^#AUTOAUTO/,$$d' Makefile >Makefile.new
  118. echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >>Makefile.new
  119. /user1/erikb/bin/mkdep `sources $(OBJ)` | \
  120. sed 's/\.c:/.o:/' >>Makefile.new
  121. mv Makefile Makefile.old
  122. mv Makefile.new Makefile
  123. xref:
  124. ctags -x `grep "\.[ch]" files`|sed "s/).*/)/">Xref
  125. lxref:
  126. lxref $(OBJ) -lc >lxref
  127. lint: lint.main lint.cem lint.tab
  128. lint.main: cfiles
  129. lint -DNORCSID -bx $(CDEFS) `sources $(OBJ)` >lint.out
  130. cchk:
  131. cchk `sources $(COBJ)`
  132. clean:
  133. rm -f `sources $(LOBJ)` $(OBJ) $(GENERATED) $(GSRC) $(GHSRC)
  134. tab:
  135. $(CC) tab.c -o tab
  136. lint.tab:
  137. lint -abx tab.c
  138. sim: cfiles
  139. $(SIM) $(SIMFLAGS) `sources $(COBJ)` $(GSRC) $(LSRC)
  140. #AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
  141. main.o: LLlex.h Lpars.h alloc.h arith.h bufsiz.h debug.h declar.h idf.h input.h inputtype.h level.h maxincl.h myalloc.h nobitfield.h nopp.h spec_arith.h specials.h system.h target_sizes.h tokenname.h type.h use_tmp.h
  142. idf.o: LLlex.h Lpars.h align.h alloc.h arith.h assert.h botch_free.h debug.h declar.h decspecs.h def.h idf.h idfsize.h label.h level.h nobitfield.h nopp.h sizes.h spec_arith.h specials.h stack.h storage.h struct.h type.h
  143. declarator.o: Lpars.h alloc.h arith.h botch_free.h declar.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
  144. decspecs.o: Lpars.h arith.h decspecs.h def.h level.h nobitfield.h spec_arith.h type.h
  145. struct.o: LLlex.h Lpars.h align.h arith.h assert.h botch_free.h debug.h def.h field.h idf.h level.h nobitfield.h nopp.h sizes.h spec_arith.h stack.h storage.h struct.h type.h
  146. expr.o: LLlex.h Lpars.h alloc.h arith.h botch_free.h declar.h decspecs.h def.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
  147. ch7.o: Lpars.h arith.h assert.h debug.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h struct.h type.h
  148. ch7bin.o: Lpars.h arith.h botch_free.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h storage.h struct.h type.h
  149. cstoper.o: Lpars.h arith.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h target_sizes.h type.h
  150. arith.o: Lpars.h alloc.h arith.h botch_free.h expr.h field.h idf.h label.h mes.h nobitfield.h nopp.h spec_arith.h storage.h type.h
  151. alloc.o: alloc.h assert.h debug.h myalloc.h system.h
  152. code.o: LLlex.h Lpars.h alloc.h arith.h assert.h atw.h botch_free.h code.h dataflow.h debug.h declar.h decspecs.h def.h em.h expr.h idf.h label.h level.h mes.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h specials.h stack.h storage.h type.h use_tmp.h writeem.h
  153. dumpidf.o: Lpars.h arith.h debug.h def.h expr.h field.h idf.h label.h nobitfield.h nopp.h spec_arith.h stack.h struct.h type.h
  154. error.o: LLlex.h arith.h debug.h em.h errout.h expr.h label.h nopp.h proc_intf.h spec_arith.h string.h system.h tokenname.h use_tmp.h writeem.h
  155. field.o: Lpars.h arith.h assert.h code.h debug.h em.h expr.h field.h idf.h label.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h type.h writeem.h
  156. tokenname.o: LLlex.h Lpars.h arith.h idf.h nopp.h spec_arith.h tokenname.h
  157. LLlex.o: LLlex.h Lpars.h alloc.h arith.h assert.h class.h debug.h def.h idf.h idfsize.h input.h nopp.h numsize.h sizes.h spec_arith.h strsize.h
  158. LLmessage.o: LLlex.h Lpars.h alloc.h arith.h idf.h nopp.h spec_arith.h
  159. input.o: LLlex.h alloc.h arith.h assert.h bufsiz.h debug.h idepth.h input.h inputtype.h interface.h nopp.h pathlength.h spec_arith.h system.h
  160. domacro.o: LLlex.h Lpars.h alloc.h arith.h assert.h botch_free.h class.h debug.h idf.h idfsize.h ifdepth.h input.h interface.h macro.h nopp.h nparams.h parbufsize.h spec_arith.h storage.h textsize.h
  161. replace.o: LLlex.h alloc.h arith.h assert.h class.h debug.h idf.h input.h interface.h macro.h nopp.h pathlength.h spec_arith.h string.h strsize.h
  162. init.o: alloc.h class.h idf.h interface.h macro.h nopp.h predefine.h string.h system.h
  163. options.o: align.h arith.h class.h idf.h idfsize.h macro.h maxincl.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h
  164. scan.o: class.h idf.h input.h interface.h lapbuf.h macro.h nopp.h nparams.h
  165. skip.o: LLlex.h arith.h class.h input.h interface.h nopp.h spec_arith.h
  166. stack.o: Lpars.h alloc.h arith.h botch_free.h debug.h def.h em.h idf.h level.h mes.h nobitfield.h nopp.h proc_intf.h spec_arith.h stack.h storage.h struct.h system.h type.h use_tmp.h writeem.h
  167. type.o: Lpars.h align.h alloc.h arith.h def.h idf.h nobitfield.h nopp.h sizes.h spec_arith.h type.h
  168. ch7mon.o: Lpars.h arith.h botch_free.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h storage.h type.h
  169. label.o: Lpars.h arith.h def.h idf.h label.h level.h nobitfield.h nopp.h spec_arith.h type.h
  170. eval.o: Lpars.h align.h arith.h assert.h atw.h code.h dataflow.h debug.h def.h em.h expr.h idf.h label.h level.h mes.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h stack.h string.h type.h writeem.h
  171. switch.o: arith.h assert.h botch_free.h code.h debug.h density.h em.h expr.h idf.h label.h nobitfield.h nopp.h proc_intf.h spec_arith.h storage.h switch.h type.h writeem.h
  172. storage.o: alloc.h assert.h botch_free.h debug.h storage.h
  173. ival.o: Lpars.h align.h arith.h assert.h class.h debug.h def.h em.h expr.h field.h idf.h label.h level.h nobitfield.h nopp.h proc_intf.h sizes.h spec_arith.h string.h struct.h type.h writeem.h
  174. conversion.o: Lpars.h arith.h em.h nobitfield.h proc_intf.h sizes.h spec_arith.h type.h writeem.h
  175. em.o: arith.h bufsiz.h em.h label.h proc_intf.h spec_arith.h system.h writeem.h
  176. blocks.o: arith.h atw.h em.h proc_intf.h sizes.h spec_arith.h writeem.h
  177. dataflow.o: dataflow.h
  178. system.o: inputtype.h system.h
  179. string.o: arith.h nopp.h spec_arith.h str_params.h string.h system.h
  180. tokenfile.o: Lpars.h
  181. declar.o: LLlex.h Lpars.h arith.h debug.h declar.h decspecs.h def.h expr.h field.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h struct.h type.h
  182. statement.o: LLlex.h Lpars.h arith.h botch_free.h code.h debug.h def.h em.h expr.h idf.h label.h nobitfield.h nopp.h proc_intf.h spec_arith.h stack.h storage.h type.h writeem.h
  183. expression.o: LLlex.h Lpars.h arith.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h type.h
  184. program.o: LLlex.h Lpars.h alloc.h arith.h code.h declar.h decspecs.h def.h expr.h idf.h label.h nobitfield.h nopp.h spec_arith.h type.h
  185. Lpars.o: Lpars.h
  186. char.o: class.h
  187. symbol2str.o: Lpars.h
  188. writeem.o: arith.h em.h label.h proc_intf.h spec_arith.h writeem.h