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_INCLUDE_DIR = $(top_srcdir)/include
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@
63 # Passed down for cross compilers, canadian crosses.
64 TOPLEVEL_INCLUDES = -I$(includedir)
66 LIBMATH_INCLUDES = -I$(top_srcdir)/libmath
70 -I$(top_builddir)/libio -I$(top_srcdir)/libio
72 LIBIO_INCLUDES = -I$(top_srcdir)/libio
75 LIBSUPCXX_INCLUDES = -I$(top_srcdir)/libsupc++
77 # XXX May need to add this in later to enabled shadow header includes
78 # -I$(top_builddir)/cshadow
80 -I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)
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)
90 check-install: $(top_builddir)/mkcheck
91 chmod +x $(top_builddir)/mkcheck
92 $(top_builddir)/mkcheck 1 `pwd` $(top_srcdir) $(prefix)
105 # Multilib Makefile bits.
106 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
107 maintainer-clean-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
117 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
119 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
121 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
123 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
125 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
126 maintainer-clean-multi:
127 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
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)
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.
137 "AR_FLAGS=$(AR_FLAGS)" \
138 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
139 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
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)" \
152 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
153 "PICFLAG=$(PICFLAG)" \
154 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
157 "RUNTEST=$(RUNTEST)" \
158 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
159 "exec_prefix=$(exec_prefix)" \
160 "infodir=$(infodir)" \
162 "includedir=$(includedir)" \
164 "tooldir=$(tooldir)" \
170 "LIBCFLAGS=$(LIBCFLAGS)" \
171 "PICFLAG=$(PICFLAG)" \
174 "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
175 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
176 "DESTDIR=$(DESTDIR)" \
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)"