Makefile.erik 9.2 KB

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