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

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
# libtinyf2c.h), add $(QINT) to the libf2c4dcl.a dependency list below...

all: libtinyf2c.h signal1.h $(LIBNAME).a

$(LIBNAME).a: $(LIBSRC) 
	ar r $(LIBNAME).a $?
	-ranlib $(LIBNAME).a
	$(CP) libtinyf2c.h $(LINCDIR)/
	$(CP) $(LIBNAME).a $(LLIBDIR)/


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

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

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

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

clean.all: distclean

distclean:
	$(RM) $(LLIBDIR)/$(LIBNAME).a
	$(RM) $(LINCDIR)/libtinyf2c.h
	$(RM) $(LIBNAME).a *.o *~ *.ps core *.trace

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


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:
