OSDN Git Service

2000-10-10 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
[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_INCLUDES = $(top_srcdir)/include
57
58 # Passed down for cross compilers, canadian crosses.
59 TOPLEVEL_INCLUDES = -I$(includedir)
60
61 LIBMATH_INCLUDES = -I$(top_srcdir)/libmath
62
63 if GLIBCPP_NEED_LIBIO
64 LIBIO_INCLUDES = \
65         -I$(top_builddir)/libio -I$(top_srcdir)/libio 
66 else
67 LIBIO_INCLUDES = -I$(top_srcdir)/libio
68 endif
69
70 # XXX may need to add this in later to enabled shadow header includes
71 #       -I$(top_builddir)/cshadow
72 if GLIBCPP_USE_CSHADOW
73 CSHADOW_INCLUDES = \
74         -I$(GLIBCPP_INCLUDES)/std -I$(GLIBCPP_INCLUDES)/c_std
75 else
76 CSHADOW_INCLUDES = \
77         -I$(GLIBCPP_INCLUDES)/std -I$(GLIBCPP_INCLUDES)/c
78 endif
79
80
81 # Use $(blddir) instead of $(top_builddir) for arguments to "mkcheck"
82 # because then the paths will be full pathnames, not relative
83 # pathnames. (-Wl,--rpath seems to like this better.)
84 check:  $(top_builddir)/mkcheck
85         chmod +x  $(top_builddir)/mkcheck
86         $(top_builddir)/mkcheck 0 `pwd` $(top_srcdir)
87
88 check-install: $(top_builddir)/mkcheck
89         chmod +x  $(top_builddir)/mkcheck
90         $(top_builddir)/mkcheck 1 `pwd` $(top_srcdir) $(prefix)
91
92 # Multilib support.
93 MAKEOVERRIDES=
94
95 # Multilib variables.
96 MULTISRCTOP =
97 MULTIBUILDTOP =
98 MULTIDIRS =
99 MULTISUBDIR =
100 MULTIDO = true
101 MULTICLEAN = true
102
103 # Multilib Makefile bits.
104 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
105         maintainer-clean-multi
106
107 all-am: all-multi
108 install-am: install-multi
109 mostlyclean-am: mostlyclean-multi
110 clean-am: clean-multi
111 distclean-am: distclean-multi
112 maintainer-clean-am: maintainer-clean-multi
113
114 all-multi:
115         $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
116 install-multi:
117         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
118 mostlyclean-multi:
119         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
120 clean-multi:
121         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
122 distclean-multi:
123         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
124 maintainer-clean-multi:
125         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
126
127 # All the machinations with string instantiations messes up the
128 # automake-generated TAGS rule. Make a simple one here.
129 TAGS: tags-recursive $(LISP)
130
131 # Work around what appears to be a GNU make bug handling MAKEFLAGS
132 # values defined in terms of make variables, as is the case for CC and
133 # friends when we are called from the top level Makefile.
134 AM_MAKEFLAGS = \
135         "AR_FLAGS=$(AR_FLAGS)" \
136         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
137         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
138         "CFLAGS=$(CFLAGS)" \
139         "CXXFLAGS=$(CXXFLAGS)" \
140         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
141         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
142         "INSTALL=$(INSTALL)" \
143         "INSTALL_DATA=$(INSTALL_DATA)" \
144         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
145         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
146         "LDFLAGS=$(LDFLAGS)" \
147         "LIBCFLAGS=$(LIBCFLAGS)" \
148         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
149         "MAKE=$(MAKE)" \
150         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
151         "PICFLAG=$(PICFLAG)" \
152         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
153         "SHELL=$(SHELL)" \
154         "EXPECT=$(EXPECT)" \
155         "RUNTEST=$(RUNTEST)" \
156         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
157         "exec_prefix=$(exec_prefix)" \
158         "infodir=$(infodir)" \
159         "libdir=$(libdir)" \
160         "includedir=$(includedir)" \
161         "prefix=$(prefix)" \
162         "tooldir=$(tooldir)" \
163         "AR=$(AR)" \
164         "AS=$(AS)" \
165         "CC=$(CC)" \
166         "CXX=$(CXX)" \
167         "LD=$(LD)" \
168         "LIBCFLAGS=$(LIBCFLAGS)" \
169         "PICFLAG=$(PICFLAG)" \
170         "RANLIB=$(RANLIB)" \
171         "NM=$(NM)" \
172         "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
173         "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
174         "DESTDIR=$(DESTDIR)" \
175         "WERROR=$(WERROR)" \
176         "OPTIMIZE_CXXFLAGS=$(OPTIMIZE_CXXFLAGS)" \
177         "WARN_CXXFLAGS=$(WARN_CXXFLAGS)" \
178         "CONFIG_CXXFLAGS=$(CONFIG_CXXFLAGS)" \
179         "GLIBCPP_INCLUDES=$(GLIBCPP_INCLUDES)" \
180         "TOPLEVEL_INCLUDES=$(TOPLEVEL_INCLUDES)" \
181         "LIBMATH_INCLUDES=$(LIBMATH_INCLUDES)" \
182         "LIBIO_INCLUDES=$(LIBIO_INCLUDES)" \
183         "CSHADOW_INCLUDES=$(CSHADOW_INCLUDES)"
184