home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / libg++-2.6-fsf.lha / libg++-2.6 / libg++ / Makefile.in < prev    next >
Makefile  |  1994-07-13  |  5KB  |  196 lines

  1. # Makefile for GNU C++ class library (libg++)
  2. #   Copyright (C) 1989, 1992, 1993 Free Software Foundation, Inc.
  3. #   written by Doug Lea (dl@rocky.oswego.edu)
  4.  
  5. #This file is part of GNU libg++.
  6.  
  7. #GNU libg++ is free software; you can redistribute it and/or modify
  8. #it under the terms of the GNU General Public License as published by
  9. #the Free Software Foundation; either version 1, or (at your option)
  10. #any later version.
  11.  
  12. #GNU libg++ 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.  
  17. #You should have received a copy of the GNU General Public License
  18. #along with GNU libg++; see the file COPYING.  If not, write to
  19. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. srcdir = .
  22.  
  23. # We specify exactly what we want to pass down; don't let GNU make
  24. # 3.63 overload the command line.
  25. MAKEOVERRIDES=
  26.  
  27. ###**######################################################################
  28. #
  29. # Directories, paths, compilation flags and program names.
  30. #
  31. # If a macro needs to have a different value, then change it in the
  32. # site/architecture specific makefile in the directory config !
  33. #
  34. # This file contains the documentation for the macros and possible values.
  35. # Don't remove them even, if they are only comments !
  36.  
  37. VERSION = 2.6
  38. LIBG++_DIST_VERSION = $(VERSION)
  39.  
  40. # ------- System-dependent defines
  41.  
  42. # g++ so specific flags
  43. OSFLAG=
  44.  
  45. # ld or ld++ os specific libraries
  46. #OSLIBS =
  47.  
  48. # Comment out the next line to disable incremental linking test
  49. # (this test NOT included in 1.39.0, so don't re-enable) ??? H.S.
  50. #TEST0=test0
  51. #TEST0=
  52.  
  53. # targets for test-install
  54. TEST_INSTALL         = test-90S-then-clean # test-90D-then-clean
  55. VERIFY_GXX_INSTALLATION = foo_main # dfoo_main
  56.  
  57.  
  58. # You can override gperf to not build it at all
  59. GPERF = gperf
  60. NON_IO_SUBDIRS    =  genclass src $(GPERF) utils tests etc test-install
  61. SUBDIRS    =  $(NON_IO_SUBDIRS)
  62. ALL_SUBDIRS = $(NON_IO_SUBDIRS) old-stream no-stream
  63.  
  64. ALL    =  verify-gxx-installation genclass src $(GPERF) $(UTILS)
  65. CHECK    =  tests etc etc-tests
  66. UTILS   =  # utils
  67.  
  68. # C++ compiler to use when testing that installation has succeeded.
  69. INSTALLED_CXX=$(bindir)/gcc
  70.  
  71. TARGETLIB = libg++.a
  72.  
  73. # Used to insert objects from libiberty into libg++.a.
  74. LIBIBERTY = libiberty
  75. LIBIBERTY_OBJECTS_TO_GET = `cat needed-list` strerror.o strsignal.o
  76.  
  77. #### package, host, target, and site dependent Makefile fragments come in here.
  78. ##
  79.  
  80. tooldir = $(exec_prefix)/$(target)
  81. INSTALLDIR = $(libdir)
  82.  
  83. ###**######################################################################
  84. #
  85. # compilation actions
  86.  
  87. .PHONY: rest-in-parallel in-src in-io
  88. rest-in-parallel: .stmp-genclass .stmp-tests .stmp-etc .stmp-gperf .stmp-utils
  89.  
  90. # We assume libiberty is made before .
  91. $(TARGETLIB): in-io in-src stamp-$(TARGETLIB)
  92.  
  93. stamp-$(TARGETLIB): src/libgxx.list $(IO_DIR)/iostream.list ../$(LIBIBERTY)/libiberty.a
  94.     -rm -f $(TARGETLIB)
  95.     rootme=`pwd`/ ; export rootme ; cd src ; \
  96.       $(AR) $(AR_FLAGS) ../$(TARGETLIB) `cat libgxx.list`
  97.     cd $(IO_DIR); \
  98.       $(AR) $(AR_FLAGS) ../libg++/$(TARGETLIB) `cat iostream.list`
  99.     cd ../$(LIBIBERTY); \
  100.       $(AR) $(AR_FLAGS) ../libg++/$(TARGETLIB) $(LIBIBERTY_OBJECTS_TO_GET)
  101.     $(RANLIB) $(TARGETLIB)
  102.     @touch stamp-$(TARGETLIB)
  103.  
  104. src/libgxx.list: in-src
  105. in-src:
  106.     @rootme=`pwd`/ ; export rootme ; cd src ; \
  107.         $(MAKE) $(FLAGS_TO_PASS) libgxx.list
  108.  
  109. $(IO_DIR)/iostream.list: in-io
  110. in-io:
  111.     @rootme=`pwd`/ ; export rootme ; cd $(IO_DIR) ; \
  112.         $(MAKE) $(FLAGS_TO_PASS) iostream.list
  113.  
  114. in-libiberty:
  115.     @rootme=`pwd`/ ; export rootme ; cd ../$(LIBIBERTY) ; \
  116.         $(MAKE) $(FLAGS_TO_PASS)
  117.  
  118. .PHONY: installcheck
  119. installcheck: check
  120.  
  121. .stmp-genclass: $(TARGETLIB)
  122.     @rootme=`pwd`/ ; export rootme ; cd genclass ; \
  123.       $(MAKE) $(FLAGS_TO_PASS) "gxx_includedir=$(gxx_includedir)"
  124.     touch $@
  125.  
  126. .stmp-tests: $(TARGETLIB)
  127.     @if [ -f tests/Makefile ]; then \
  128.        rootme=`pwd`/ ; export rootme ; cd tests ; \
  129.           $(MAKE) $(FLAGS_TO_PASS); \
  130.      else true; fi
  131.     touch $@
  132.  
  133. .stmp-etc: $(TARGETLIB)
  134.     @rootme=`pwd`/ ; export rootme ; cd etc ; \
  135.       $(MAKE) $(FLAGS_TO_PASS)
  136.     touch $@
  137.  
  138. .stmp-gperf: $(TARGETLIB)
  139.     @if [ "x$(GPERF)" != "x" ]; then \
  140.        rootme=`pwd`/ ; export rootme ; cd $(GPERF) ; \
  141.           $(MAKE) $(FLAGS_TO_PASS); \
  142.      else true; fi
  143.     touch $@
  144.  
  145. .stmp-utils: $(TARGETLIB)
  146.     @if [ "x$(UTILS)" != "x" ]; then \
  147.        rootme=`pwd`/ ; export rootme ; cd $(UTILS) ; \
  148.          $(MAKE) $(FLAGS_TO_PASS); \
  149.      else true; fi
  150.     touch $@
  151.  
  152. #
  153. #
  154. # Installation
  155. #
  156.  
  157. .PHONY: install
  158. install:
  159.     $(INSTALL_DATA) $(TARGETLIB) $(INSTALLDIR)/$(TARGETLIB)
  160.     $(RANLIB) $(INSTALLDIR)/$(TARGETLIB)
  161.     chmod a-x $(INSTALLDIR)/$(TARGETLIB)
  162.     @for D in src genclass $(UTILS) ; do \
  163.         if [ -d $$D ] ; then \
  164.             (rootme=`pwd`/ ; export rootme ; cd $$D;\
  165.               $(MAKE) $(FLAGS_TO_PASS) "gxx_includedir=$(gxx_includedir)" install) ; \
  166.         else true ; \
  167.         fi ; \
  168.     done
  169.     if [ "x$(GPERF)" != "x" ]; then \
  170.       rootme=`pwd`/ ; export rootme ; cd gperf ;\
  171.         $(MAKE) $(FLAGS_TO_PASS) install; \
  172.     else true; fi
  173.  
  174. installcheck:
  175.     if [ "x$(TEST_INSTALL)" != "x" ]; then \
  176.       cd test-install; $(MAKE) $(TEST_INSTALL) \
  177.           CXX=$(INSTALLED_CXX) "CXXFLAGS=$(CXXFLAGS)" \
  178.           COMPILE_FLAGS="" LIBS=-lg++; \
  179.     else true; fi
  180.  
  181. DIST_NAME = libg++-$(LIBG++_DIST_VERSION)
  182.  
  183. $(DIST_NAME).tar.gz: dist
  184.  
  185. # Making a dist:
  186. # cvs rtag libgxx-x-yy libg++
  187. # cvs co -r libgxx-x-yy libg++
  188. # Sanitize
  189. # cd {HERE}/..
  190. # make -f Makefile.in libg++.tar.gz
  191.  
  192. diststuff: info
  193.  
  194. force:
  195. .PHONY: $(SUBDIRS) dist
  196.