home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / libg++-2.6-fsf.lha / libg++-2.6 / Makefile.in < prev    next >
Makefile  |  1994-07-18  |  33KB  |  1,176 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.  
  68. CXX = gcc
  69.  
  70. # Use -O to stress test the compiler.
  71. CXXFLAGS = -g -O -fexternal-templates
  72.  
  73. RANLIB = ranlib
  74. NM = nm
  75. # Not plain GZIP, since gzip looks there for extra command-line options.
  76. GZIPPROG = gzip
  77.  
  78. BISON = bison -y
  79. LEX = `if [ -f $$r/flex/flex ] ; \
  80.     then echo $$r/flex/flex ; \
  81.     else echo flex ; fi`
  82.  
  83. M4 = `if [ -f $$r/m4/m4 ] ; \
  84.     then echo $$r/m4/m4 ; \
  85.     else echo m4 ; fi`
  86.  
  87. MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
  88.     then echo $$r/texinfo/makeinfo/makeinfo ; \
  89.     else echo makeinfo ; fi`
  90.  
  91. # This just becomes part of the MAKEINFO definition passed down to
  92. # sub-makes.  It lets flags be given on the command line while still
  93. # using the makeinfo from the object tree.
  94. MAKEINFOFLAGS =
  95.  
  96. EXPECT = `if [ -f $$r/expect/expect ] ; \
  97.     then echo $$r/expect/expect ; \
  98.     else echo expect ; fi`
  99.  
  100. RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
  101.     then echo $${srcroot}/dejagnu/runtest ; \
  102.     else echo runtest ; fi`
  103.  
  104.  
  105. # libraries that may need to be augmented on a system-by-system basis
  106. X11_LIB = -lX11
  107.  
  108. # compilers to use to create programs which must be run in the build
  109. # environment.
  110. CC_FOR_BUILD = $(CC)
  111. CXX_FOR_BUILD = $(CXX)
  112.  
  113. SUBDIRS = "this is set via configure, don't edit this"
  114. OTHERS = 
  115.  
  116. ALL = all.normal
  117. INSTALL_TARGET = install-dirs \
  118.     $(INSTALL_MODULES) \
  119.     $(INSTALL_TARGET_MODULES) \
  120.     $(INSTALL_X11_MODULES) \
  121.     install-gcc \
  122.     $(INSTALL_DOSREL)
  123.  
  124.  
  125. CC_FOR_TARGET = ` \
  126.   if [ -f $$r/gcc/Makefile ] ; then \
  127.     if [ -f $$r/newlib/Makefile ] ; then \
  128.       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
  129.     else \
  130.       echo $$r/gcc/xgcc -B$$r/gcc/; \
  131.     fi; \
  132.   else \
  133.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  134.       echo $(CC); \
  135.     else \
  136.       t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
  137.     fi; \
  138.   fi`
  139.  
  140.  
  141. CXX_FOR_TARGET = ` \
  142.   if [ -f $$r/gcc/Makefile ] ; then \
  143.     if [ -f $$r/newlib/Makefile ] ; then \
  144.       echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
  145.     else \
  146.       echo $$r/gcc/xgcc -B$$r/gcc/; \
  147.     fi; \
  148.   else \
  149.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  150.       echo $(CXX); \
  151.     else \
  152.       t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
  153.     fi; \
  154.   fi`
  155.  
  156. AS_FOR_TARGET = ` \
  157.   if [ -f $$r/gas/Makefile ] ; then \
  158.     echo $$r/gas/as.new ; \
  159.   else \
  160.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  161.       echo $(AS); \
  162.     else \
  163.        t='$(program_transform_name)'; echo as | sed -e 's/brokensed/brokensed/' $$t ; \
  164.     fi; \
  165.   fi`
  166.  
  167. AR_FOR_TARGET = ` \
  168.   if [ -f $$r/binutils/ar ] ; then \
  169.     echo $$r/binutils/ar ; \
  170.   else \
  171.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  172.       echo $(AR); \
  173.     else \
  174.        t='$(program_transform_name)'; echo ar | sed -e 's/brokensed/brokensed/' $$t ; \
  175.     fi; \
  176.   fi`
  177.  
  178. RANLIB_FOR_TARGET = ` \
  179.   if [ -f $$r/binutils/ranlib ] ; then \
  180.     echo $$r/binutils/ranlib ; \
  181.   else \
  182.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  183.       echo $(RANLIB); \
  184.     else \
  185.        t='$(program_transform_name)'; echo ranlib | sed -e 's/brokensed/brokensed/' $$t ; \
  186.     fi; \
  187.   fi`
  188.  
  189. NM_FOR_TARGET = ` \
  190.   if [ -f $$r/binutils/Makefile ] ; then \
  191.     echo $$r/binutils/nm.new ; \
  192.   else \
  193.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  194.       echo $(NM); \
  195.     else \
  196.        t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \
  197.     fi; \
  198.   fi`
  199.  
  200.  
  201. #### host and target specific makefile fragments come in here.
  202. ###
  203.  
  204. # Flags to pass down to all sub-makes.
  205. # Please keep these in alphabetical order.
  206. BASE_FLAGS_TO_PASS = \
  207.     "AR_FLAGS=$(AR_FLAGS)" \
  208.     "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  209.     "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
  210.     "BISON=$(BISON)" \
  211.     "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  212.     "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  213.     "CFLAGS=$(CFLAGS)" \
  214.     "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
  215.     "CXXFLAGS=$(CXXFLAGS)" \
  216.     "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  217.     "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
  218.     "INSTALL=$(INSTALL)" \
  219.     "INSTALL_DATA=$(INSTALL_DATA)" \
  220.     "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  221.     "INSTALL_XFORM=$(INSTALL_XFORM)" \
  222.     "LDFLAGS=$(LDFLAGS)" \
  223.     "LEX=$(LEX)" \
  224.     "M4=$(M4)" \
  225.     "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  226.     "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
  227.     "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  228.     "SHELL=$(SHELL)" \
  229.     "EXPECT=$(EXPECT)" \
  230.     "RUNTEST=$(RUNTEST)" \
  231.     "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  232.     "YACC=$(BISON)" \
  233.     "exec_prefix=$(exec_prefix)" \
  234.     "prefix=$(prefix)" \
  235.     "tooldir=$(tooldir)" 
  236.  
  237. # Flags to pass down to most sub-makes, in which we're building with
  238. # the host environment.
  239. # If any variables are added here, they must be added to do-*, below.
  240. EXTRA_HOST_FLAGS = \
  241.     'AR=$(AR)' \
  242.     'AS=$(AS)' \
  243.     'CC=$(CC)' \
  244.     'CXX=$(CXX)' \
  245.     'NM=$(NM)' \
  246.     'RANLIB=$(RANLIB)'
  247.  
  248. FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
  249.  
  250. # Flags that are concerned with the location of the X11 include files
  251. # and library files
  252. X11_FLAGS_TO_PASS = \
  253.     "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
  254.     "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
  255.     "X11_LIB=$(X11_LIB)"
  256.  
  257. # Flags to pass down to makes which are built with the target environment.
  258. # The double $ decreases the length of the command line; the variables
  259. # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
  260. # If any variables are added here, they must be added to do-*, below.
  261. EXTRA_TARGET_FLAGS = \
  262.     'AR=$$(AR_FOR_TARGET)' \
  263.     'AS=$$(AS_FOR_TARGET)' \
  264.     'CC=$$(CC_FOR_TARGET)' \
  265.     'CXX=$$(CXX_FOR_TARGET)' \
  266.     'NM=$$(NM_FOR_TARGET)' \
  267.     'RANLIB=$$(RANLIB_FOR_TARGET)'
  268.  
  269. TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
  270.  
  271. # Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
  272. # unfortunately needs the native compiler and the target ar and
  273. # ranlib.
  274. # If any variables are added here, they must be added to do-*, below.
  275. # The HOST_* variables are a special case, which are used for the gcc
  276. # cross-building scheme.
  277. EXTRA_GCC_FLAGS = \
  278.     'AR=$$(AR_FOR_TARGET)' \
  279.     'AS=$(AS)' \
  280.     'CC=$(CC)' \
  281.     'CXX=$(CXX)' \
  282.     'HOST_CC=$(CC_FOR_BUILD)' \
  283.     'HOST_PREFIX=$(HOST_PREFIX)' \
  284.     'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
  285.     'NM=$(NM)' \
  286.     'RANLIB=$$(RANLIB_FOR_TARGET)'
  287.  
  288. GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GC