OSDN Git Service

530ccc36fd1322f766be7d33343abc0a42510d4e
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / Makefile.am
1 ## Makefile for the toplevel directory of the GNU C++ Standard library.
2 ##
3 ## Copyright (C) 1997,1998, 1999, 2000 Free Software Foundation, Inc.
4 ##
5 ## This file is part of the libstdc++ version 3 distribution.
6 ## Process this file with automake to produce Makefile.in.
7
8 ## This file is part of the GNU ISO C++ Library.  This library is free
9 ## software; you can redistribute it and/or modify it under the
10 ## terms of the GNU General Public License as published by the
11 ## Free Software Foundation; either version 2, or (at your option)
12 ## any later version.
13
14 ## This library is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ## GNU General Public License for more details.
18
19 ## You should have received a copy of the GNU General Public License along
20 ## with this library; see the file COPYING.  If not, write to the Free
21 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22 ## USA.
23
24 AUTOMAKE_OPTIONS = 1.3 cygnus
25 MAINT_CHARSET = latin1
26
27 # This helps subvert libstdcxx_interface, as calculated by devo/config.if
28 # Needed so that g++ can find the correct include subdir automatically.
29 INTERFACE = v3
30 gxx_include_dir=$(includedir)/g++
31
32 SUBDIRS = libio libmath libsupc++ src
33
34
35 # Compile flags that should be constant throughout the build, both for
36 # SUBDIRS and for libstdc++-v3 in general.
37 # Optimization flags that are probably a good idea for thrill-seekers. Just
38 # uncomment the lines below and make, everything else is ready to go... 
39 # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc 
40 OPTIMIZE_CXXFLAGS = 
41
42 # Warning flags to use.
43 WARN_CXXFLAGS = \
44         -Wall -Wno-format -W -Wwrite-strings -Winline \
45         $(WERROR) @WFMT_FLAGS@
46
47 # These bits are all figured out from configure. Look in acinclude.m4
48 # or configure.in to see how they are set.
49 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
50 CONFIG_CXXFLAGS = \
51         @EXTRA_CXX_FLAGS@ \
52         @SECTION_FLAGS@ @CSHADOWFLAGS@ @DEBUG_FLAGS@ 
53
54
55 # Root level of the include sources.
56 GLIBCPP_INCLUDE_DIR = $(top_srcdir)/include
57
58 # Can either use include/c or include/c_std to grab "C" headers. This
59 # variable is set to the include directory currently in use.
60 C_INCLUDE_DIR = $(GLIBCPP_INCLUDE_DIR)/@c_include_dir@
61
62
63 # Passed down for cross compilers, canadian crosses.
64 TOPLEVEL_INCLUDES = -I$(includedir)
65
66 LIBMATH_INCLUDES = -I$(top_srcdir)/libmath
67
68 if GLIBCPP_NEED_LIBIO
69 LIBIO_INCLUDES = \
70         -I$(top_builddir)/libio -I$(top_srcdir)/libio 
71 else
72 LIBIO_INCLUDES = -I$(top_srcdir)/libio
73 endif
74
75 LIBSUPCXX_INCLUDES = -I$(top_srcdir)/libsupc++
76
77 # XXX May need to add this in later to enabled shadow header includes
78 #       -I$(top_builddir)/cshadow
79 CSHADOW_INCLUDES = \
80         -I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)
81
82
83 # Use $(blddir) instead of $(top_builddir) for arguments to "mkcheck"
84 # because then the paths will be full pathnames, not relative
85 # pathnames. (-Wl,--rpath seems to like this better.)
86 check:  $(top_builddir)/mkcheck
87         chmod +x  $(top_builddir)/mkcheck
88         $(top_builddir)/mkcheck 0 `pwd` $(top_srcdir)
89
90 check-install: $(top_builddir)/mkcheck
91         chmod +x  $(top_builddir)/mkcheck
92         $(top_builddir)/mkcheck 1 `pwd` $(top_srcdir) $(prefix)
93
94 # Multilib support.
95 MAKEOVERRIDES=
96
97 # Multilib variables.
98 MULTISRCTOP =
99 MULTIBUILDTOP =
100 MULTIDIRS =
101 MULTISUBDIR =
102 MULTIDO = true
103 MULTICLEAN = true
104
105 # Multilib Makefile bits.
106 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
107         maintainer-clean-multi
108
109 all-am: all-multi
110 install-am: install-multi
111 mostlyclean-am: mostlyclean-multi
112 clean-am: clean-multi
113 distclean-am: distclean-multi
114 maintainer-clean-am: maintainer-clean-multi
115
116 all-multi:
117         $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
118 install-multi:
119         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
120 mostlyclean-multi:
121         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
122 clean-multi:
123         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
124 distclean-multi:
125         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
126 maintainer-clean-multi:
127         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
128
129 # All the machinations with string instantiations messes up the
130 # automake-generated TAGS rule. Make a simple one here.
131 TAGS: tags-recursive $(LISP)
132
133 # Work around what appears to be a GNU make bug handling MAKEFLAGS
134 # values defined in terms of make variables, as is the case for CC and
135 # friends when we are called from the top level Makefile.
136 AM_MAKEFLAGS = \
137         "AR_FLAGS=$(AR_FLAGS)" \
138         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
139         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
140         "CFLAGS=$(CFLAGS)" \
141         "CXXFLAGS=$(CXXFLAGS)" \
142         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
143         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
144         "INSTALL=$(INSTALL)" \
145         "INSTALL_DATA=$(INSTALL_DATA)" \
146         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
147         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
148         "LDFLAGS=$(LDFLAGS)" \
149         "LIBCFLAGS=$(LIBCFLAGS)" \
150         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
151         "MAKE=$(MAKE)" \
152         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
153         "PICFLAG=$(PICFLAG)" \
154         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
155         "SHELL=$(SHELL)" \
156         "EXPECT=$(EXPECT)" \
157         "RUNTEST=$(RUNTEST)" \
158         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
159         "exec_prefix=$(exec_prefix)" \
160         "infodir=$(infodir)" \
161         "libdir=$(libdir)" \
162         "includedir=$(includedir)" \
163         "prefix=$(prefix)" \
164         "tooldir=$(tooldir)" \
165         "AR=$(AR)" \
166         "AS=$(AS)" \
167         "CC=$(CC)" \
168         "CXX=$(CXX)" \
169         "LD=$(LD)" \
170         "LIBCFLAGS=$(LIBCFLAGS)" \
171         "PICFLAG=$(PICFLAG)" \
172         "RANLIB=$(RANLIB)" \
173         "NM=$(NM)" \
174         "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
175         "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
176         "DESTDIR=$(DESTDIR)" \
177         "WERROR=$(WERROR)" \
178         "OPTIMIZE_CXXFLAGS=$(OPTIMIZE_CXXFLAGS)" \
179         "WARN_CXXFLAGS=$(WARN_CXXFLAGS)" \
180         "CONFIG_CXXFLAGS=$(CONFIG_CXXFLAGS)" \
181         "GLIBCPP_INCLUDE_DIR=$(GLIBCPP_INCLUDE_DIR)" \
182         "C_INCLUDE_DIR=$(C_INCLUDE_DIR)" \
183         "TOPLEVEL_INCLUDES=$(TOPLEVEL_INCLUDES)" \
184         "LIBMATH_INCLUDES=$(LIBMATH_INCLUDES)" \
185         "LIBIO_INCLUDES=$(LIBIO_INCLUDES)" \
186         "CSHADOW_INCLUDES=$(CSHADOW_INCLUDES)" \
187         "LIBSUPCXX_INCLUDES=$(LIBSUPCXX_INCLUDES)"