home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / libgplus.5 / libio / makefile < prev    next >
Encoding:
Makefile  |  1993-11-28  |  3.8 KB  |  100 lines

  1. all.dos : libio.a libiostream.a
  2. RANLIB=ranlib
  3. AR=ar rvs
  4. CFLAGS=-O4 -I.
  5. LONGARGS=gcc:ar
  6. # Copyright (C) 1993 Free Software Foundation
  7. # This file is part of the GNU IO Library.  This library is free
  8. # software; you can redistribute it and/or modify it under the
  9. # terms of the GNU General Public License as published by the
  10. # Free Software Foundation; either version 2, or (at your option)
  11. # any later version.
  12. # This library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. # You should have received a copy of the GNU General Public License
  17. # along with GNU CC; see the file COPYING.  If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. srcdir = .
  21. VERSION = 0.60
  22. #### package, host, target, and site dependent Makefile fragments come in here.
  23. ##
  24.  
  25. INSTALLDIR = $(libdir)
  26.  
  27. IO_OBJECTS = filedoalloc.o floatconv.o genops.o fileops.o \
  28.   iovfprintf.o \
  29.   iovfscanf.o ioignore.o iopadn.o \
  30.   iofgetpos.o iofread.o iofscanf.o \
  31.   iofsetpos.o iogetline.o \
  32.   ioprintf.o ioputs.o ioseekoff.o ioseekpos.o \
  33.   outfloat.o stdfiles.o strops.o iofclose.o ioungetc.o
  34.  
  35. # These emulate stdio functionality, but with a different name (_IO_ungetc
  36. # instead of ungetc), and using _IO_FILE instead of FILE.
  37. # They are not needed for C++ iostream, nor stdio, though some stdio
  38. # files are build using the same source files (see stdio/configure.in).
  39. # They are needed for iostdio.h.
  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 iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o iosprintf.o iosscanf.o ioftell.o iovsprintf.o iovsscanf.o
  42.  
  43. IOSTREAM_OBJECTS = builtinbuf.o filebuf.o fstream.o \
  44.   indstream.o isgetline.o isgetsb.o isscan.o ioextend.o iomanip.o iostream.o \
  45.   osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
  46.   stdiostream.o stdstreams.o stream.o streambuf.o strstream.o \
  47.   PlotFile.o SFile.o parsestream.o pfstream.o editbuf.o
  48.  
  49. # These files define _IO_read etc, which are just wrappers for read(2) etc.
  50. # They need to be changed to use name-space-clean (e.g. __read) versions
  51. # for each specific libc.
  52. OSPRIM_OBJECTS = ioprims.o iostrerror.o cleanup.o
  53.  
  54. LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(OSPRIM_OBJECTS)
  55. LIBIO_OBJECTS = $(IO_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS)
  56.  
  57. libio.a: _G_config.h $(LIBIO_OBJECTS)
  58.     -rm -rf libio.a
  59.     $(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS)
  60.     $(RANLIB) libio.a
  61.  
  62. libiostream.a: _G_config.h $(LIBIOSTREAM_OBJECTS)
  63.     -rm -rf libiostream.a
  64.     $(AR) $(AR_FLAGS) libiostream.a $(LIBIOSTREAM_OBJECTS)
  65.     $(RANLIB) libiostream.a
  66.  
  67. test: test.o libio.a
  68.     $(CC) -o test test.o libio.a
  69. tpipe: tpipe.o libio.a
  70.     $(CC) -o tpipe tpipe.o libio.a
  71.  
  72. iostream.list: _G_config.h $(LIBIOSTREAM_OBJECTS)
  73.     @echo "$(LIBIOSTREAM_OBJECTS)"> iostream.list
  74.  
  75. # The CC=$(CXX) is a kludge to force use of gcc.
  76. _G_config.h: ${srcdir}/gen-params
  77.     rootme=`pwd`/ ; export rootme; \
  78.     CC="$(CXX) $(XTRAFLAGS)"; export CC; \
  79.     CXX="$(CXX) $(XTRAFLAGS) $(NOSTDINC)"; export CXX; \
  80.     CONFIG_NM="$(NM)"; export CONFIG_NM; \
  81.     ${srcdir}/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h
  82.     mv tmp-params.h _G_config.h
  83.  
  84. USER_INCLUDES = *.h
  85. install:
  86.     rm -f $(tooldir)/include/_G_config.h ; \
  87.       $(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1;
  88.     cd $(srcdir); \
  89.     for FILE in $(USER_INCLUDES) ; do \
  90.         rm -f $(gxx_includedir)/$$FILE ; \
  91.         $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE ; \
  92.         chmod a-x $(gxx_includedir)/$$FILE ; \
  93.     done
  94.     $(INSTALL_DATA) libiostream.a $(INSTALLDIR)/libiostream.a
  95.     $(RANLIB) $(INSTALLDIR)/libiostream.a
  96.     chmod a-x $(INSTALLDIR)/libiostream.a
  97.