proto.make 6.3 KB

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