1998-02-23 00:31:03 +08:00
|
|
|
# Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation
|
1997-08-22 06:57:35 +08:00
|
|
|
#
|
|
|
|
# This file is part of the GNU IO Library. This library is free
|
|
|
|
# software; you can redistribute it and/or modify it under the
|
|
|
|
# terms of the GNU General Public License as published by the
|
|
|
|
# Free Software Foundation; either version 2, or (at your option)
|
|
|
|
# any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this library; see the file COPYING. If not, write to the Free
|
|
|
|
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
srcdir = .
|
|
|
|
|
|
|
|
VERSION = 2.8.0
|
|
|
|
# The config file (overriden by Linux).
|
|
|
|
_G_CONFIG_H=_G_config.h
|
|
|
|
tooldir = $(exec_prefix)/$(target)
|
|
|
|
INSTALLDIR = $(libdir)
|
|
|
|
|
|
|
|
IO_OBJECTS = filedoalloc.o floatconv.o genops.o fileops.o \
|
|
|
|
iovfprintf.o \
|
|
|
|
iovfscanf.o ioignore.o iopadn.o \
|
|
|
|
iofgetpos.o iofread.o iofscanf.o \
|
|
|
|
iofsetpos.o iogetdelim.o iogetline.o \
|
|
|
|
ioprintf.o ioseekoff.o ioseekpos.o \
|
1997-09-06 15:44:38 +08:00
|
|
|
outfloat.o strops.o iofclose.o iopopen.o ioungetc.o peekc.o iogetc.o \
|
|
|
|
ioputc.o iofeof.o ioferror.o
|
1997-08-22 06:57:35 +08:00
|
|
|
|
1997-09-27 12:07:00 +08:00
|
|
|
STDIO_OBJECTS = stdfiles.o
|
|
|
|
|
1997-08-22 06:57:35 +08:00
|
|
|
# These emulate stdio functionality, but with a different name (_IO_ungetc
|
|
|
|
# instead of ungetc), and using _IO_FILE instead of FILE.
|
|
|
|
# They are not needed for C++ iostream, nor stdio, though some stdio
|
|
|
|
# files are build using the same source files (see stdio/configure.in).
|
|
|
|
# They are needed for iostdio.h. They are needed under Linux to avoid
|
|
|
|
# version incompatibility problems with the C library.
|
|
|
|
# iofclose.o is not here, because it is needed for stdio (by pclose).
|
|
|
|
STDIO_WRAP_OBJECTS = iofdopen.o iofflush.o iofgets.o iofopen.o iofprintf.o iofputs.o iofwrite.o \
|
|
|
|
iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o \
|
1997-09-06 15:44:38 +08:00
|
|
|
iosprintf.o iosscanf.o ioftell.o iovsscanf.o iovsprintf.o
|
1997-08-22 06:57:35 +08:00
|
|
|
|
|
|
|
IOSTREAM_OBJECTS = builtinbuf.o filebuf.o fstream.o \
|
|
|
|
indstream.o ioassign.o ioextend.o iomanip.o iostream.o \
|
|
|
|
isgetline.o isgetsb.o isscan.o \
|
|
|
|
osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
|
|
|
|
stdiostream.o stdstrbufs.o stdstreams.o stream.o streambuf.o strstream.o \
|
|
|
|
PlotFile.o SFile.o parsestream.o pfstream.o editbuf.o
|
|
|
|
|
|
|
|
# These files define _IO_read etc, which are just wrappers for read(2) etc.
|
|
|
|
# They need to be changed to use name-space-clean (e.g. __read) versions
|
|
|
|
# for each specific libc.
|
|
|
|
OSPRIM_OBJECTS = ioprims.o iostrerror.o cleanup.o
|
|
|
|
|
|
|
|
LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(OSPRIM_OBJECTS)
|
1997-09-27 12:07:00 +08:00
|
|
|
LIBIO_OBJECTS = $(IO_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS) \
|
|
|
|
$(STDIO_OBJECTS)
|
1997-08-22 06:57:35 +08:00
|
|
|
|
|
|
|
LIBIOSTREAM_DEP = $(LIBIOSTREAM_OBJECTS)
|
|
|
|
LIBIOSTREAM_USE = $(LIBIOSTREAM_OBJECTS)
|
|
|
|
|
|
|
|
USER_INCLUDES = *.h
|
|
|
|
|
1997-09-27 12:07:00 +08:00
|
|
|
PICFLAG =
|
|
|
|
|
1997-08-22 06:57:35 +08:00
|
|
|
#### package, host, target, and site dependent Makefile fragments come in here.
|
|
|
|
##
|
|
|
|
|
1997-09-20 10:43:51 +08:00
|
|
|
$(LIBIO_OBJECTS): $(_G_CONFIG_H)
|
|
|
|
|
1997-08-22 06:57:35 +08:00
|
|
|
libio.a: $(_G_CONFIG_H) $(LIBIO_OBJECTS)
|
|
|
|
-rm -rf libio.a
|
|
|
|
$(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS)
|
|
|
|
$(RANLIB) libio.a
|
|
|
|
|
|
|
|
libiostream.a: $(_G_CONFIG_H) $(LIBIOSTREAM_DEP)
|
|
|
|
-rm -rf libiostream.a
|
|
|
|
$(AR) $(AR_FLAGS) libiostream.a $(LIBIOSTREAM_USE)
|
|
|
|
$(RANLIB) libiostream.a
|
|
|
|
|
|
|
|
test: test.o libio.a
|
|
|
|
$(CC) $(CFLAGS) -o test test.o libio.a
|
|
|
|
tpipe: tpipe.o libio.a
|
|
|
|
$(CC) $(CFLAGS) -o tpipe tpipe.o libio.a
|
|
|
|
|
|
|
|
iostream.list: stamp-picdir $(_G_CONFIG_H) $(LIBIOSTREAM_DEP)
|
|
|
|
@echo "$(LIBIOSTREAM_USE)"> iostream.list
|
|
|
|
|
1997-09-06 15:44:38 +08:00
|
|
|
stmp-stdio:
|
1997-08-22 06:57:35 +08:00
|
|
|
@rootme=`pwd`/ ; export rootme; cd stdio ; \
|
|
|
|
$(MAKE) $(FLAGS_TO_PASS) stdio.list
|
|
|
|
|
|
|
|
_G_config.h: ${srcdir}/gen-params
|
|
|
|
rootme=`pwd`/ ; export rootme; \
|
1998-02-23 00:31:03 +08:00
|
|
|
CC="$(CC) $(CINCLUDES)"; export CC; \
|
|
|
|
CXX="$(CXX) $(CXXINCLUDES) $(NOSTDINC) $(CXXFLAGS)"; export CXX; \
|
1997-08-22 06:57:35 +08:00
|
|
|
CONFIG_NM="$(NM)"; export CONFIG_NM; \
|
|
|
|
$(SHELL) ${srcdir}/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h
|
|
|
|
mv tmp-params.h _G_config.h
|
|
|
|
|
|
|
|
install:
|
|
|
|
rootme=`pwd`/ ; export rootme ; \
|
|
|
|
if [ -z "$(MULTISUBDIR)" ]; then \
|
|
|
|
if [ "$(_G_CONFIG_H)" != "" ]; then \
|
|
|
|
rm -f $(tooldir)/include/_G_config.h ; \
|
|
|
|
$(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1; \
|
|
|
|
else true; \
|
|
|
|
fi ; \
|
|
|
|
cd $(srcdir); \
|
|
|
|
for FILE in $(USER_INCLUDES); do if [ $$FILE != _G_config.h ]; then \
|
1997-11-27 16:39:12 +08:00
|
|
|
rm -f $(gxx_include_dir)/$$FILE ; \
|
|
|
|
$(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
|
|
|
|
chmod a-x $(gxx_include_dir)/$$FILE ; \
|
1997-08-22 06:57:35 +08:00
|
|
|
else true; fi; done ; \
|
|
|
|
else true; \
|
|
|
|
fi
|
|
|
|
@rootme=`pwd`/ ; export rootme ; \
|
|
|
|
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
|
|
|
|
|
|
|
c++clean:
|
|
|
|
rm -rf $(IOSTREAM_OBJECTS)
|
|
|
|
@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=tests" DO=clean subdir_do
|