home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / libg++-2.5.3-src.lha / src / amiga / libg++-2.5.3 / libg++-2.5.3-fsf / libg++ / Makefile.in < prev    next >
Makefile  |  1993-12-20  |  6KB  |  198 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.5.3
  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.     @rootme=`pwd`/ ; export rootme ; cd tests ; \
  128.       $(MAKE) $(FLAGS_TO_PASS)
  129.     touch $@
  130.  
  131. .stmp-etc: $(TARGETLIB)
  132.     @rootme=`pwd`/ ; export rootme ; cd etc ; \
  133.       $(MAKE) $(FLAGS_TO_PASS)
  134.     touch $@
  135.  
  136. .stmp-gperf: $(TARGETLIB)
  137.     @if [ "x$(GPERF)" != "x" ]; then \
  138.        rootme=`pwd`/ ; export rootme ; cd $(GPERF) ; \
  139.           $(MAKE) $(FLAGS_TO_PASS); \
  140.      else true; fi
  141.     touch $@
  142.  
  143. .stmp-utils: $(TARGETLIB)
  144.     @if [ "x$(UTILS)" != "x" ]; then \
  145.        rootme=`pwd`/ ; export rootme ; cd $(UTILS) ; \
  146.          $(MAKE) $(FLAGS_TO_PASS); \
  147.      else true; fi
  148.     touch $@
  149.  
  150. #
  151. #
  152. # Installation
  153. #
  154.  
  155. .PHONY: install
  156. install:
  157.     $(INSTALL_DATA) $(TARGETLIB) $(INSTALLDIR)/$(TARGETLIB)
  158.     $(RANLIB) $(INSTALLDIR)/$(TARGETLIB)
  159.     chmod a-x $(INSTALLDIR)/$(TARGETLIB)
  160.     cd $(srcdir)/src; \
  161.     for FILE in *.h gen/*.ccP gen/*.hP; do \
  162.         rm -f $(gxx_includedir)/$$FILE ; \
  163.         $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE || exit 1; \
  164.         chmod a-x,a+r $(gxx_includedir)/$$FILE ; \
  165.     done
  166.     if [ "x$(GPERF)" != "x" ]; then \
  167.       cd gperf ; $(MAKE) $(FLAGS_TO_PASS) install; \
  168.     else true; fi
  169.     @for D in genclass $(UTILS) ; do \
  170.         if [ -d $$D ] ; then \
  171.             (cd $$D; $(MAKE) $(FLAGS_TO_PASS) "gxx_includedir=$(gxx_includedir)" install) ; \
  172.         else true ; \
  173.         fi ; \
  174.     done
  175.  
  176. installcheck:
  177.     if [ "x$(TEST_INSTALL)" != "x" ]; then \
  178.       cd test-install; $(MAKE) $(TEST_INSTALL) \
  179.           CXX=$(INSTALLED_CXX) "CXXFLAGS=$(CXXFLAGS)" \
  180.           COMPILE_FLAGS="" LIBS=-lg++; \
  181.     else true; fi
  182.  
  183. DIST_NAME = libg++-$(LIBG++_DIST_VERSION)
  184.  
  185. $(DIST_NAME).tar.gz: dist
  186.  
  187. # Making a dist:
  188. # cvs rtag libgxx-x-yy libg++
  189. # cvs co -r libgxx-x-yy libg++
  190. # Sanitize
  191. # cd {HERE}/..
  192. # make -f Makefile.in libg++.tar.gz
  193.  
  194. diststuff: info
  195.  
  196. force:
  197. .PHONY: $(SUBDIRS) dist
  198.