Makefile 4.8 KB

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