srcdir = .

#### package, host, target, and site dependent Makefile fragments come in here.
##

STDIO_CFILES = clearerr.C emulate.C fclose.C fdopen.C feof.C \
  ferror.C fflush.C fgetc.C fgetpos.C fgets.C fileno.C fopen.C \
  fprintf.C fputc.C fputs.C fread.C freopen.C fscanf.C fseek.C \
  fsetpos.C ftell.C fwrite.C gets.C perror.C popen.C printf.C puts.C \
  remove.C rename.C rewind.C  scanf.C setbuf.C setbuffer.C \
  setlinebuf.C setvbuf.C sprintf.C sscanf.C stdio.C tmpfile.C \
  tmpnam.C vfprintf.C vfscanf.C vprintf.C vsprintf.C vscanf.C \
  vsscanf.C ungetc.C

STDIO_FILES = $(STDIO_CFILES) stdio.h Makefile

STDIO_OBJECTS = clearerr.o emulate.o fclose.o fdopen.o feof.o \
  ferror.o fflush.o fgetc.o fgetpos.o fgets.o fileno.o fopen.o \
  fprintf.o fputc.o fputs.o fread.o freopen.o fscanf.o fseek.o \
  fsetpos.o ftell.o fwrite.o gets.o perror.o popen.o printf.o puts.o \
  remove.o rename.o rewind.o  scanf.o setbuf.o setbuffer.o \
  setlinebuf.o setvbuf.o sprintf.o sscanf.o stdio.o tmpfile.o \
  tmpnam.o vfprintf.o vfscanf.o vprintf.o vsprintf.o vscanf.o \
  vsscanf.o ungetc.o

DEPEND_SOURCES = $(srcdir)/*.C

$(TARGETLIB): $(STDIO_OBJECTS)
	-rm -f $(TARGETLIB)
	$(AR) $(AR_FLAGS) $(TARGETLIB) $(STDIO_OBJECTS)
	$(RANLIB) $(TARGETLIB)	

.PHONY: install
install:
	-rm -f $(libdir)/$(TARGETLIB)
	$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)
	$(RANLIB) $(libdir)/$(TARGETLIB)
