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