# Copyright (C) by GFD-Dennou Club, 1999-2000.  All rights reserved. 
#
# Makefile for f2c library
#

include ../Mkinclude

LIBNAME		=libf2c4dcl
LIBSRC	=	file_close.o file_open.o file_inquire.o file_rewind.o file_trunc.o fmt.o  \
		fmt_dofio.o fmt_read.o fmt_write.o sfe.o sfe_helper.o sfi.o sfi_helper.o \
		sle.o sle_dolio.o sle_lread.o sle_lwrite.o sue.o sue_douio.o add_math.o \
		add_pow.o add_string.o err.o main.o util.o due.o

# If you get an error compiling dtime_.c or etime_.c, try adding
# -DUSE_CLOCK to the CFLAGS assignment above; if that does not work,
# omit $(TIME) from the dependency list for libf2c.a below.

# For INTEGER*8 support (which requires system-dependent adjustments to
# f2c.h), add $(QINT) to the libf2c4dcl.a dependency list below...

all: f2c.h signal1.h $(LIBNAME).a install

$(LIBNAME).a: $(LIBSRC) 
	ar r $(LIBNAME).a $?
	-ranlib $(LIBNAME).a

# To get an "f2c.h" for use with "f2c -C++", first "make hadd"
hadd: f2c.h0 f2ch.add
	cat f2c.h0 f2ch.add >f2c.h

# For use with "f2c" and "f2c -A":
f2c.h: f2c.h0
	cp f2c.h0 f2c.h

# You may need to adjust signal1.h suitably for your system...
signal1.h: signal1.h0
	cp signal1.h0 signal1.h

#main.o: main.c
#	$(CC) -c -D$(IF_ONEXIT) -DSkip_f2c_Undefs main.c

install: $(LIBNAME).a
	cp f2c.h $(DCLDIR)/f2clib
	cp $(LIBNAME).a $(DCLDIR)/f2clib
	-ranlib $(DCLDIR)/f2clib/$(LIBNAME).a


pack: 
	@echo "no packed file for f2c library"

clean.all: clean

clean:
	$(RM) $(LIBNAME).a *.o *~ *.ps core *.trace
	$(RM) $(DCLDIR)/f2clib/$(LIBNAME).a


file_close.o:
file_open.o:
file_inquire.o:
file_rewind.o:
file_trunc.o:
fmt.o:
fmt_dofio.o:
fmt_read.o:
fmt_write.o: 
sfe.o:
sfe_helper.o:
sfi.o:
sfi_helper.o:
sle.o:
sle_dolio.o:
sle_lread.o:
sle_lwrite.o:
sue.o:
sue_douio.o:
add_math.o:
add_pow.o:
add_string.o:
err.o:
util.o:

