home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / gnu / libg++-2.6.2.lha / libg++-2.6.2 / Makefile.in < prev    next >
Makefile  |  1994-12-15  |  31KB  |  1,130 lines

  1. #
  2. # Makefile for directory with subdirs to build.
  3. #   Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation
  4. #
  5. # This file is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program 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.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16. #
  17.  
  18. srcdir = .
  19.  
  20. prefix = /usr/local
  21.  
  22. exec_prefix = $(prefix)
  23. bindir = $(exec_prefix)/bin
  24. libdir = $(exec_prefix)/lib
  25. tooldir = $(exec_prefix)/$(target)
  26.  
  27. program_transform_name =
  28.  
  29. datadir = $(prefix)/lib
  30. mandir = $(prefix)/man
  31. man1dir = $(mandir)/man1
  32. man2dir = $(mandir)/man2
  33. man3dir = $(mandir)/man3
  34. man4dir = $(mandir)/man4
  35. man5dir = $(mandir)/man5
  36. man6dir = $(mandir)/man6
  37. man7dir = $(mandir)/man7
  38. man8dir = $(mandir)/man8
  39. man9dir = $(mandir)/man9
  40. infodir = $(prefix)/info
  41. includedir = $(prefix)/include
  42. docdir = $(datadir)/doc
  43.  
  44. SHELL = /bin/sh
  45.  
  46. INSTALL = $${srcroot}/install.sh -c
  47. INSTALL_PROGRAM = $(INSTALL)
  48. INSTALL_DATA = $(INSTALL) -m 644
  49. INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
  50.  
  51. INSTALL_DOSREL = install-dosrel-fake
  52.  
  53. AS = as
  54. AR = ar
  55. AR_FLAGS = rc
  56. CC = cc
  57.  
  58. # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
  59. # here so that they can be overridden by Makefile fragments.
  60. HOST_CC = $(CC_FOR_BUILD)
  61. HOST_PREFIX = 
  62. HOST_PREFIX_1 = loser-
  63.  
  64. # We don't specify -g -O because many compilers don't support -g -O,
  65. # and/or -O is broken in and of itself.
  66. CFLAGS = -g
  67. LIBCFLAGS = $(CFLAGS)
  68. CFLAGS_FOR_TARGET = $(CFLAGS)
  69. LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
  70.  
  71. CXX = gcc
  72.  
  73. # Use -O2 to stress test the compiler.
  74. CXXFLAGS = -g -O2
  75. LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
  76. CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
  77. LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET)
  78.  
  79. RANLIB = ranlib
  80. NM = nm
  81. # Not plain GZIP, since gzip looks there for extra command-line options.
  82. GZIPPROG = gzip
  83.  
  84. BISON = bison -y
  85. LEX = `if [ -f $$r/flex/flex ] ; \
  86.     then echo $$r/flex/flex ; \
  87.     else echo flex ; fi`
  88.  
  89. M4 = `if [ -f $$r/m4/m4 ] ; \
  90.     then echo $$r/m4/m4 ; \
  91.     else echo m4 ; fi`
  92.  
  93. MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
  94.     then echo $$r/texinfo/makeinfo/makeinfo ; \
  95.     else echo makeinfo ; fi`
  96.  
  97. # This just becomes part of the MAKEINFO definition passed down to
  98. # sub-makes.  It lets flags be given on the command line while still
  99. # using the makeinfo from the object tree.
  100. MAKEINFOFLAGS =
  101.  
  102. EXPECT = `if [ -f $$r/expect/expect ] ; \
  103.     then echo $$r/expect/expect ; \
  104.     else echo expect ; fi`
  105.  
  106. RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
  107.     then echo $${srcroot}/dejagnu/runtest ; \
  108.     else echo runtest ; fi`
  109.  
  110.  
  111. # libraries that may need to be augmented on a system-by-system basis
  112. X11_LIB = -lX11
  113.  
  114. # compilers to use to create programs which must be run in the build
  115. # environment.
  116. CC_FOR_BUILD = $(CC)
  117. CXX_FOR_BUILD = $(CXX)
  118.  
  119. SUBDIRS = "this is set via configure, don't edit this"
  120. OTHERS = 
  121.  
  122. ALL = all.normal
  123. INSTALL_TARGET = install-dirs \
  124.     $(INSTALL_MODULES) \
  125.     $(INSTALL_TARGET_MODULES) \
  126.     $(INSTALL_X11_MODULES) \
  127.     install-gcc \
  128.     $(INSTALL_DOSREL)
  129.  
  130.  
  131. CC_FOR_TARGET = ` \
  132.   if [ -f $$r/gcc/Makefile ] ; then \
  133.     if [ -f $$r/newlib/Makefile ] ; then \
  134.       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
  135.     else \
  136.       echo $$r/gcc/xgcc -B$$r/gcc/; \
  137.     fi; \
  138.   else \
  139.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  140.       echo $(CC); \
  141.     else \
  142.       t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
  143.     fi; \
  144.   fi`
  145.  
  146.  
  147. CXX_FOR_TARGET = ` \
  148.   if [ -f $$r/gcc/Makefile ] ; then \
  149.     if [ -f $$r/newlib/Makefile ] ; then \
  150.       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
  151.     else \
  152.       echo $$r/gcc/xgcc -B$$r/gcc/; \
  153.     fi; \
  154.   else \
  155.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  156.       echo $(CXX); \
  157.     else \
  158.       t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
  159.     fi; \
  160.   fi`
  161.  
  162. AS_FOR_TARGET = ` \
  163.   if [ -f $$r/gas/Makefile ] ; then \
  164.     echo $$r/gas/as.new ; \
  165.   else \
  166.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  167.       echo $(AS); \
  168.     else \
  169.        t='$(program_transform_name)'; echo as | sed -e 's/brokensed/brokensed/' $$t ; \
  170.     fi; \
  171.   fi`
  172.  
  173. AR_FOR_TARGET = ` \
  174.   if [ -f $$r/binutils/ar ] ; then \
  175.     echo $$r/binutils/ar ; \
  176.   else \
  177.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  178.       echo $(AR); \
  179.     else \
  180.        t='$(program_transform_name)'; echo ar | sed -e 's/brokensed/brokensed/' $$t ; \
  181.     fi; \
  182.   fi`
  183.  
  184. RANLIB_FOR_TARGET = ` \
  185.   if [ -f $$r/binutils/ranlib ] ; then \
  186.     echo $$r/binutils/ranlib ; \
  187.   else \
  188.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  189.       echo $(RANLIB); \
  190.     else \
  191.        t='$(program_transform_name)'; echo ranlib | sed -e 's/brokensed/brokensed/' $$t ; \
  192.     fi; \
  193.   fi`
  194.  
  195. NM_FOR_TARGET = ` \
  196.   if [ -f $$r/binutils/Makefile ] ; then \
  197.     echo $$r/binutils/nm.new ; \
  198.   else \
  199.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  200.       echo $(NM); \
  201.     else \
  202.        t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \
  203.     fi; \
  204.   fi`
  205.  
  206.  
  207. #### host and target specific makefile fragments come in here.
  208. ###
  209.  
  210. # Flags to pass down to all sub-makes.
  211. # Please keep these in alphabetical order.
  212. BASE_FLAGS_TO_PASS = \
  213.     "AR_FLAGS=$(AR_FLAGS)" \
  214.     "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  215.     "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
  216.     "BISON=$(BISON)" \
  217.     "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  218.     "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  219.     "CFLAGS=$(CFLAGS)" \
  220.     "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
  221.     "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
  222.     "CXXFLAGS=$(CXXFLAGS)" \
  223.     "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
  224.     "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  225.     "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
  226.     "INSTALL=$(INSTALL)" \
  227.     "INSTALL_DATA=$(INSTALL_DATA)" \
  228.     "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  229.     "INSTALL_XFORM=$(INSTALL_XFORM)" \
  230.     "LDFLAGS=$(LDFLAGS)" \
  231.     "LEX=$(LEX)" \
  232.     "LIBCFLAGS=$(LIBCFLAGS)" \
  233.     "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  234.     "LIBCXXFLAGS=$(LIBCFLAGS)" \
  235.     "LIBCXXFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  236.     "M4=$(M4)" \
  237.     "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  238.     "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
  239.     "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  240.     "SHELL=$(SHELL)" \
  241.     "EXPECT=$(EXPECT)" \
  242.     "RUNTEST=$(RUNTEST)" \
  243.     "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  244.     "YACC=$(BISON)" \
  245.     "exec_prefix=$(exec_prefix)" \
  246.     "prefix=$(prefix)" \
  247.     "tooldir=$(tooldir)" 
  248.  
  249. # Flags to pass down to most sub-makes, in which we're building with
  250. # the host environment.
  251. # If any variables are added here, they must be added to do-*, below.
  252. EXTRA_HOST_FLAGS = \
  253.     'AR=$(AR)' \
  254.     'AS=$(AS)' \
  255.     'CC=$(CC)' \
  256.     'CXX=$(CXX)' \
  257.     'NM=$(NM)' \
  258.     'RANLIB=$(RANLIB)'
  259.  
  260. FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
  261.  
  262. # Flags that are concerned with the location of the X11 include files
  263. # and library files
  264. X11_FLAGS_TO_PASS = \
  265.     "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
  266.     "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
  267.     "X11_LIB=$(X11_LIB)"
  268.  
  269. # Flags to pass down to makes which are built with the target environment.
  270. # The double $ decreases the length of the command line; the variables
  271. # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
  272. # If any variables are added here, they must be added to do-*, below.
  273. EXTRA_TARGET_FLAGS = \
  274.     'AR=$$(AR_FOR_TARGET)' \
  275.     'AS=$$(AS_FOR_TARGET)' \
  276.     'CC=$$(CC_FOR_TARGET)' \
  277.     'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
  278.     'CXX=$$(CXX_FOR_TARGET)' \
  279.     'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
  280.     'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
  281.     'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
  282.     'NM=$$(NM_FOR_TARGET)' \
  283.     'RANLIB=$$(RANLIB_FOR_TARGET)'
  284.  
  285. TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)