home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-base.tgz / libg++-2.7.1-src.tar / fsf / libg++ / libio / Makefile.in < prev    next >
Makefile  |  1995-11-12  |  4KB  |  123 lines

  1. # Copyright (C) 1993, 1995 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this library; see the file COPYING.  If not, write to the Free
  13. # Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  14.  
  15. srcdir = .
  16.  
  17. VERSION = 2.7.1
  18. # The config file (overriden by Linux).
  19. _G_CONFIG_H=_G_config.h
  20. tooldir = $(exec_prefix)/$(target)
  21. INSTALLDIR = $(libdir)
  22.  
  23. IO_OBJECTS = filedoalloc.o floatconv.o genops.o fileops.o \
  24.   iovfprintf.o \
  25.   iovfscanf.o ioignore.o iopadn.o \
  26.   iofgetpos.o iofread.o iofscanf.o \
  27.   iofsetpos.o iogetdelim.o iogetline.o \
  28.   ioprintf.o ioseekoff.o ioseekpos.o \
  29.   outfloat.o strops.o iofclose.o iopopen.o ioungetc.o
  30.  
  31. # These emulate stdio functionality, but with a different name (_IO_ungetc
  32. # instead of ungetc), and using _IO_FILE instead of FILE.
  33. # They are not needed for C++ iostream, nor stdio, though some stdio
  34. # files are build using the same source files (see stdio/configure.in).
  35. # They are needed for iostdio.h.  They are needed under Linux to avoid
  36. # version incompatibility problems with the C library.
  37. # iofclose.o is not here, because it is needed for stdio (by pclose).
  38. STDIO_WRAP_OBJECTS =  iofdopen.o iofflush.o iofgets.o iofopen.o iofprintf.o iofputs.o iofwrite.o \
  39.   iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o \
  40.   iosprintf.o iosscanf.o ioftell.o iovsprintf.o iovsscanf.o
  41.  
  42. IOSTREAM_OBJECTS = builtinbuf.o filebuf.o fstream.o \
  43.   indstream.o ioassign.o ioextend.o iomanip.o iostream.o \
  44.   isgetline.o isgetsb.o isscan.o \
  45.   osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
  46.   stdiostream.o stdstrbufs.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) stdfiles.o
  56.  
  57. LIBIOSTREAM_DEP = $(LIBIOSTREAM_OBJECTS)
  58. LIBIOSTREAM_USE = $(LIBIOSTREAM_OBJECTS)
  59.  
  60. USER_INCLUDES = *.h
  61.  
  62. #### package, host, target, and site dependent Makefile fragments come in here.
  63. ##
  64.  
  65. libio.a: $(_G_CONFIG_H) $(LIBIO_OBJECTS)
  66.     -rm -rf libio.a
  67.     $(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS)
  68.     $(RANLIB) libio.a
  69.  
  70. libiostream.a: $(_G_CONFIG_H) $(LIBIOSTREAM_DEP)
  71.     -rm -rf libiostream.a
  72.     $(AR) $(AR_FLAGS) libiostream.a $(LIBIOSTREAM_USE)
  73.     $(RANLIB) libiostream.a
  74.  
  75. test: test.o libio.a
  76.     $(CC) -o test test.o libio.a
  77. tpipe: tpipe.o libio.a
  78.     $(CC) -o tpipe tpipe.o libio.a
  79.  
  80. iostream.list: stamp-picdir $(_G_CONFIG_H) $(LIBIOSTREAM_DEP)
  81.     @echo "$(LIBIOSTREAM_USE)"> iostream.list
  82.  
  83. stdio/stdio.list: force
  84.     @rootme=`pwd`/ ; export rootme; cd stdio ; \
  85.       $(MAKE) $(FLAGS_TO_PASS) stdio.list
  86.  
  87. stdio.list: stdio/stdio.list
  88.     rm -f tstdio.list
  89.     sed 's,\([a-z_]*\.o\),stdio/\1,g' stdio/stdio.list > tstdio.list
  90.     mv tstdio.list stdio.list
  91.  
  92. _G_config.h: ${srcdir}/gen-params
  93.     rootme=`pwd`/ ; export rootme; \
  94.     CC="$(CC)"; export CC; \
  95.     CXX="$(CXX) $(NOSTDINC) $(CXXFLAGS)"; export CXX; \
  96.     CONFIG_NM="$(NM)"; export CONFIG_NM; \
  97.     $(SHELL) ${srcdir}/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h
  98.     mv tmp-params.h _G_config.h
  99.  
  100. install:
  101.     if [ -z "$(MULTISUBDIR)" ]; then \
  102.       if [ "$(_G_CONFIG_H)" != "" ]; then \
  103.         rm -f $(tooldir)/include/_G_config.h ; \
  104.         $(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1; \
  105.       else true; \
  106.       fi ; \
  107.       cd $(srcdir); \
  108.       for FILE in $(USER_INCLUDES) ; do \
  109.         rm -f $(gxx_includedir)/$$FILE ; \
  110.         $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE ; \
  111.         chmod a-x $(gxx_includedir)/$$FILE ; \
  112.       done ; \
  113.     else true; \
  114.     fi
  115.     @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
  116.  
  117. c++clean:
  118.     rm -rf $(IOSTREAM_OBJECTS)
  119.     @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=tests" DO=clean subdir_do
  120.