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