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 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. ## .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