Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # $Header$
  2. EMHOME=../../..
  3. #preprocessor flags for table
  4. TABLEFLAGS=
  5. #cgg options
  6. CGGFLAGS=
  7. PREFLAGS=-I$(EMHOME)/h -I. -I$(EMHOME)/mach -I$(EMHOME)/modules/h -DNDEBUG
  8. PFLAGS=
  9. CFLAGS=$(PREFLAGS) $(PFLAGS) -O
  10. LDFLAGS=$(PFLAGS)
  11. LINTOPTS=-bx
  12. LIBS=$(EMHOME)/lib/em_data.a $(EMHOME)/modules/lib/libflt.a
  13. CDIR=$(EMHOME)/mach/proto/ncg
  14. CGG=$(EMHOME)/lib/ncgg
  15. CPP=$(EMHOME)/lib/cpp
  16. CFILES=$(CDIR)/codegen.c $(CDIR)/compute.c $(CDIR)/equiv.c $(CDIR)/fillem.c \
  17. $(CDIR)/gencode.c $(CDIR)/glosym.c $(CDIR)/label.c $(CDIR)/main.c \
  18. $(CDIR)/move.c $(CDIR)/nextem.c $(CDIR)/reg.c $(CDIR)/regvar.c \
  19. $(CDIR)/salloc.c $(CDIR)/state.c $(CDIR)/subr.c $(CDIR)/var.c
  20. OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o label.o \
  21. main.o move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
  22. all: tables.c
  23. make "EMHOME="$(EMHOME) cg
  24. cg: tables.o $(OFILES)
  25. $(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
  26. tables.o: tables.c
  27. $(CC) -c $(PREFLAGS) -I$(CDIR) tables.c
  28. codegen.o: $(CDIR)/codegen.c
  29. $(CC) -c $(CFLAGS) $(CDIR)/codegen.c
  30. compute.o: $(CDIR)/compute.c
  31. $(CC) -c $(CFLAGS) $(CDIR)/compute.c
  32. equiv.o: $(CDIR)/equiv.c
  33. $(CC) -c $(CFLAGS) $(CDIR)/equiv.c
  34. fillem.o: $(CDIR)/fillem.c
  35. $(CC) -c $(CFLAGS) $(CDIR)/fillem.c
  36. gencode.o: $(CDIR)/gencode.c
  37. $(CC) -c $(CFLAGS) $(CDIR)/gencode.c
  38. glosym.o: $(CDIR)/glosym.c
  39. $(CC) -c $(CFLAGS) $(CDIR)/glosym.c
  40. label.o: $(CDIR)/label.c
  41. $(CC) -c $(CFLAGS) $(CDIR)/label.c
  42. main.o: $(CDIR)/main.c
  43. $(CC) -c $(CFLAGS) $(CDIR)/main.c
  44. move.o: $(CDIR)/move.c
  45. $(CC) -c $(CFLAGS) $(CDIR)/move.c
  46. nextem.o: $(CDIR)/nextem.c
  47. $(CC) -c $(CFLAGS) $(CDIR)/nextem.c
  48. reg.o: $(CDIR)/reg.c
  49. $(CC) -c $(CFLAGS) $(CDIR)/reg.c
  50. regvar.o: $(CDIR)/regvar.c
  51. $(CC) -c $(CFLAGS) $(CDIR)/regvar.c
  52. salloc.o: $(CDIR)/salloc.c
  53. $(CC) -c $(CFLAGS) $(CDIR)/salloc.c
  54. state.o: $(CDIR)/state.c
  55. $(CC) -c $(CFLAGS) $(CDIR)/state.c
  56. subr.o: $(CDIR)/subr.c
  57. $(CC) -c $(CFLAGS) $(CDIR)/subr.c
  58. var.o: $(CDIR)/var.c
  59. $(CC) -c $(CFLAGS) $(CDIR)/var.c
  60. install: all
  61. $(EMHOME)/mach/install cg
  62. cmp: all
  63. -$(EMHOME)/mach/compare cg
  64. tables.c: table $(CGG)
  65. $(CPP) $(TABLEFLAGS) table | $(CGG) $(CGGFLAGS)
  66. -cmp tables.h tables.H || cp tables.H tables.h
  67. lint: $(CFILES) tables.c
  68. lint $(LINTOPTS) $(PREFLAGS) -I$(CDIR) $(CFILES) tables.c
  69. clean:
  70. rm -f *.o tables.c tables.h debug.out cg tables.H
  71. distr: tables.c
  72. rm -f tables1.c tables1.h
  73. cp tables.c tables1.c
  74. cp tables.h tables1.h
  75. chmod -w tables1.[ch]
  76. codegen.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  77. codegen.o: $(CDIR)/data.h
  78. codegen.o: $(CDIR)/equiv.h
  79. codegen.o: $(CDIR)/extern.h
  80. codegen.o: $(CDIR)/param.h
  81. codegen.o: $(CDIR)/result.h
  82. codegen.o: $(CDIR)/state.h
  83. codegen.o: tables.h
  84. codegen.o: $(CDIR)/types.h
  85. compute.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  86. compute.o: $(CDIR)/data.h
  87. compute.o: $(CDIR)/extern.h
  88. compute.o: $(CDIR)/glosym.h
  89. compute.o: $(CDIR)/label.h
  90. compute.o: $(CDIR)/param.h
  91. compute.o: $(CDIR)/result.h
  92. compute.o: tables.h
  93. compute.o: $(CDIR)/types.h
  94. equiv.o: $(CDIR)/assert.h
  95. equiv.o: $(CDIR)/data.h $(EMHOME)/h/cgg_cg.h
  96. equiv.o: $(CDIR)/equiv.h
  97. equiv.o: $(CDIR)/extern.h
  98. equiv.o: $(CDIR)/param.h
  99. equiv.o: $(CDIR)/result.h
  100. equiv.o: tables.h
  101. equiv.o: $(CDIR)/types.h
  102. fillem.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  103. fillem.o: $(CDIR)/data.h
  104. fillem.o: $(CDIR)/extern.h
  105. fillem.o: mach.c
  106. fillem.o: mach.h
  107. fillem.o: $(CDIR)/param.h
  108. fillem.o: $(CDIR)/regvar.h
  109. fillem.o: $(CDIR)/result.h
  110. fillem.o: tables.h
  111. fillem.o: $(CDIR)/types.h
  112. gencode.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  113. gencode.o: $(CDIR)/data.h
  114. gencode.o: $(CDIR)/extern.h
  115. gencode.o: $(CDIR)/param.h
  116. gencode.o: $(CDIR)/result.h
  117. gencode.o: tables.h
  118. gencode.o: $(CDIR)/types.h
  119. glosym.o: $(CDIR)/glosym.h
  120. glosym.o: $(CDIR)/param.h
  121. glosym.o: tables.h
  122. glosym.o: $(CDIR)/types.h
  123. label.o: $(CDIR)/label.h
  124. label.o: $(CDIR)/param.h
  125. label.o: tables.h
  126. label.o: $(CDIR)/types.h
  127. main.o: $(CDIR)/param.h
  128. main.o: tables.h
  129. move.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  130. move.o: $(CDIR)/data.h
  131. move.o: $(CDIR)/extern.h
  132. move.o: $(CDIR)/param.h
  133. move.o: $(CDIR)/result.h
  134. move.o: tables.h
  135. move.o: $(CDIR)/types.h
  136. nextem.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  137. nextem.o: $(CDIR)/data.h
  138. nextem.o: $(CDIR)/extern.h
  139. nextem.o: $(CDIR)/param.h
  140. nextem.o: $(CDIR)/result.h
  141. nextem.o: tables.h
  142. nextem.o: $(CDIR)/types.h
  143. reg.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  144. reg.o: $(CDIR)/data.h
  145. reg.o: $(CDIR)/extern.h
  146. reg.o: $(CDIR)/param.h
  147. reg.o: $(CDIR)/result.h
  148. reg.o: tables.h
  149. reg.o: $(CDIR)/types.h
  150. regvar.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  151. regvar.o: $(CDIR)/data.h
  152. regvar.o: $(CDIR)/extern.h
  153. regvar.o: $(CDIR)/param.h
  154. regvar.o: $(CDIR)/regvar.h
  155. regvar.o: $(CDIR)/result.h
  156. regvar.o: tables.h
  157. regvar.o: $(CDIR)/types.h
  158. salloc.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  159. salloc.o: $(CDIR)/data.h
  160. salloc.o: $(CDIR)/extern.h
  161. salloc.o: $(CDIR)/param.h
  162. salloc.o: $(CDIR)/result.h
  163. salloc.o: tables.h
  164. salloc.o: $(CDIR)/types.h
  165. state.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  166. state.o: $(CDIR)/data.h
  167. state.o: $(CDIR)/extern.h
  168. state.o: $(CDIR)/param.h
  169. state.o: $(CDIR)/result.h
  170. state.o: $(CDIR)/state.h
  171. state.o: tables.h
  172. state.o: $(CDIR)/types.h
  173. subr.o: $(CDIR)/assert.h $(EMHOME)/h/cgg_cg.h
  174. subr.o: $(CDIR)/data.h
  175. subr.o: $(CDIR)/extern.h
  176. subr.o: $(CDIR)/param.h
  177. subr.o: $(CDIR)/result.h
  178. subr.o: tables.h
  179. subr.o: $(CDIR)/types.h
  180. var.o: $(CDIR)/data.h $(EMHOME)/h/cgg_cg.h
  181. var.o: $(CDIR)/param.h
  182. var.o: $(CDIR)/result.h
  183. var.o: tables.h
  184. var.o: $(CDIR)/types.h