proto.make 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. # Header: Makefile,v 0.8 87/11/16 10:35:32 ceriel Exp $
  2. #PARAMS do not remove this line!
  3. CFILES= cgg.c $(SRC_DIR)/subr.c $(SRC_DIR)/main.c $(SRC_DIR)/coerc.c \
  4. enterkeyw.c $(SRC_DIR)/error.c $(SRC_DIR)/emlookup.c $(SRC_DIR)/expr.c \
  5. $(SRC_DIR)/instruct.c $(SRC_DIR)/iocc.c $(SRC_DIR)/lookup.c \
  6. $(SRC_DIR)/output.c $(SRC_DIR)/set.c $(SRC_DIR)/strlookup.c \
  7. $(SRC_DIR)/var.c $(SRC_DIR)/hall.c
  8. OFILES= cgg.$(SUF) subr.$(SUF) main.$(SUF) coerc.$(SUF) enterkeyw.$(SUF) \
  9. error.$(SUF) emlookup.$(SUF) expr.$(SUF) instruct.$(SUF) iocc.$(SUF) \
  10. lookup.$(SUF) set.$(SUF) strlookup.$(SUF) var.$(SUF) hall.$(SUF)
  11. SOURCES=$(SRC_DIR)/*.h $(SRC_DIR)/cgg.y $(SRC_DIR)/scan.l \
  12. $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords $(SRC_DIR)/coerc.c \
  13. $(SRC_DIR)/emlookup.c $(SRC_DIR)/error.c $(SRC_DIR)/expr.c \
  14. $(SRC_DIR)/hall.c $(SRC_DIR)/instruct.c $(SRC_DIR)/iocc.c \
  15. $(SRC_DIR)/lookup.c $(SRC_DIR)/main.c $(SRC_DIR)/output.c \
  16. $(SRC_DIR)/set.c $(SRC_DIR)/strlookup.c $(SRC_DIR)/subr.c \
  17. $(SRC_DIR)/var.c
  18. SRC_DIR=$(SRC_HOME)/util/ncgg
  19. EMH=$(TARGET_HOME)/h
  20. INCLUDES=-I$(EMH) -I$(TARGET_HOME)/config -I$(SRC_DIR) -I.
  21. CFLAGS=$(INCLUDES) $(COPTIONS) -DNDEBUG
  22. YFLAGS=-d
  23. LDFLAGS=$(LDOPTIONS)
  24. LINTFLAGS=$(INCLUDES) $(LINTOPTIONS)
  25. cgg: cgg.$(SUF) $(OFILES) output.$(SUF)
  26. $(CC) $(LDFLAGS) $(OFILES) output.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg
  27. install: cgg
  28. cp cgg $(TARGET_HOME)/lib.bin/ncgg
  29. if [ $(DO_MACHINE_INDEP) = y ] ; \
  30. then mk_manpage $(SRC_DIR)/ncgg.6 $(TARGET_HOME) ; \
  31. fi
  32. cmp: cgg
  33. -cmp cgg $(TARGET_HOME)/lib.bin/ncgg
  34. debugcgg: cgg.$(SUF) $(OFILES) debugoutput.$(SUF)
  35. $(CC) $(LDFLAGS) $(OFILES) debugoutput.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg
  36. cgg.c: $(SRC_DIR)/cgg.y
  37. yacc $(YFLAGS) $(SRC_DIR)/cgg.y && mv y.tab.c cgg.c
  38. enterkeyw.c: $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords y.tab.h
  39. $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords
  40. debugoutput.$(SUF): debugoutput.c
  41. $(CC) $(CFLAGS) -DCODEDEBUG -c debugoutput.c
  42. debugoutput.c: $(SRC_DIR)/output.c
  43. cp $(SRC_DIR)/output.c debugoutput.c
  44. lint: $(CFILES)
  45. $(LINT) $(LINTFLAGS) $(CFILES)
  46. clean:
  47. rm -f cgg.c scan.c y.output y.tab.h enterkeyw.c debugoutput.c
  48. rm -f $(OFILES) output.$(SUF) debugoutput.$(SUF) cgg lint
  49. scan.c: $(SRC_DIR)/scan.l
  50. flex -st $(SRC_DIR)/scan.l > scan.c
  51. pr:
  52. @pr $(SOURCES)
  53. opr:
  54. -make pr|opr
  55. depend: $(CFILES) scan.c
  56. rm_deps Makefile >Makefile.new
  57. for i in $(CFILES) ; do \
  58. echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \
  59. echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
  60. $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF): /" >> Makefile.new ; \
  61. done
  62. mv Makefile Makefile.old
  63. mv Makefile.new Makefile
  64. #DEPENDENCIES
  65. cgg.$(SUF): cgg.c
  66. $(CC) -c $(CFLAGS) cgg.c
  67. cgg.$(SUF): scan.c
  68. cgg.$(SUF): $(TARGET_HOME)/h/em_reg.h
  69. cgg.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  70. cgg.$(SUF): $(SRC_DIR)/extern.h
  71. cgg.$(SUF): $(SRC_DIR)/expr.h
  72. cgg.$(SUF): $(SRC_DIR)/cost.h
  73. cgg.$(SUF): $(SRC_DIR)/instruct.h
  74. cgg.$(SUF): $(SRC_DIR)/iocc.h
  75. cgg.$(SUF): $(SRC_DIR)/set.h
  76. cgg.$(SUF): $(SRC_DIR)/lookup.h
  77. cgg.$(SUF): $(SRC_DIR)/varinfo.h
  78. cgg.$(SUF): $(TARGET_HOME)/h/em_spec.h
  79. cgg.$(SUF): $(TARGET_HOME)/config/local.h
  80. cgg.$(SUF): $(SRC_DIR)/param.h
  81. subr.$(SUF): $(SRC_DIR)/subr.c
  82. $(CC) -c $(CFLAGS) $(SRC_DIR)/subr.c
  83. subr.$(SUF): $(SRC_DIR)/extern.h
  84. subr.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  85. subr.$(SUF): $(SRC_DIR)/regvar.h
  86. subr.$(SUF): $(SRC_DIR)/token.h
  87. subr.$(SUF): $(SRC_DIR)/cost.h
  88. subr.$(SUF): $(SRC_DIR)/instruct.h
  89. subr.$(SUF): $(SRC_DIR)/varinfo.h
  90. subr.$(SUF): $(SRC_DIR)/set.h
  91. subr.$(SUF): $(SRC_DIR)/expr.h
  92. subr.$(SUF): $(SRC_DIR)/property.h
  93. subr.$(SUF): $(SRC_DIR)/lookup.h
  94. subr.$(SUF): $(SRC_DIR)/reg.h
  95. subr.$(SUF): $(TARGET_HOME)/h/em_spec.h
  96. subr.$(SUF): $(TARGET_HOME)/config/local.h
  97. subr.$(SUF): $(SRC_DIR)/param.h
  98. main.$(SUF): $(SRC_DIR)/main.c
  99. $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
  100. coerc.$(SUF): $(SRC_DIR)/coerc.c
  101. $(CC) -c $(CFLAGS) $(SRC_DIR)/coerc.c
  102. coerc.$(SUF): $(SRC_DIR)/extern.h
  103. coerc.$(SUF): $(SRC_DIR)/pseudo.h
  104. coerc.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  105. coerc.$(SUF): $(SRC_DIR)/iocc.h
  106. coerc.$(SUF): $(SRC_DIR)/varinfo.h
  107. coerc.$(SUF): $(SRC_DIR)/cost.h
  108. coerc.$(SUF): $(SRC_DIR)/token.h
  109. coerc.$(SUF): $(SRC_DIR)/reg.h
  110. coerc.$(SUF): $(SRC_DIR)/property.h
  111. coerc.$(SUF): $(SRC_DIR)/set.h
  112. coerc.$(SUF): $(TARGET_HOME)/h/em_spec.h
  113. coerc.$(SUF): $(TARGET_HOME)/config/local.h
  114. coerc.$(SUF): $(SRC_DIR)/param.h
  115. coerc.$(SUF): $(SRC_DIR)/assert.h
  116. enterkeyw.$(SUF): enterkeyw.c
  117. $(CC) -c $(CFLAGS) enterkeyw.c
  118. enterkeyw.$(SUF): $(SRC_DIR)/lookup.h
  119. error.$(SUF): $(SRC_DIR)/error.c
  120. $(CC) -c $(CFLAGS) $(SRC_DIR)/error.c
  121. emlookup.$(SUF): $(SRC_DIR)/emlookup.c
  122. $(CC) -c $(CFLAGS) $(SRC_DIR)/emlookup.c
  123. emlookup.$(SUF): $(TARGET_HOME)/h/em_flag.h
  124. emlookup.$(SUF): $(SRC_DIR)/expr.h
  125. emlookup.$(SUF): $(TARGET_HOME)/h/em_spec.h
  126. emlookup.$(SUF): $(TARGET_HOME)/config/local.h
  127. emlookup.$(SUF): $(SRC_DIR)/param.h
  128. expr.$(SUF): $(SRC_DIR)/expr.c
  129. $(CC) -c $(CFLAGS) $(SRC_DIR)/expr.c
  130. expr.$(SUF): $(SRC_DIR)/extern.h
  131. expr.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  132. expr.$(SUF): $(SRC_DIR)/regvar.h
  133. expr.$(SUF): $(SRC_DIR)/expr.h
  134. expr.$(SUF): $(SRC_DIR)/property.h
  135. expr.$(SUF): $(SRC_DIR)/cost.h
  136. expr.$(SUF): $(SRC_DIR)/token.h
  137. expr.$(SUF): $(SRC_DIR)/lookup.h
  138. expr.$(SUF): $(SRC_DIR)/reg.h
  139. expr.$(SUF): $(SRC_DIR)/set.h
  140. expr.$(SUF): $(TARGET_HOME)/h/em_spec.h
  141. expr.$(SUF): $(TARGET_HOME)/config/local.h
  142. expr.$(SUF): $(SRC_DIR)/param.h
  143. expr.$(SUF): $(SRC_DIR)/assert.h
  144. instruct.$(SUF): $(SRC_DIR)/instruct.c
  145. $(CC) -c $(CFLAGS) $(SRC_DIR)/instruct.c
  146. instruct.$(SUF): $(SRC_DIR)/extern.h
  147. instruct.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  148. instruct.$(SUF): $(SRC_DIR)/iocc.h
  149. instruct.$(SUF): $(SRC_DIR)/expr.h
  150. instruct.$(SUF): $(SRC_DIR)/set.h
  151. instruct.$(SUF): $(SRC_DIR)/varinfo.h
  152. instruct.$(SUF): $(SRC_DIR)/pseudo.h
  153. instruct.$(SUF): $(SRC_DIR)/cost.h
  154. instruct.$(SUF): $(SRC_DIR)/instruct.h
  155. instruct.$(SUF): $(TARGET_HOME)/h/em_spec.h
  156. instruct.$(SUF): $(TARGET_HOME)/config/local.h
  157. instruct.$(SUF): $(SRC_DIR)/param.h
  158. iocc.$(SUF): $(SRC_DIR)/iocc.c
  159. $(CC) -c $(CFLAGS) $(SRC_DIR)/iocc.c
  160. iocc.$(SUF): $(SRC_DIR)/extern.h
  161. iocc.$(SUF): $(SRC_DIR)/regvar.h
  162. iocc.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  163. iocc.$(SUF): $(SRC_DIR)/iocc.h
  164. iocc.$(SUF): $(SRC_DIR)/property.h
  165. iocc.$(SUF): $(SRC_DIR)/cost.h
  166. iocc.$(SUF): $(SRC_DIR)/token.h
  167. iocc.$(SUF): $(SRC_DIR)/lookup.h
  168. iocc.$(SUF): $(SRC_DIR)/expr.h
  169. iocc.$(SUF): $(SRC_DIR)/set.h
  170. iocc.$(SUF): $(TARGET_HOME)/h/em_spec.h
  171. iocc.$(SUF): $(TARGET_HOME)/config/local.h
  172. iocc.$(SUF): $(SRC_DIR)/param.h
  173. iocc.$(SUF): $(SRC_DIR)/assert.h
  174. lookup.$(SUF): $(SRC_DIR)/lookup.c
  175. $(CC) -c $(CFLAGS) $(SRC_DIR)/lookup.c
  176. lookup.$(SUF): $(SRC_DIR)/lookup.h
  177. lookup.$(SUF): $(TARGET_HOME)/h/em_spec.h
  178. lookup.$(SUF): $(TARGET_HOME)/config/local.h
  179. lookup.$(SUF): $(SRC_DIR)/param.h
  180. lookup.$(SUF): $(SRC_DIR)/assert.h
  181. output.$(SUF): $(SRC_DIR)/output.c
  182. $(CC) -c $(CFLAGS) $(SRC_DIR)/output.c
  183. output.$(SUF): $(SRC_DIR)/extern.h
  184. output.$(SUF): $(SRC_DIR)/regvar.h
  185. output.$(SUF): $(SRC_DIR)/pseudo.h
  186. output.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  187. output.$(SUF): $(SRC_DIR)/lookup.h
  188. output.$(SUF): $(SRC_DIR)/instruct.h
  189. output.$(SUF): $(SRC_DIR)/set.h
  190. output.$(SUF): $(SRC_DIR)/cost.h
  191. output.$(SUF): $(SRC_DIR)/token.h
  192. output.$(SUF): $(SRC_DIR)/property.h
  193. output.$(SUF): $(SRC_DIR)/reg.h
  194. output.$(SUF): $(TARGET_HOME)/h/em_spec.h
  195. output.$(SUF): $(TARGET_HOME)/config/local.h
  196. output.$(SUF): $(SRC_DIR)/param.h
  197. output.$(SUF): $(SRC_DIR)/varinfo.h
  198. output.$(SUF): $(SRC_DIR)/assert.h
  199. set.$(SUF): $(SRC_DIR)/set.c
  200. $(CC) -c $(CFLAGS) $(SRC_DIR)/set.c
  201. set.$(SUF): $(SRC_DIR)/extern.h
  202. set.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  203. set.$(SUF): $(SRC_DIR)/reg.h
  204. set.$(SUF): $(SRC_DIR)/lookup.h
  205. set.$(SUF): $(SRC_DIR)/cost.h
  206. set.$(SUF): $(SRC_DIR)/token.h
  207. set.$(SUF): $(SRC_DIR)/set.h
  208. set.$(SUF): $(SRC_DIR)/property.h
  209. set.$(SUF): $(TARGET_HOME)/h/em_spec.h
  210. set.$(SUF): $(TARGET_HOME)/config/local.h
  211. set.$(SUF): $(SRC_DIR)/param.h
  212. strlookup.$(SUF): $(SRC_DIR)/strlookup.c
  213. $(CC) -c $(CFLAGS) $(SRC_DIR)/strlookup.c
  214. strlookup.$(SUF): $(TARGET_HOME)/h/em_spec.h
  215. strlookup.$(SUF): $(TARGET_HOME)/config/local.h
  216. strlookup.$(SUF): $(SRC_DIR)/param.h
  217. var.$(SUF): $(SRC_DIR)/var.c
  218. $(CC) -c $(CFLAGS) $(SRC_DIR)/var.c
  219. var.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
  220. var.$(SUF): $(SRC_DIR)/lookup.h
  221. var.$(SUF): $(SRC_DIR)/instruct.h
  222. var.$(SUF): $(SRC_DIR)/set.h
  223. var.$(SUF): $(SRC_DIR)/cost.h
  224. var.$(SUF): $(SRC_DIR)/token.h
  225. var.$(SUF): $(SRC_DIR)/property.h
  226. var.$(SUF): $(SRC_DIR)/reg.h
  227. var.$(SUF): $(TARGET_HOME)/h/em_spec.h
  228. var.$(SUF): $(TARGET_HOME)/config/local.h
  229. var.$(SUF): $(SRC_DIR)/param.h
  230. hall.$(SUF): $(SRC_DIR)/hall.c
  231. $(CC) -c $(CFLAGS) $(SRC_DIR)/hall.c
  232. hall.$(SUF): $(SRC_DIR)/set.h
  233. hall.$(SUF): $(TARGET_HOME)/h/em_spec.h
  234. hall.$(SUF): $(TARGET_HOME)/config/local.h
  235. hall.$(SUF): $(SRC_DIR)/param.h
  236. hall.$(SUF): $(SRC_DIR)/assert.h