1 # Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation
3 # This file is part of the GNU IO Library. This library is free
4 # software; you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2, or (at your option)
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this library; see the file COPYING. If not, write to the Free
16 # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # The config file (overriden by Linux).
22 _G_CONFIG_H
=_G_config.h
23 tooldir
= $(exec_prefix)/$(target
)
24 INSTALLDIR
= $(libdir)
25 gxx_include_dir
=${includedir}/g
++
27 IO_OBJECTS
= filedoalloc.o floatconv.o genops.o fileops.o \
29 iovfscanf.o ioignore.o iopadn.o \
30 iofgetpos.o iofread.o iofscanf.o \
31 iofsetpos.o iogetdelim.o iogetline.o \
32 ioprintf.o ioseekoff.o ioseekpos.o \
33 outfloat.o strops.o iofclose.o iopopen.o ioungetc.o peekc.o iogetc.o \
34 ioputc.o iofeof.o ioferror.o
36 STDIO_OBJECTS
= stdfiles.o
38 # These emulate stdio functionality, but with a different name (_IO_ungetc
39 # instead of ungetc), and using _IO_FILE instead of FILE.
40 # They are not needed for C++ iostream, nor stdio, though some stdio
41 # files are build using the same source files (see stdio/configure.in).
42 # They are needed for iostdio.h. They are needed under Linux to avoid
43 # version incompatibility problems with the C library.
44 # iofclose.o is not here, because it is needed for stdio (by pclose).
45 STDIO_WRAP_OBJECTS
= iofdopen.o iofflush.o iofgets.o iofopen.o iofprintf.o iofputs.o iofwrite.o \
46 iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o \
47 iosprintf.o iosscanf.o ioftell.o iovsscanf.o iovsprintf.o
49 IOSTREAM_OBJECTS
= builtinbuf.o filebuf.o fstream.o \
50 indstream.o ioassign.o ioextend.o iomanip.o iostream.o \
51 isgetline.o isgetsb.o isscan.o \
52 osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
53 stdiostream.o stdstrbufs.o stdstreams.o stream.o streambuf.o strstream.o \
54 PlotFile.o SFile.o parsestream.o pfstream.o editbuf.o
56 # These files define _IO_read etc, which are just wrappers for read(2) etc.
57 # They need to be changed to use name-space-clean (e.g. __read) versions
58 # for each specific libc.
59 OSPRIM_OBJECTS
= ioprims.o iostrerror.o cleanup.o
61 LIBIOSTREAM_OBJECTS
= $(IO_OBJECTS
) $(IOSTREAM_OBJECTS
) $(OSPRIM_OBJECTS
)
62 LIBIO_OBJECTS
= $(IO_OBJECTS
) $(STDIO_WRAP_OBJECTS
) $(OSPRIM_OBJECTS
) \
65 LIBIOSTREAM_DEP
= $(LIBIOSTREAM_OBJECTS
)
66 LIBIOSTREAM_USE
= $(LIBIOSTREAM_OBJECTS
)
72 #### package, host, target, and site dependent Makefile fragments come in here.
75 $(LIBIO_OBJECTS
): $(_G_CONFIG_H
)
77 libio.a
: $(_G_CONFIG_H
) $(LIBIO_OBJECTS
)
79 $(AR
) $(AR_FLAGS
) libio.a
$(LIBIO_OBJECTS
)
82 libiostream.a
: $(_G_CONFIG_H
) $(LIBIOSTREAM_DEP
)
84 $(AR
) $(AR_FLAGS
) libiostream.a
$(LIBIOSTREAM_USE
)
85 $(RANLIB
) libiostream.a
88 $(CC
) $(CFLAGS
) -o
test test.o libio.a
89 tpipe
: tpipe.o libio.a
90 $(CC
) $(CFLAGS
) -o tpipe tpipe.o libio.a
92 iostream.list
: $(_G_CONFIG_H
) $(LIBIOSTREAM_DEP
)
93 @echo
"$(LIBIOSTREAM_USE)"> iostream.list
95 # The "pic" subdir must be created before we can put any object
97 $(LIBIOSTREAM_DEP
) $(LIBIO_OBJECTS
): stamp-picdir
100 @rootme
=`pwd`/ ; export rootme
; cd stdio
; \
101 $(MAKE
) $(FLAGS_TO_PASS
) stdio.list
103 _G_config.h
: ${srcdir}/gen-params
104 rootme
=`pwd`/ ; export rootme
; \
105 CC
="$(CC) $(CINCLUDES)"; export CC
; \
106 CXX
="$(CXX) $(CXXINCLUDES) $(NOSTDINC) $(CXXFLAGS)"; export CXX
; \
107 CONFIG_NM
="$(NM)"; export CONFIG_NM
; \
108 $(SHELL
) ${srcdir}/gen-params LIB_VERSION
=$(VERSION
) $(G_CONFIG_ARGS
) >tmp-params.h
109 mv tmp-params.h _G_config.h
112 rootme
=`pwd`/ ; export rootme
; \
113 if
[ -z
"$(MULTISUBDIR)" ]; then \
114 if
[ "$(_G_CONFIG_H)" != "" ]; then \
115 if
[ x
$(enable_version_specific_runtime_libs
) = xyes
]; then \
116 rm -f
$(gxx_include_dir
)/_G_config.h
; \
117 $(INSTALL_DATA
) _G_config.h
$(gxx_include_dir
)/_G_config.h || exit
1; \
119 rm -f
$(tooldir
)/include/_G_config.h
; \
120 $(INSTALL_DATA
) _G_config.h
$(tooldir
)/include/_G_config.h || exit
1; \
125 for FILE in
$(USER_INCLUDES
); do if
[ $$FILE != _G_config.h
]; then \
126 rm -f
$(gxx_include_dir
)/$$FILE ; \
127 $(INSTALL_DATA
) $$FILE $(gxx_include_dir
)/$$FILE ; \
128 chmod a-x
$(gxx_include_dir
)/$$FILE ; \
129 else true
; fi
; done
; \
132 @rootme
=`pwd`/ ; export rootme
; \
133 $(MULTIDO
) $(FLAGS_TO_PASS
) multi-do DO
=install
136 rm -rf
$(IOSTREAM_OBJECTS
)
137 @
$(MAKE
) $(FLAGS_TO_PASS
) "DODIRS=tests" DO
=clean subdir_do