proto.make 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. # $Id$
  2. #PARAMS do not remove this line
  3. SRC_DIR = $(SRC_HOME)/util/ego/share
  4. EMH=$(TARGET_HOME)/h
  5. LDFLAGS=$(LDOPTIONS)
  6. CPPFLAGS=-DVERBOSE -DNOTCOMPACT -I$(EMH) -I$(SRC_DIR) -I.
  7. CFLAGS=$(CPPFLAGS) $(COPTIONS)
  8. UCFLAGS=$(CPPFLAGS) $(UCOPTIONS)
  9. ULDFLAGS=$(ULDOPTIONS)
  10. CFILES=\
  11. $(SRC_DIR)/debug.c \
  12. $(SRC_DIR)/global.c \
  13. $(SRC_DIR)/files.c \
  14. $(SRC_DIR)/go.c \
  15. $(SRC_DIR)/map.c \
  16. $(SRC_DIR)/aux.c \
  17. $(SRC_DIR)/get.c \
  18. $(SRC_DIR)/put.c \
  19. $(SRC_DIR)/alloc.c \
  20. $(SRC_DIR)/lset.c \
  21. $(SRC_DIR)/cset.c \
  22. $(SRC_DIR)/parser.c \
  23. $(SRC_DIR)/stack_chg.c \
  24. $(SRC_DIR)/locals.c \
  25. $(SRC_DIR)/init_glob.c
  26. SRC=\
  27. $(SRC_DIR)/types.h \
  28. $(SRC_DIR)/def.h \
  29. $(SRC_DIR)/debug.h \
  30. $(SRC_DIR)/global.h \
  31. $(SRC_DIR)/files.h \
  32. $(SRC_DIR)/go.h \
  33. $(SRC_DIR)/map.h \
  34. $(SRC_DIR)/aux.h \
  35. $(SRC_DIR)/get.h \
  36. $(SRC_DIR)/put.h \
  37. $(SRC_DIR)/alloc.h\
  38. $(SRC_DIR)/lset.h \
  39. $(SRC_DIR)/cset.h \
  40. $(SRC_DIR)/parser.h \
  41. $(SRC_DIR)/stack_chg.h \
  42. $(SRC_DIR)/locals.h \
  43. $(SRC_DIR)/init_glob.h \
  44. $(CFILES)
  45. PRFILES=$(SRC)
  46. OBS = alloc.$(SUF) cset.$(SUF) debug.$(SUF) \
  47. files.$(SUF) go.$(SUF) global.$(SUF) lset.$(SUF) map.$(SUF) \
  48. parser.$(SUF) get.$(SUF) put.$(SUF) aux.$(SUF) stack_chg.$(SUF) \
  49. locals.$(SUF) init_glob.$(SUF)
  50. all: classdefs.h $(SRC_DIR)/pop_push.h $(OBS)
  51. $(AR) r share.$(LIBSUF) $(OBS)
  52. $(RANLIB) share.$(LIBSUF)
  53. install: all
  54. -mkdir $(TARGET_HOME)/lib.bin/ego
  55. cp share.$(LIBSUF) $(TARGET_HOME)/lib.bin/ego/share.$(LIBSUF)
  56. $(RANLIB) $(TARGET_HOME)/lib.bin/ego/share.$(LIBSUF)
  57. cp classdefs.h $(TARGET_HOME)/lib.bin/ego/classdefs.h
  58. cp $(SRC_DIR)/pop_push.h $(TARGET_HOME)/lib.bin/ego/pop_push.h
  59. cmp: all
  60. -cmp share.$(LIBSUF) $(TARGET_HOME)/lib.bin/ego/share.$(LIBSUF)
  61. -cmp classdefs.h $(TARGET_HOME)/lib.bin/ego/classdefs.h
  62. -cmp $(SRC_DIR)/pop_push.h $(TARGET_HOME)/lib.bin/ego/pop_push.h
  63. classdefs.h: \
  64. makeclassdef \
  65. $(SRC_DIR)/cldefs.src
  66. makeclassdef $(EMH)/em_mnem.h $(SRC_DIR)/cldefs.src > classdefs.h
  67. makeclassdef: \
  68. $(SRC_DIR)/makecldef.c
  69. $(UCC) $(UCFLAGS) $(ULDFLAGS) -o makeclassdef $(SRC_DIR)/makecldef.c
  70. $(SRC_DIR)/pop_push.h: \
  71. $(SRC_HOME)/etc/em_table $(SRC_DIR)/pop_push.awk
  72. awk -f $(SRC_DIR)/pop_push.awk < $(SRC_HOME)/etc/em_table > $(SRC_DIR)/pop_push.h
  73. show: \
  74. $(SRC_DIR)/show.c
  75. $(UCC) $(UCFLAGS) $(ULDFLAGS) -o show $(SRC_DIR)/show.c $(UTIL_HOME)/lib.bin/em_data.$(ULIBSUF)
  76. pr:
  77. @pr $(PRFILES)
  78. opr:
  79. make pr | opr
  80. clean:
  81. rm -f makeclassdef classdefs.h *.$(SUF) Out out nohup.out *.$(LIBSUF)
  82. lintlib: classdefs.h
  83. -mkdir $(TARGET_HOME)/lib.bin/ego
  84. $(MK_LINT_LIB) share $(TARGET_HOME)/lib.bin/ego $(CPPFLAGS) $(CFILES)
  85. depend: $(SRC_DIR)/pop_push.h classdefs.h
  86. rm_deps Makefile >Makefile.new
  87. for i in $(CFILES) ; do \
  88. echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \
  89. echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
  90. $(UTIL_HOME)/lib.bin/cpp -d $(CPPFLAGS) $$i | sed "s/^/`basename $$i .c`.$$(SUF): /" >> Makefile.new ; \
  91. done
  92. mv Makefile Makefile.old
  93. mv Makefile.new Makefile
  94. # do not remove the next line.
  95. #DEPENDENCIES
  96. debug.$(SUF): $(SRC_DIR)/debug.c
  97. $(CC) -c $(CFLAGS) $(SRC_DIR)/debug.c
  98. debug.$(SUF): $(SRC_DIR)/global.h
  99. debug.$(SUF): $(SRC_DIR)/debug.h
  100. debug.$(SUF): $(SRC_DIR)/def.h
  101. debug.$(SUF): $(SRC_DIR)/types.h
  102. debug.$(SUF): $(EMH)/em_spec.h
  103. global.$(SUF): $(SRC_DIR)/global.c
  104. $(CC) -c $(CFLAGS) $(SRC_DIR)/global.c
  105. global.$(SUF): $(SRC_DIR)/types.h
  106. files.$(SUF): $(SRC_DIR)/files.c
  107. $(CC) -c $(CFLAGS) $(SRC_DIR)/files.c
  108. go.$(SUF): $(SRC_DIR)/go.c
  109. $(CC) -c $(CFLAGS) $(SRC_DIR)/go.c
  110. go.$(SUF): $(SRC_DIR)/go.h
  111. go.$(SUF): $(SRC_DIR)/alloc.h
  112. go.$(SUF): $(SRC_DIR)/map.h
  113. go.$(SUF): $(SRC_DIR)/lset.h
  114. go.$(SUF): $(SRC_DIR)/put.h
  115. go.$(SUF): $(SRC_DIR)/get.h
  116. go.$(SUF): $(SRC_DIR)/files.h
  117. go.$(SUF): $(SRC_DIR)/global.h
  118. go.$(SUF): $(SRC_DIR)/debug.h
  119. go.$(SUF): $(SRC_DIR)/types.h
  120. map.$(SUF): $(SRC_DIR)/map.c
  121. $(CC) -c $(CFLAGS) $(SRC_DIR)/map.c
  122. map.$(SUF): $(SRC_DIR)/map.h
  123. map.$(SUF): $(SRC_DIR)/types.h
  124. aux.$(SUF): $(SRC_DIR)/aux.c
  125. $(CC) -c $(CFLAGS) $(SRC_DIR)/aux.c
  126. aux.$(SUF): $(SRC_DIR)/lset.h
  127. aux.$(SUF): $(SRC_DIR)/map.h
  128. aux.$(SUF): $(SRC_DIR)/aux.h
  129. aux.$(SUF): $(SRC_DIR)/alloc.h
  130. aux.$(SUF): $(SRC_DIR)/global.h
  131. aux.$(SUF): $(SRC_DIR)/debug.h
  132. aux.$(SUF): $(SRC_DIR)/types.h
  133. aux.$(SUF): $(EMH)/em_pseu.h
  134. aux.$(SUF): $(EMH)/em_mes.h
  135. get.$(SUF): $(SRC_DIR)/get.c
  136. $(CC) -c $(CFLAGS) $(SRC_DIR)/get.c
  137. get.$(SUF): $(SRC_DIR)/aux.h
  138. get.$(SUF): $(SRC_DIR)/map.h
  139. get.$(SUF): $(SRC_DIR)/alloc.h
  140. get.$(SUF): $(SRC_DIR)/get.h
  141. get.$(SUF): $(SRC_DIR)/cset.h
  142. get.$(SUF): $(SRC_DIR)/lset.h
  143. get.$(SUF): $(SRC_DIR)/global.h
  144. get.$(SUF): $(SRC_DIR)/debug.h
  145. get.$(SUF): $(SRC_DIR)/def.h
  146. get.$(SUF): $(SRC_DIR)/types.h
  147. get.$(SUF): $(EMH)/em_mes.h
  148. get.$(SUF): $(EMH)/em_pseu.h
  149. get.$(SUF): $(EMH)/em_mnem.h
  150. get.$(SUF): $(EMH)/em_spec.h
  151. put.$(SUF): $(SRC_DIR)/put.c
  152. $(CC) -c $(CFLAGS) $(SRC_DIR)/put.c
  153. put.$(SUF): $(SRC_DIR)/put.h
  154. put.$(SUF): $(SRC_DIR)/alloc.h
  155. put.$(SUF): $(SRC_DIR)/lset.h
  156. put.$(SUF): $(SRC_DIR)/map.h
  157. put.$(SUF): $(SRC_DIR)/def.h
  158. put.$(SUF): $(SRC_DIR)/debug.h
  159. put.$(SUF): $(SRC_DIR)/global.h
  160. put.$(SUF): $(SRC_DIR)/types.h
  161. put.$(SUF): $(EMH)/em_spec.h
  162. put.$(SUF): $(EMH)/em_pseu.h
  163. alloc.$(SUF): $(SRC_DIR)/alloc.c
  164. $(CC) -c $(CFLAGS) $(SRC_DIR)/alloc.c
  165. alloc.$(SUF): $(SRC_DIR)/alloc.h
  166. alloc.$(SUF): $(SRC_DIR)/debug.h
  167. alloc.$(SUF): $(SRC_DIR)/types.h
  168. lset.$(SUF): $(SRC_DIR)/lset.c
  169. $(CC) -c $(CFLAGS) $(SRC_DIR)/lset.c
  170. lset.$(SUF): $(SRC_DIR)/debug.h
  171. lset.$(SUF): $(SRC_DIR)/alloc.h
  172. lset.$(SUF): $(SRC_DIR)/lset.h
  173. lset.$(SUF): $(SRC_DIR)/types.h
  174. cset.$(SUF): $(SRC_DIR)/cset.c
  175. $(CC) -c $(CFLAGS) $(SRC_DIR)/cset.c
  176. cset.$(SUF): $(SRC_DIR)/global.h
  177. cset.$(SUF): $(SRC_DIR)/debug.h
  178. cset.$(SUF): $(SRC_DIR)/alloc.h
  179. cset.$(SUF): $(SRC_DIR)/cset.h
  180. cset.$(SUF): $(SRC_DIR)/types.h
  181. parser.$(SUF): $(SRC_DIR)/parser.c
  182. $(CC) -c $(CFLAGS) $(SRC_DIR)/parser.c
  183. parser.$(SUF): ./classdefs.h
  184. parser.$(SUF): $(SRC_DIR)/aux.h
  185. parser.$(SUF): $(SRC_DIR)/lset.h
  186. parser.$(SUF): $(SRC_DIR)/global.h
  187. parser.$(SUF): $(SRC_DIR)/alloc.h
  188. parser.$(SUF): $(SRC_DIR)/debug.h
  189. parser.$(SUF): $(SRC_DIR)/types.h
  190. parser.$(SUF): $(EMH)/em_mnem.h
  191. parser.$(SUF): $(EMH)/em_spec.h
  192. stack_chg.$(SUF): $(SRC_DIR)/stack_chg.c
  193. $(CC) -c $(CFLAGS) $(SRC_DIR)/stack_chg.c
  194. stack_chg.$(SUF): $(SRC_DIR)/pop_push.h
  195. stack_chg.$(SUF): $(SRC_DIR)/global.h
  196. stack_chg.$(SUF): $(SRC_DIR)/debug.h
  197. stack_chg.$(SUF): $(SRC_DIR)/types.h
  198. stack_chg.$(SUF): $(EMH)/em_mnem.h
  199. stack_chg.$(SUF): $(EMH)/em_spec.h
  200. locals.$(SUF): $(SRC_DIR)/locals.c
  201. $(CC) -c $(CFLAGS) $(SRC_DIR)/locals.c
  202. locals.$(SUF): $(SRC_DIR)/locals.h
  203. locals.$(SUF): $(SRC_DIR)/alloc.h
  204. locals.$(SUF): $(SRC_DIR)/aux.h
  205. locals.$(SUF): $(SRC_DIR)/get.h
  206. locals.$(SUF): $(SRC_DIR)/def.h
  207. locals.$(SUF): $(SRC_DIR)/cset.h
  208. locals.$(SUF): $(SRC_DIR)/lset.h
  209. locals.$(SUF): $(SRC_DIR)/global.h
  210. locals.$(SUF): $(SRC_DIR)/debug.h
  211. locals.$(SUF): $(SRC_DIR)/types.h
  212. locals.$(SUF): $(EMH)/em_mes.h
  213. locals.$(SUF): $(EMH)/em_pseu.h
  214. locals.$(SUF): $(EMH)/em_spec.h
  215. locals.$(SUF): $(EMH)/em_mnem.h
  216. init_glob.$(SUF): $(SRC_DIR)/init_glob.c
  217. $(CC) -c $(CFLAGS) $(SRC_DIR)/init_glob.c
  218. init_glob.$(SUF): $(SRC_DIR)/map.h
  219. init_glob.$(SUF): $(SRC_DIR)/alloc.h
  220. init_glob.$(SUF): $(SRC_DIR)/global.h
  221. init_glob.$(SUF): $(SRC_DIR)/debug.h
  222. init_glob.$(SUF): $(SRC_DIR)/types.h