proto.make 6.4 KB

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