Category : C Source Code
Archive   : F2CSRC.ZIP
Filename : MAKEFILE

 
Output of file : MAKEFILE contained in archive : F2CSRC.ZIP

##############################################
# f2c Makefile for Microsoft C under MSDOS #
# #
# Tested with MSC 5.1 and Dmake 3.7 #
# #
# sources obtained from research.att.com #
##############################################

CC = %cl
#for MSC5.1, -FPi87 is 80x87 inline, -FPi is inline emulation
#FLOAT = -FPi
CFLAGS = -A$(MODEL) -Ox -c -DSkip_f2c_Undefs -I.. $(FLOAT)

RM = %rm -f
MAKE = %dmake

TARGET_LIBS = sf2cf.lib lf2cf.lib
MISC = main.obj s_rnge.obj abort_.obj getarg_.obj iargc_.obj getenv_.obj\
signal_.obj s_stop.obj s_paus.obj system_.obj cabs.obj\
derf_.obj derfc_.obj erf_.obj erfc_.obj sig_die.obj
POW = pow_ci.obj pow_dd.obj pow_di.obj pow_hh.obj pow_ii.obj pow_ri.obj pow_zi.obj pow_zz.obj
CX = c_abs.obj c_cos.obj c_div.obj c_exp.obj c_log.obj c_sin.obj c_sqrt.obj
DCX = z_abs.obj z_cos.obj z_div.obj z_exp.obj z_log.obj z_sin.obj z_sqrt.obj
REAL = r_abs.obj r_acos.obj r_asin.obj r_atan.obj r_atn2.obj r_cnjg.obj r_cos.obj\
r_cosh.obj r_dim.obj r_exp.obj r_imag.obj r_int.obj\
r_lg10.obj r_log.obj r_mod.obj r_nint.obj r_sign.obj\
r_sin.obj r_sinh.obj r_sqrt.obj r_tan.obj r_tanh.obj
DBL = d_abs.obj d_acos.obj d_asin.obj d_atan.obj d_atn2.obj\
d_cnjg.obj d_cos.obj d_cosh.obj d_dim.obj d_exp.obj\
d_imag.obj d_int.obj d_lg10.obj d_log.obj d_mod.obj\
d_nint.obj d_prod.obj d_sign.obj d_sin.obj d_sinh.obj\
d_sqrt.obj d_tan.obj d_tanh.obj
INT = i_abs.obj i_dim.obj i_dnnt.obj i_indx.obj i_len.obj i_mod.obj i_nint.obj i_sign.obj
HALF = h_abs.obj h_dim.obj h_dnnt.obj h_indx.obj h_len.obj h_mod.obj h_nint.obj h_sign.obj
CMP = l_ge.obj l_gt.obj l_le.obj l_lt.obj hl_ge.obj hl_gt.obj hl_le.obj hl_lt.obj
EFL = ef1asc_.obj ef1cmc_.obj
CHAR = s_cat.obj s_cmp.obj s_copy.obj

all: $(TARGET_LIBS)

libf77.lib: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
$(HALF) $(CMP) $(EFL) $(CHAR)
$(RM) libf77.lib
lib @libfile
$(RM) *.obj
$(RM) *.obj

sf2cf.lib:
$(MAKE) MODEL=S libf77.lib
+ren libf77.lib [email protected]

lf2cf.lib:
$(MAKE) MODEL=L libf77.lib
+ren libf77.lib [email protected]

Version.obj: Version.c
$(CC) -c Version.c

# If your system lacks onexit() and you are not using an
# ANSI C compiler, then you should uncomment the following
# two lines (for compiling main.o):
#main.obj: main.c
# $(CC) $(CFLAGS) -DNO_ONEXIT main.c
# On at least some Sun systems, it is more appropriate to
# uncomment the following two lines:
#main.o: main.c
# $(CC) -c -Donexit=on_exit -DSkip_f2c_Undefs main.c

install: libF77.a
mv libF77.a /usr/lib

clean:
rm -f libF77.a *.obj

check:
xsum README Version.c abort_.c c_abs.c c_cos.c c_div.c \
c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c d_abs.c d_acos.c \
d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c d_dim.c \
d_exp.c d_imag.c d_int.c d_lg10.c d_log.c d_mod.c d_nint.c \
d_prod.c d_sign.c d_sin.c d_sinh.c d_sqrt.c d_tan.c d_tanh.c \
derf_.c derfc_.c ef1asc_.c ef1cmc_.c erf_.c erfc_.c getarg_.c \
getenv_.c h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c \
h_nint.c h_sign.c hl_ge.c hl_gt.c hl_le.c hl_lt.c i_abs.c \
i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c i_sign.c \
iargc_.c l_ge.c l_gt.c l_le.c l_lt.c main.c makefile pow_ci.c \
pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c pow_zz.c \
r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c \
r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c r_log.c \
r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c r_tan.c \
r_tanh.c s_cat.c s_cmp.c s_copy.c s_paus.c s_rnge.c s_stop.c \
signal_.c system_.c z_abs.c z_cos.c z_div.c z_exp.c z_log.c \
z_sin.c z_sqrt.c >zap
cmp zap libF77.xsum && rm zap || diff libF77.xsum zap












########################################################
# Makefile for libI77 for Microsoft C under MSDOS #
# Tested with MSC 5.1 and GNU Make 3.58 #
# sources from research.att.com #
# #
########################################################

CC = %cl
MAKE = %dmake
#FLOAT = -FPi
CFLAGS = -A$(MODEL) -Ox -DSkip_f2c_Undefs $(FLOAT) -I.. -c

RM = rm -f
REN = +rename

TARGETS = sf2ci.lib lf2ci.lib
OBJ = backspac.obj close.obj dfe.obj dolio.obj due.obj endfile.obj err.obj \
fmt.obj fmtlib.obj iio.obj ilnw.obj inquire.obj lread.obj lwrite.obj open.obj \
rdfmt.obj rewind.obj rsfe.obj rsli.obj rsne.obj sfe.obj sue.obj typesize.obj uio.obj \
util.obj wref.obj wrtfmt.obj wsfe.obj wsle.obj wsne.obj xwsne.obj

all: $(TARGETS)

libI77.lib: $(OBJ)
$(RM) libi77.lib
lib @libfile
$(RM) *.obj

sf2ci.lib:
$(MAKE) MODEL=S libI77.lib
$(REN) libi77.lib [email protected]

lf2ci.lib:
$(MAKE) MODEL=L libI77.lib
$(REN) libi77.lib [email protected]


lio.obj: lio.h

Version.obj: Version.c
$(CC) -c Version.c


clean:
rm -f $(OBJ) libI77.a

clobber: clean
rm -f libI77.a

backspace.obj: fio.h
close.obj: fio.h
dfe.obj: fio.h
dfe.obj: fmt.h
due.obj: fio.h
endfile.obj: fio.h
err.obj: fio.h
fmt.obj: fio.h
fmt.obj: fmt.h
iio.obj: fio.h
iio.obj: fmt.h
ilnw.obj: fio.h
ilnw.obj: lio.h
inquire.obj: fio.h
lread.obj: fio.h
lread.obj: fmt.h
lread.obj: lio.h
lread.obj: fp.h
lwrite.obj: fio.h
lwrite.obj: fmt.h
lwrite.obj: lio.h
open.obj: fio.h
rdfmt.obj: fio.h
rdfmt.obj: fmt.h
rdfmt.obj: fp.h
rewind.obj: fio.h
rsfe.obj: fio.h
rsfe.obj: fmt.h
rsli.obj: fio.h
rsli.obj: lio.h
rsne.obj: fio.h
rsne.obj: lio.h
sfe.obj: fio.h
sue.obj: fio.h
uio.obj: fio.h
util.obj: fio.h
wref.obj: fio.h
wref.obj: fmt.h
wref.obj: fp.h
wrtfmt.obj: fio.h
wrtfmt.obj: fmt.h
wsfe.obj: fio.h
wsfe.obj: fmt.h
wsle.obj: fio.h
wsle.obj: fmt.h
wsle.obj: lio.h
wsne.obj: fio.h
wsne.obj: lio.h
xwsne.obj: fio.h
xwsne.obj: lio.h
xwsne.obj: fmt.h

check:
xsum README Version.c backspace.c close.c dfe.c dolio.c due.c \
endfile.c err.c fio.h fmt.c fmt.h fmtlib.c fp.h iio.c ilnw.c \
inquire.c lio.h lread.c lwrite.c makefile open.c rdfmt.c \
rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c typesize.c uio.c \
util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c xwsne.c >zap
cmp zap libI77.xsum && rm zap || diff libI77.xsum zap
# Makefile for f2c, a Fortran 77 to C converter
#
# tested with MSC 5.1 and Dmake 3.7

YACC = bison
YFLAGS = -y

RM = rm
CC = %cl
CFLAGS = -Ox -AL -c

OBJECTSd = main.obj init.obj gram.obj lex.obj proc.obj equiv.obj \
data.obj format.obj expr.obj exec.obj intr.obj io.obj misc.obj \
error.obj mem.obj names.obj output.obj p1output.obj pread.obj \
put.obj putpcc.obj vax.obj formatdata.obj \
parse_args.obj niceprintf.obj cds.obj sysdep.obj version.obj

OBJECTS = $(OBJECTSd)
#malloc..obj

all: f2c

f2c: $(OBJECTS)
link @linkfile
fixstack f2c 4096
lzexe f2c
# $(CC) $(LDFLAGS) $(OBJECTS) -o f2c
# size f2c

gram.c: gram.head gram.dcl gram.expr gram.exc gram.io defs.h tokdefs.h
sed -e `s/#define/%token/` tokdefs.h > gram.in
cat gram.head gram.dcl gram.expr gram.exc gram.io >> gram.in
$(YACC) $(YFLAGS) gram.in
@echo (expect 4 shift/reduce)
awk -f unline.awk y_tab.c >gram.c
$(RM) gram.in y_tab.c

$(OBJECTSd): defs.h ftypes.h defines.h machdefs.h sysdep.h

tokdefs.h: tokens
awk -f tokenize.awk tokens > tokdefs.h
# grep -n . tokdefs.h

cds.obj: sysdep.h
exec.obj: p1defs.h names.h
expr.obj: output.h niceprintf.h names.h
format.obj: p1defs.h format.h output.h niceprintf.h names.h iob.h
formatdata.obj: format.h output.h niceprintf.h names.h
gram.obj: gram.c p1defs.h
$(CC) $(CFLAGS) gram.c
init.obj: output.h niceprintf.h iob.h
intr.obj: names.h
io.obj: names.h iob.h
lex.obj : tokdefs.h p1defs.h
main.obj: parse.h usignal.h
mem.obj: iob.h
names.obj: iob.h names.h output.h niceprintf.h
niceprintf.obj: defs.h names.h output.h niceprintf.h
output.obj: output.h niceprintf.h names.h
p1output.obj: p1defs.h output.h niceprintf.h names.h
parse_args.obj: parse.h
proc.obj: tokdefs.h names.h niceprintf.h output.h p1defs.h
put.obj: names.h pccdefs.h p1defs.h
putpcc.obj: names.h
vax.obj: defs.h output.h pccdefs.h
output.h: niceprintf.h

put.obj putpcc.obj: pccdefs.h

f2c.t: f2c.1t
troff -man f2c.1t >f2c.t

f2c.1: f2c.1t
nroff -man f2c.1t | col -b | uniq >f2c.1

clean:
rm -f gram.c *.obj f2c tokdefs.h f2c.t

b = Notice README cds.c data.c defines.h defs.h equiv.c error.c \
exec.c expr.c f2c.1 f2c.1t f2c.h format.c format.h formatdata.c \
ftypes.h gram.dcl gram.exc gram.expr gram.head gram.io \
init.c intr.c io.c iob.h lex.c machdefs.h main.c makefile \
malloc.c mem.c memset.c misc.c names.c names.h niceprintf.c \
niceprintf.h output.c output.h p1defs.h p1output.c \
parse.h parse_args.c pccdefs.h pread.c proc.c put.c putpcc.c \
safstrncpy.c sysdep.c sysdep.h tokens usignal.h vax.c version.c xsum.c

bundle:
bundle $b xsum0.out >/tmp/f2c.bundle

xsum: xsum.c
$(CC) -o xsum xsum.c

#Check validity of transmitted source...
xsum.out: xsum
xsum $b >xsum1.out
cmp xsum0.out xsum1.out && mv xsum1.out xsum.out