1 # Copyright (C) 1993, 1995 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)
26 IO_OBJECTS
= filedoalloc.o floatconv.o genops.o fileops.o \
28 iovfscanf.o ioignore.o iopadn.o \
29 iofgetpos.o iofread.o iofscanf.o \
30 iofsetpos.o iogetdelim.o iogetline.o \
31 ioprintf.o ioseekoff.o ioseekpos.o \
32 outfloat.o strops.o iofclose.o iopopen.o ioungetc.o
34 # These emulate stdio functionality, but with a different name (_IO_ungetc
35 # instead of ungetc), and using _IO_FILE instead of FILE.
36 # They are not needed for C++ iostream, nor stdio, though some stdio
37 # files are build using the same source files (see stdio/configure.in).
38 # They are needed for iostdio.h. They are needed under Linux to avoid
39 # version incompatibility problems with the C library.
40 # iofclose.o is not here, because it is needed for stdio (by pclose).
41 STDIO_WRAP_OBJECTS
= iofdopen.o iofflush.o iofgets.o iofopen.o iofprintf.o iofputs.o iofwrite.o \
42 iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o \
43 iosprintf.o iosscanf.o ioftell.o iovsprintf.o iovsscanf.o
45 IOSTREAM_OBJECTS
= builtinbuf.o filebuf.o fstream.o \
46 indstream.o ioassign.o ioextend.o iomanip.o iostream.o \
47 isgetline.o isgetsb.o isscan.o \
48 osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
49 stdiostream.o stdstrbufs.o stdstreams.o stream.o streambuf.o strstream.o \
50 PlotFile.o SFile.o parsestream.o pfstream.o editbuf.o
52 # These files define _IO_read etc, which are just wrappers for read(2) etc.
53 # They need to be changed to use name-space-clean (e.g. __read) versions
54 # for each specific libc.
55 OSPRIM_OBJECTS
= ioprims.o iostrerror.o cleanup.o
57 LIBIOSTREAM_OBJECTS
= $(IO_OBJECTS
) $(IOSTREAM_OBJECTS
) $(OSPRIM_OBJECTS
)
58 LIBIO_OBJECTS
= $(IO_OBJECTS
) $(STDIO_WRAP_OBJECTS
) $(OSPRIM_OBJECTS
) stdfiles.o
60 LIBIOSTREAM_DEP
= $(LIBIOSTREAM_OBJECTS
)
61 LIBIOSTREAM_USE
= $(LIBIOSTREAM_OBJECTS
)
65 #### package, host, target, and site dependent Makefile fragments come in here.
68 libio.a
: $(_G_CONFIG_H
) $(LIBIO_OBJECTS
)
70 $(AR
) $(AR_FLAGS
) libio.a
$(LIBIO_OBJECTS
)
73 libiostream.a
: $(_G_CONFIG_H
) $(LIBIOSTREAM_DEP
)
75 $(AR
) $(AR_FLAGS
) libiostream.a
$(LIBIOSTREAM_USE
)
76 $(RANLIB
) libiostream.a
79 $(CC
) $(CFLAGS
) -o
test test.o libio.a
80 tpipe
: tpipe.o libio.a
81 $(CC
) $(CFLAGS
) -o tpipe tpipe.o libio.a
83 iostream.list
: stamp-picdir
$(_G_CONFIG_H
) $(LIBIOSTREAM_DEP
)
84 @echo
"$(LIBIOSTREAM_USE)"> iostream.list
86 stdio
/stdio.list
: force
87 @rootme
=`pwd`/ ; export rootme
; cd stdio
; \
88 $(MAKE
) $(FLAGS_TO_PASS
) stdio.list
90 stdio.list
: stdio
/stdio.list
92 sed
's,\([a-z_]*\.o\),stdio/\1,g' stdio
/stdio.list
> tstdio.list
93 mv tstdio.list stdio.list
95 _G_config.h
: ${srcdir}/gen-params
96 rootme
=`pwd`/ ; export rootme
; \
97 CC
="$(CC)"; export CC
; \
98 CXX
="$(CXX) $(NOSTDINC) $(CXXFLAGS)"; export CXX
; \
99 CONFIG_NM
="$(NM)"; export CONFIG_NM
; \
100 $(SHELL
) ${srcdir}/gen-params LIB_VERSION
=$(VERSION
) $(G_CONFIG_ARGS
) >tmp-params.h
101 mv tmp-params.h _G_config.h
104 rootme
=`pwd`/ ; export rootme
; \
105 if
[ -z
"$(MULTISUBDIR)" ]; then \
106 if
[ "$(_G_CONFIG_H)" != "" ]; then \
107 rm -f
$(tooldir
)/include/_G_config.h
; \
108 $(INSTALL_DATA
) _G_config.h
$(tooldir
)/include/_G_config.h || exit
1; \
112 for FILE in
$(USER_INCLUDES
); do if
[ $$FILE != _G_config.h
]; then \
113 rm -f
$(gxx_includedir
)/$$FILE ; \
114 $(INSTALL_DATA
) $$FILE $(gxx_includedir
)/$$FILE ; \
115 chmod a-x
$(gxx_includedir
)/$$FILE ; \
116 else true
; fi
; done
; \
119 @rootme
=`pwd`/ ; export rootme
; \
120 $(MULTIDO
) $(FLAGS_TO_PASS
) multi-do DO
=install
123 rm -rf
$(IOSTREAM_OBJECTS
)
124 @
$(MAKE
) $(FLAGS_TO_PASS
) "DODIRS=tests" DO
=clean subdir_do