# This file was generated automatically by configure.  Do not edit.
VPATH = .
links = 
host_alias = i386-linux
host_cpu = i386
host_vendor = unknown
host_os = linux
target_alias = i386-linux
target_cpu = i386
target_vendor = unknown
target_os = linux
host_makefile_frag = ../../config/linux.mh
ALL=all.internal

srcdir = .

prefix = /usr

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 is used in 'depend' rules generated by ../../utils/gendepend.
IO_DIR = iostream

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

CFLAGS = -g
XTRAFLAGS = `if [ -f ../../../gcc/gcc ] ; \
	then echo -I../../../gcc/include ; \
	else echo ; fi` -I/usr/latest/lib/gcc-lib/sun4/cygnus-2.0.1/include -I/usr/include

# On Sunos, the standard libc.a functions exit() and abort() call __cleanup().
# __cleanup is defined in the libc.a(flsbuf.o), which conflicts
# with $(LIBSTDIO).  So make sure we link in our version of __cleanup.

STDIO_LD_FLAGS = -u __cleanup

LIBS = ../../libg++.a

LIBSTDIO = ../stdio/libstdio++.a
LIBIO = ../libio.a

#STDIOLIBS = $(STDIO_LD_FLAGS) $(LIBSTDIO) $(LIBIO) $(LIBS)
STDIOLIBS = $(LIBSTDIO) $(LIBIO) $(LIBS)
IOLIBS = $(LIBIO) $(LIBS)

DEPEND_SOURCES = $(srcdir)/*.C

WRAP_C_INCLUDES = -I$(srcdir)/../../g++-include

#### host and target dependent Makefile fragments come in here.
# Needs some work.

INSTALL = cp
INSTALLDATA = cp
NOSTDINC = -nostdinc++
# Linux puts iostream in libc.a.
STREAM_OBJS =
HAVE_CPLUS_EXTERN = 1
WRAP_C_INCLUDES =
REGEX_OBJ=
# IO_DIR=no-stream might be the right thing for Linux, but you need
# to re-run gendepend in libg++/utils first.  There is also the problem
# that -nostdinc++ won't pick up the iostream include files ...
# IO_DIR=no-stream
G_CONFIG_ARGS = CONFIG_NM="nm -d"
# Don't include iostream files in libg++.a.
IO_OBJECTS_TO_GET = 
##

.SUFFIXES: .o .C .c

.c.o:
	$(CC) $(CFLAGS) -I$(srcdir) -I../.. -I$(srcdir)/.. -I$(srcdir)/../stdio $(XTRAFLAGS) -c $<
.C.o:
	$(CC) $(CFLAGS) $(NOSTDINC) -I$(srcdir) -I../.. -I$(srcdir)/.. -I$(srcdir)/../stdio $(WRAP_C_INCLUDES) $(XTRAFLAGS) -c $<

.PHONY: all
all:
.PHONY: check check-iostream check-stdio
check: check-iostream
check-iostream: check-tFile check-hounddog check-putbackdog

# check-stdio runs test programs that use stdio.
# These aren't run by default because there may be linker tricks needed
# to build them (if libc.a contains a competing stdio implementation).

check-stdio: check-tfseek check-twrseek check-trdseek check-tpopen

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


.PHONY: boltcc
boltcc:
	$(MAKE) "CC=$(CC)" "XTRAFLAGS=$(XTRAFLAGS)" \
		"AR=$(AR)" "RANLIB=$(RANLIB)" check

tst: tst.o
	gcc -v -o tst tst.o $(LIBSTDIO) $(LIBS)

tgetl: tgetl.o
	$(GXX) -o tgetl tgetl.o $(LIBS)

tFile: tFile.o
	$(CC) -o tFile tFile.o $(LIBS)

hounddog: hounddog.o
	$(CC) -o hounddog hounddog.o $(IOLIBS)

check-hounddog: hounddog
	./hounddog <$(srcdir)/hounddog.in > hounddog.out 2>&1
	diff -c hounddog.out $(srcdir)/hounddog.exp
	./hounddog -b0 <$(srcdir)/hounddog.in > hounddog-nobuf.out 2>&1
	diff -c hounddog-nobuf.out $(srcdir)/hounddog.exp
	./hounddog -b2 <$(srcdir)/hounddog.in > hounddog-buf2.out 2>&1
	diff -c hounddog-buf2.out $(srcdir)/hounddog.exp

putbackdog: putbackdog.o
	$(CC) -o putbackdog putbackdog.o $(IOLIBS)

check-putbackdog-regular: putbackdog
	./putbackdog <$(srcdir)/hounddog.in > putbackdog.out 2>&1
	diff -c putbackdog.out $(srcdir)/hounddog.exp
check-putbackdog-nobuf: putbackdog
	./putbackdog -b0 <$(srcdir)/hounddog.in > putbackdog-nobuf.out 2>&1
	diff -c putbackdog-nobuf.out $(srcdir)/hounddog.exp
check-putbackdog-buf2: putbackdog
	./putbackdog -b2 <$(srcdir)/hounddog.in > putbackdog-buf2.out 2>&1
	diff -c putbackdog-buf2.out $(srcdir)/hounddog.exp
check-putbackdog: \
  check-putbackdog-regular check-putbackdog-nobuf check-putbackdog-buf2

tfseek: tfseek.o
	$(CC) -o tfseek tfseek.o $(STDIOLIBS)

check-tfseek: tfseek
	./tfseek SEEK_SET fopen > tfseek-set-fopen.out 2>&1
	diff -c tfseek-set-fopen.out $(srcdir)/tfseek-set.exp
	./tfseek SEEK_SET freopen > tfseek-set-freopen.out 2>&1
	diff -c tfseek-set-freopen.out $(srcdir)/tfseek-set.exp
	./tfseek SEEK_CUR fopen > tfseek-cur-fopen.out 2>&1
	diff -c tfseek-cur-fopen.out $(srcdir)/tfseek-cur.exp
	./tfseek SEEK_CUR freopen > tfseek-cur-freopen.out 2>&1
	diff -c tfseek-cur-freopen.out $(srcdir)/tfseek-cur.exp

twrseek: twrseek.o
	$(CC) -o twrseek twrseek.o $(STDIOLIBS)

check-twrseek: twrseek
	./twrseek > twrseek.out 2>&1
	diff -c twrseek.out $(srcdir)/twrseek.exp

trdseek: trdseek.o
	$(CC) -o trdseek -v trdseek.o $(STDIOLIBS)

check-trdseek: trdseek
	./trdseek

check-tFile-regular: tFile
	./tFile < $(srcdir)/tFile.inp > tFile.out 2>&1
	diff -c tFile.out $(srcdir)/tFile.exp
# Run tFile with cout.rdbuf() unbuffered.
check-tFile-nobuf: tFile
	./tFile -b0 < $(srcdir)/tFile.inp > tFile-nobuf.out 2>&1
	diff -c tFile-nobuf.out $(srcdir)/tFile.exp
# Run tFile with a 3-byte buffer for cout.rdbuf().
check-tFile-buf3: tFile
	./tFile -b3 < $(srcdir)/tFile.inp > tFile-buf3.out 2>&1
	diff -c tFile-buf3.out $(srcdir)/tFile.exp
check-tFile: check-tFile-regular check-tFile-nobuf check-tFile-buf3

tpopen: tpopen.o
	$(CC) -o tpopen tpopen.o $(STDIOLIBS)

check-tpopen: tpopen
	./tpopen > tpopen.out 2>&1
	diff -c tpopen.out $(srcdir)/tpopen.exp

trwseek: trwseek.o
	$(CC) -o trwseek trwseek.o $(STDIOLIBS)

check-trwseek: trwseek
	./trwsseek  TMP r+ k w o

.PHONY: mostlyclean clean distclean realclean
mostlyclean:
	rm -rf *.o \#* core *.out \
	tst tgetl tFile tFile.out ffile streamfile hounddog putbackdog \
	tfseek trdseek twrseek tpopen trwseek FOO
clean: mostlyclean
distclean: clean
	rm -f *~ Makefile config.status
realclean: distclean
	rm -f depend

# with the gnu make, this is done automatically.

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


# DO NOT DELETE THIS LINE -- g++dep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

hounddog.o : hounddog.C \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h 
putbackdog.o : putbackdog.C \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h 
tFile.o : tFile.C \
  $(srcdir)/../../$(IO_DIR)/stream.h \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h \
  $(srcdir)/../../$(IO_DIR)/strstream.h \
  $(srcdir)/../../$(IO_DIR)/SFile.h \
  $(srcdir)/../../$(IO_DIR)/fstream.h \
  $(srcdir)/../../$(IO_DIR)/PlotFile.h 
tfseek.o : tfseek.c 
tgetl.o : tgetl.C \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h 
trdseek.o : trdseek.c 
tst.o : tst.C \
  $(srcdir)/../../$(IO_DIR)/iostream.h \
  $(srcdir)/../../$(IO_DIR)/streambuf.h 
twrseek.o : twrseek.c 

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
