
srcdir = .

prefix = /usr/local

exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib

datadir = $(prefix)/lib
mandir = $(prefix)/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
docdir = $(datadir)/doc

SHELL = /bin/sh

INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

AR = `if [ -f ../../binutils/ar ] ; \
	then echo ../../binutils/ar ; \
	else echo ar ; fi`

AR_FLAGS = qc
RANLIB = `if [ -f ../../binutils/ranlib ] ; \
	then echo ../../binutils/ranlib ; \
	else echo ranlib ; fi`

MAKEINFO = `if [ -f ../../texinfo/C/makeinfo ] ; \
	then echo ../../texinfo/C/makeinfo ; \
	else echo makeinfo ; fi`

IO_DIR = iostream

CXX = `if [ -f ../../../gcc/gcc ] ; \
	then echo ../../../gcc/gcc -B../../../gcc/ ; \
	else echo gcc ; fi`

CFLAGS = -g
CXXFLAGS = -g -O
XTRAFLAGS = `if [ -f ../../../gcc/gcc ] ; \
	then echo -I../../../gcc/include ; \
	else echo ; fi`

TARGETLIB = libstream.a
WRAP_C_INCLUDES = -I$(srcdir)/../g++-include
#### host and target dependent Makefile fragments come in here.
##

C_FLAGS = $(CXXFLAGS) -I$(srcdir) -I../.. $(WRAP_C_INCLUDES)

.SUFFIXES: .o .cc

# ../libg++.a depends on the stamp file.
.cc.o:
	$(CXX) $(C_FLAGS) $(XTRAFLAGS) -c $<
	@touch stamp

OBJS = File.o PlotFile.o Filebuf.o SFile.o \
  filebuf.o form.o istream.o  itoa.o ostream.o streambuf.o

# The following include files are publicly visible, and
# should be installed where user programs can find them.

USER_INCLUDES = File.h Filebuf.h Fmodes.h PlotFile.h SFile.h \
  filebuf.h istream.h ostream.h stream.h streambuf.h

# The following include files are private to the implementation.

INTERNAL_INCLUDES = 

DEPEND_SOURCES = $(srcdir)/*.c  $(srcdir)/*.cc

.PHONY: all
all: $(TARGETLIB)

$(TARGETLIB): $(OBJS)
	$(AR) $(AR_FLAGS) $(TARGETLIB) $(OBJS)
	$(RANLIB) $(TARGETLIB)

.PHONY: info
info:
.PHONY: install-info
install-info:
.PHONY: clean-info
clean-info:

.PHONY: check
check:

.PHONY: clean
clean:
	rm -f *.o *~ core *.tar.Z

distclean: clean
	rm -f *.a config.status Makefile

realclean: distclean
	
install-include-files:
	if [ ! -d $(IDIR) ] ; then mkdir $(IDIR) ; fi
	cd $(srcdir);					  \
	for FILE in $(USER_INCLUDES) ; do		  \
		rm -f $(IDIR)/$$FILE; 	               	  \
		$(INSTALL_DATA) $$FILE $(IDIR)/$$FILE ;	  \
		chmod 0444 $(IDIR)/$$FILE; 	       	  \
		echo $(IDIR)/$$FILE installed; 	       	  \
	done

force:

# with the gnu make, this is done automatically.

Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
	$(SHELL) ./config.status
