Makefile.erik 9.7 KB

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