00001 ## Makefile for the src subdirectory of the GNU C++ Standard library.
00002 ##
00003 ## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
00004 ## Free Software Foundation, Inc.
00005 ##
00006 ## This file is part of the libstdc++ version 3 distribution.
00007 ## Process this file with automake to produce Makefile.in.
00008
00009 ## This file is part of the GNU ISO C++ Library. This library is free
00010 ## software; you can redistribute it and/or modify it under the
00011 ## terms of the GNU General Public License as published by the
00012 ## Free Software Foundation; either version 2, or (at your option)
00013 ## any later version.
00014
00015 ## This library is distributed in the hope that it will be useful,
00016 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018 ## GNU General Public License for more details.
00019
00020 ## You should have received a copy of the GNU General Public License along
00021 ## with this library; see the file COPYING. If not, write to the Free
00022 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00023 ## USA.
00024
00025 AUTOMAKE_OPTIONS = 1.3 cygnus
00026 MAINT_CHARSET = latin1
00027
00028 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
00029
00030 # Cross compiler support.
00031 CXX = @glibcpp_CXX@
00032 glibcpp_srcdir=@glibcpp_srcdir@
00033 glibcpp_builddir=@glibcpp_builddir@
00034 toolexecdir = @glibcpp_toolexecdir@
00035 toolexeclibdir = @glibcpp_toolexeclibdir@
00036 toolexeclib_LTLIBRARIES = libstdc++.la
00037
00038 # Symbol versioning for shared libraries.
00039 if GLIBCPP_BUILD_VERSIONED_SHLIB
00040 version_arg = -Wl,--version-script=libstdc++-symbol.ver
00041 libstdc++-symbol.ver: ${glibcpp_srcdir}/@SYMVER_MAP@
00042 @LN_S@ ${glibcpp_srcdir}/@SYMVER_MAP@ ./libstdc++-symbol.ver || true
00043 else
00044 version_arg =
00045 libstdc++-symbol.ver:
00046 endif
00047
00048 # Compile flags that should be constant throughout the build, both for
00049 # SUBDIRS and for libstdc++-v3 in general.
00050 OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
00051
00052 # These bits are all figured out from configure. Look in acinclude.m4
00053 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
00054 CONFIG_CXXFLAGS = \
00055 @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
00056
00057 # Warning flags to use.
00058 WARN_CXXFLAGS = \
00059 @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
00060
00061 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
00062 GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
00063 LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
00064 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
00065 LIBIO_INCLUDES = @LIBIO_INCLUDES@
00066 TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
00067
00068 INCLUDES = \
00069 -nostdinc++ \
00070 $(GLIBCPP_INCLUDES) \
00071 $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
00072 $(TOPLEVEL_INCLUDES)
00073
00074 # Source files linked in via configuration/make substitution for a
00075 # particular target.
00076 target_sources = \
00077 codecvt_members.cc \
00078 collate_members.cc \
00079 ctype_members.cc \
00080 messages_members.cc \
00081 monetary_members.cc \
00082 numeric_members.cc \
00083 time_members.cc
00084
00085 codecvt_members.cc: ${glibcpp_srcdir}/@CCODECVT_CC@
00086 @LN_S@ ${glibcpp_srcdir}/@CCODECVT_CC@ . || true
00087
00088 collate_members.cc: ${glibcpp_srcdir}/@CCOLLATE_CC@
00089 @LN_S@ ${glibcpp_srcdir}/@CCOLLATE_CC@ . || true
00090
00091 ctype_members.cc: ${glibcpp_srcdir}/@CCTYPE_CC@
00092 @LN_S@ ${glibcpp_srcdir}/@CCTYPE_CC@ . || true
00093
00094 messages_members.cc: ${glibcpp_srcdir}/@CMESSAGES_CC@
00095 @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_CC@ . || true
00096
00097 monetary_members.cc: ${glibcpp_srcdir}/@CMONEY_CC@
00098 @LN_S@ ${glibcpp_srcdir}/@CMONEY_CC@ . || true
00099
00100 numeric_members.cc: ${glibcpp_srcdir}/@CNUMERIC_CC@
00101 @LN_S@ ${glibcpp_srcdir}/@CNUMERIC_CC@ . || true
00102
00103 time_members.cc: ${glibcpp_srcdir}/@CTIME_CC@
00104 @LN_S@ ${glibcpp_srcdir}/@CTIME_CC@ . || true
00105
00106 # Source files linked in via configuration/make substitution for a
00107 # particular target, but with ad hoc naming rules.
00108 target_sources_extra = \
00109 basic_file.cc \
00110 c++locale.cc
00111
00112 c++locale.cc: ${glibcpp_srcdir}/@CLOCALE_CC@
00113 @LN_S@ ${glibcpp_srcdir}/@CLOCALE_CC@ ./$@ || true
00114
00115 basic_file.cc: ${glibcpp_srcdir}/@BASIC_FILE_CC@
00116 @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_CC@ ./$@ || true
00117
00118 # Sources present in the src directory.
00119 sources = \
00120 bitset.cc \
00121 codecvt.cc \
00122 complex_io.cc \
00123 concept-inst.cc \
00124 ctype.cc \
00125 ext-inst.cc \
00126 fstream.cc \
00127 fstream-inst.cc \
00128 functexcept.cc \
00129 globals.cc \
00130 io-inst.cc \
00131 ios.cc \
00132 istream-inst.cc \
00133 limits.cc \
00134 locale.cc \
00135 locale-inst.cc \
00136 localename.cc \
00137 misc-inst.cc \
00138 ostream-inst.cc \
00139 sstream-inst.cc \
00140 stdexcept.cc \
00141 stl-inst.cc \
00142 streambuf-inst.cc \
00143 string-inst.cc \
00144 strstream.cc \
00145 valarray-inst.cc \
00146 vterminate.cc \
00147 wstring-inst.cc \
00148 ${target_sources} \
00149 ${target_sources_extra}
00150
00151 VPATH = $(top_srcdir)/src:$(top_srcdir)
00152
00153 libstdc___la_SOURCES = $(sources)
00154
00155 libstdc___la_LIBADD = \
00156 $(top_builddir)/libmath/libmath.la @libio_la@ \
00157 $(top_builddir)/libsupc++/libsupc++convenience.la
00158
00159 libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
00160
00161 libstdc___la_LDFLAGS = \
00162 -version-info @libtool_VERSION@ ${version_arg} \
00163 -lm @LIBUNWIND_FLAG@
00164
00165
00166 # Use special rules for the deprecated source files so that they find
00167 # deprecated include files.
00168 GLIBCPP_INCLUDE_DIR=@glibcpp_builddir@/include
00169 strstream.lo: strstream.cc
00170 $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
00171 strstream.o: strstream.cc
00172 $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
00173
00174 # Use special rules for the concept-checking instantiations so that all
00175 # the generated template functions are also instantiated. Force the checks
00176 # to be on so that the instantiations are actually seen.
00177 concept-inst.lo: concept-inst.cc
00178 $(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
00179 concept-inst.o: concept-inst.cc
00180 $(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
00181
00182
00183 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
00184 # modified in a per-library or per-sub-library way. Need to manually
00185 # set this option because CONFIG_CXXFLAGS has to be after
00186 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
00187 # as the occasion call for it.
00188 AM_CXXFLAGS = \
00189 -fno-implicit-templates \
00190 $(LIBSUPCXX_CXXFLAGS) \
00191 $(WARN_CXXFLAGS) \
00192 $(OPTIMIZE_CXXFLAGS) \
00193 $(CONFIG_CXXFLAGS)
00194
00195
00196 # libstdc++ libtool notes
00197
00198 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
00199 # last. (That way, things like -O2 passed down from the toplevel can
00200 # be overridden by --enable-debug.)
00201
00202 # 2) In general, libtool expects an argument such as `--tag=CXX' when
00203 # using the C++ compiler, because that will enable the settings
00204 # detected when C++ support was being configured. However, when no
00205 # such flag is given in the command line, libtool attempts to figure
00206 # it out by matching the compiler name in each configuration section
00207 # against a prefix of the command line. The problem is that, if the
00208 # compiler name and its initial flags stored in the libtool
00209 # configuration file don't match those in the command line, libtool
00210 # can't decide which configuration to use, and it gives up. The
00211 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
00212 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
00213 # attempt to infer which configuration to use
00214 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
00215 $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
00216
00217 # 3) We'd have a problem when building the shared libstdc++ object if
00218 # the rules automake generates would be used. We cannot allow g++ to
00219 # be used since this would add -lstdc++ to the link line which of
00220 # course is problematic at this point. So, we get the top-level
00221 # directory to configure libstdc++-v3 to use gcc as the C++
00222 # compilation driver.
00223 CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
00224 @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
00225
00226
00227 install-exec-local:
00228 $(AR) cru libstdc++_pic.a .libs
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262