Makefile 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. TOPDIR=../..
  2. include $(TOPDIR)/make.inc
  3. # Unix makefile: see README.
  4. # For C++, first "make hadd".
  5. # If your compiler does not recognize ANSI C, add
  6. # -DKR_headers
  7. # to the CFLAGS = line below.
  8. # On Sun and other BSD systems that do not provide an ANSI sprintf, add
  9. # -DUSE_STRLEN
  10. # to the CFLAGS = line below.
  11. # On Linux systems, add
  12. # -DNON_UNIX_STDIO
  13. # to the CFLAGS = line below. For libf2c.so under Linux, also add
  14. # -fPIC
  15. # to the CFLAGS = line below.
  16. .SUFFIXES: .c .o
  17. # compile, then strip unnecessary symbols
  18. .c.o:
  19. $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
  20. $(LD) -r -x -o $*.xxx $*.o
  21. mv $*.xxx $*.o
  22. ## Under Solaris (and other systems that do not understand ld -x),
  23. ## omit -x in the ld line above.
  24. ## If your system does not have the ld command, comment out
  25. ## or remove both the ld and mv lines above.
  26. MISC = f77vers.o i77vers.o main.o s_rnge.o abort_.o exit_.o getarg_.o iargc_.o\
  27. getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o ctype.o\
  28. derf_.o derfc_.o erf_.o erfc_.o sig_die.o uninit.o
  29. POW = pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o
  30. CX = c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o
  31. DCX = z_abs.o z_cos.o z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o
  32. REAL = r_abs.o r_acos.o r_asin.o r_atan.o r_atn2.o r_cnjg.o r_cos.o\
  33. r_cosh.o r_dim.o r_exp.o r_imag.o r_int.o\
  34. r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o\
  35. r_sin.o r_sinh.o r_sqrt.o r_tan.o r_tanh.o
  36. DBL = d_abs.o d_acos.o d_asin.o d_atan.o d_atn2.o\
  37. d_cnjg.o d_cos.o d_cosh.o d_dim.o d_exp.o\
  38. d_imag.o d_int.o d_lg10.o d_log.o d_mod.o\
  39. d_nint.o d_prod.o d_sign.o d_sin.o d_sinh.o\
  40. d_sqrt.o d_tan.o d_tanh.o
  41. INT = i_abs.o i_dim.o i_dnnt.o i_indx.o i_len.o i_len_trim.o i_mod.o i_nint.o i_sign.o\
  42. lbitbits.o lbitshft.o i_ceiling.o
  43. HALF = h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o h_sign.o
  44. CMP = l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o
  45. EFL = ef1asc_.o ef1cmc_.o
  46. CHAR = f77_aloc.o s_cat.o s_cmp.o s_copy.o
  47. I77 = backspac.o close.o dfe.o dolio.o due.o endfile.o err.o\
  48. fmt.o fmtlib.o ftell_.o iio.o ilnw.o inquire.o lread.o lwrite.o\
  49. open.o rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o\
  50. typesize.o uio.o util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o
  51. QINT = pow_qq.o qbitbits.o qbitshft.o ftell64_.o
  52. TIME = dtime_.o etime_.o
  53. # If you get an error compiling dtime_.c or etime_.c, try adding
  54. # -DUSE_CLOCK to the CFLAGS assignment above; if that does not work,
  55. # omit $(TIME) from OFILES = assignment below.
  56. # To get signed zeros in write statements on IEEE-arithmetic systems,
  57. # add -DSIGNED_ZEROS to the CFLAGS assignment below and add signbit.o
  58. # to the end of the OFILES = assignment below.
  59. # For INTEGER*8 support (which requires system-dependent adjustments to
  60. # f2c.h), add $(QINT) to the OFILES = assignment below...
  61. OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
  62. $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
  63. all: f2c.h signal1.h sysdep1.h libminf2c.a
  64. libminf2c.a: $(OFILES)
  65. $(ARCH) $(ARCHFLAGS) $(F2CLIB) $?
  66. $(RANLIB) $(F2CLIB)
  67. ## Shared-library variant: the following rule works on Linux
  68. ## systems. Details are system-dependent. Under Linux, -fPIC
  69. ## must appear in the CFLAGS assignment when making libf2c.so.
  70. ## Under Solaris, use -Kpic in CFLAGS and use "ld -G" instead
  71. ## of "cc -shared".
  72. libf2c.so: $(OFILES)
  73. $(CC) -shared -o libf2c.so $(OFILES)
  74. ### If your system lacks ranlib, you don't need it; see README.
  75. f77vers.o: f77vers.c
  76. $(CC) -c f77vers.c
  77. i77vers.o: i77vers.c
  78. $(CC) -c i77vers.c
  79. # To get an "f2c.h" for use with "f2c -C++", first "make hadd"
  80. hadd: f2c.h0 f2ch.add
  81. cat f2c.h0 f2ch.add >f2c.h
  82. # For use with "f2c" and "f2c -A":
  83. f2c.h: f2c.h0
  84. cp f2c.h0 f2c.h
  85. # You may need to adjust signal1.h and sysdep1.h suitably for your system...
  86. signal1.h: signal1.h0
  87. cp signal1.h0 signal1.h
  88. sysdep1.h: sysdep1.h0
  89. cp sysdep1.h0 sysdep1.h
  90. # If your system lacks onexit() and you are not using an
  91. # ANSI C compiler, then you should uncomment the following
  92. # two lines (for compiling main.o):
  93. #main.o: main.c
  94. # $(CC) -c -DNO_ONEXIT -DSkip_f2c_Undefs main.c
  95. # On at least some Sun systems, it is more appropriate to
  96. # uncomment the following two lines:
  97. #main.o: main.c
  98. # $(CC) -c -Donexit=on_exit -DSkip_f2c_Undefs main.c
  99. clean:
  100. rm -f libminf2c.a *.o arith.h signal1.h sysdep1.h
  101. backspac.o: fio.h
  102. close.o: fio.h
  103. dfe.o: fio.h
  104. dfe.o: fmt.h
  105. due.o: fio.h
  106. endfile.o: fio.h rawio.h
  107. err.o: fio.h rawio.h
  108. fmt.o: fio.h
  109. fmt.o: fmt.h
  110. iio.o: fio.h
  111. iio.o: fmt.h
  112. ilnw.o: fio.h
  113. ilnw.o: lio.h
  114. inquire.o: fio.h
  115. lread.o: fio.h
  116. lread.o: fmt.h
  117. lread.o: lio.h
  118. lread.o: fp.h
  119. lwrite.o: fio.h
  120. lwrite.o: fmt.h
  121. lwrite.o: lio.h
  122. open.o: fio.h rawio.h
  123. rdfmt.o: fio.h
  124. rdfmt.o: fmt.h
  125. rdfmt.o: fp.h
  126. rewind.o: fio.h
  127. rsfe.o: fio.h
  128. rsfe.o: fmt.h
  129. rsli.o: fio.h
  130. rsli.o: lio.h
  131. rsne.o: fio.h
  132. rsne.o: lio.h
  133. sfe.o: fio.h
  134. signbit.o: arith.h
  135. sue.o: fio.h
  136. uio.o: fio.h
  137. uninit.o: arith.h
  138. util.o: fio.h
  139. wref.o: fio.h
  140. wref.o: fmt.h
  141. wref.o: fp.h
  142. wrtfmt.o: fio.h
  143. wrtfmt.o: fmt.h
  144. wsfe.o: fio.h
  145. wsfe.o: fmt.h
  146. wsle.o: fio.h
  147. wsle.o: fmt.h
  148. wsle.o: lio.h
  149. wsne.o: fio.h
  150. wsne.o: lio.h
  151. xwsne.o: fio.h
  152. xwsne.o: lio.h
  153. xwsne.o: fmt.h
  154. main.o: signal1.h
  155. signal_.o: signal1.h
  156. s_paus.o: signal1.h
  157. err.o: sysdep1.h
  158. fio.h: sysdep1.h
  159. util.c: sysdep1.h
  160. arith.h: arithchk.c
  161. $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
  162. $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
  163. ./a.out >arith.h
  164. rm -f a.out arithchk.o
  165. check:
  166. xsum Notice README abort_.c arithchk.c backspac.c c_abs.c c_cos.c \
  167. c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c close.c comptry.bat \
  168. ctype.c ctype.h \
  169. d_abs.c d_acos.c d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c \
  170. d_dim.c d_exp.c d_imag.c d_int.c d_lg10.c d_log.c d_mod.c \
  171. d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c d_sqrt.c d_tan.c \
  172. d_tanh.c derf_.c derfc_.c dfe.c dolio.c dtime_.c due.c ef1asc_.c \
  173. ef1cmc_.c endfile.c erf_.c erfc_.c err.c etime_.c exit_.c f2c.h0 \
  174. f2ch.add f77_aloc.c f77vers.c fio.h fmt.c fmt.h fmtlib.c \
  175. fp.h ftell_.c ftell64_.c i_ceiling.c \
  176. getarg_.c getenv_.c h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c \
  177. h_mod.c h_nint.c h_sign.c hl_ge.c hl_gt.c hl_le.c hl_lt.c \
  178. i77vers.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_len_trim.c i_mod.c \
  179. i_nint.c i_sign.c iargc_.c iio.c ilnw.c inquire.c l_ge.c l_gt.c \
  180. l_le.c l_lt.c lbitbits.c lbitshft.c libf2c.lbc libf2c.sy lio.h \
  181. lread.c lwrite.c main.c makefile.sy makefile.u makefile.vc \
  182. makefile.wat math.hvc mkfile.plan9 open.c pow_ci.c pow_dd.c \
  183. pow_di.c pow_hh.c pow_ii.c pow_qq.c pow_ri.c pow_zi.c pow_zz.c \
  184. qbitbits.c qbitshft.c r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \
  185. r_cnjg.c r_cos.c r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c \
  186. r_log.c r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c \
  187. r_tan.c r_tanh.c rawio.h rdfmt.c rewind.c rsfe.c rsli.c rsne.c \
  188. s_cat.c s_cmp.c s_copy.c s_paus.c s_rnge.c s_stop.c scomptry.bat sfe.c \
  189. sig_die.c signal1.h0 signal_.c signbit.c sue.c sysdep1.h0 system_.c \
  190. typesize.c \
  191. uio.c uninit.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c xwsne.c \
  192. z_abs.c z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c >xsum1.out
  193. cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out