1 ## Makefile for the toplevel directory of the GNU C++ Standard library.
3 ## Copyright (C) 1997,1998, 1999, 2000 Free Software Foundation, Inc.
5 ## This file is part of the libstdc++ version 3 distribution.
6 ## Process this file with automake to produce Makefile.in.
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)
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.
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,
24 AUTOMAKE_OPTIONS = 1.3 cygnus
25 MAINT_CHARSET = latin1
27 # This helps subvert libstdcxx_interface, as calculated by devo/config.if
28 # Needed so that g++ can find the correct include subdir automatically.
30 gxx_include_dir=$(includedir)/g++
32 SUBDIRS = libio libmath libsupc++ src
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
42 # Warning flags to use.
44 -Wall -Wno-format -W -Wwrite-strings -Winline \
45 $(WERROR) @WFMT_FLAGS@
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.
52 @SECTION_FLAGS@ @CSHADOWFLAGS@ @DEBUG_FLAGS@
55 # Root level of the include sources.
56 GLIBCPP_INCLUDES = $(top_srcdir)/include
58 # Passed down for cross compilers, canadian crosses.
59 TOPLEVEL_INCLUDES = -I$(includedir)
61 LIBMATH_INCLUDES = -I$(top_srcdir)/libmath
65 -I$(top_builddir)/libio -I$(top_srcdir)/libio
67 LIBIO_INCLUDES = -I$(top_srcdir)/libio
70 # XXX may need to add this in later to enabled shadow header includes
71 # -I$(top_builddir)/cshadow
72 if GLIBCPP_USE_CSHADOW
74 -I$(GLIBCPP_INCLUDES)/std -I$(GLIBCPP_INCLUDES)/c_std
77 -I$(GLIBCPP_INCLUDES)/std -I$(GLIBCPP_INCLUDES)/c
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)
88 check-install: $(top_builddir)/mkcheck
89 chmod +x $(top_builddir)/mkcheck
90 $(top_builddir)/mkcheck 1 `pwd` $(top_srcdir) $(prefix)
103 # Multilib Makefile bits.
104 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
105 maintainer-clean-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
115 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
117 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
119 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
121 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
123 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
124 maintainer-clean-multi:
125 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
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)
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.
135 "AR_FLAGS=$(AR_FLAGS)" \
136 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
137 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
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)" \
150 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
151 "PICFLAG=$(PICFLAG)" \
152 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
155 "RUNTEST=$(RUNTEST)" \
156 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
157 "exec_prefix=$(exec_prefix)" \
158 "infodir=$(infodir)" \
160 "includedir=$(includedir)" \
162 "tooldir=$(tooldir)" \
168 "LIBCFLAGS=$(LIBCFLAGS)" \
169 "PICFLAG=$(PICFLAG)" \
172 "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
173 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
174 "DESTDIR=$(DESTDIR)" \
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)"