Makefile.am
00001 ## Makefile for the src subdirectory of the GNU C++ Standard library.
00002 ##
00003 ## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
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 toolexecdir = @glibcpp_toolexecdir@
00033 toolexeclibdir = @glibcpp_toolexeclibdir@
00034 toolexeclib_LTLIBRARIES = libstdc++.la
00035
00036 # Compile flags that should be constant throughout the build, both for
00037 # SUBDIRS and for libstdc++-v3 in general.
00038 OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
00039
00040 # These bits are all figured out from configure. Look in acinclude.m4
00041 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
00042 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
00043 CONFIG_CXXFLAGS = \
00044 @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @DEBUG_FLAGS@
00045
00046 # Warning flags to use.
00047 WARN_CXXFLAGS = \
00048 @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
00049
00050 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
00051 GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
00052 LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
00053 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
00054 LIBIO_INCLUDES = @LIBIO_INCLUDES@
00055 TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
00056
00057 INCLUDES = \
00058 -nostdinc++ \
00059 $(GLIBCPP_INCLUDES) \
00060 $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
00061 $(TOPLEVEL_INCLUDES)
00062
00063 # Source files linked in via configuration magic for a particular target.
00064 target_sources = \
00065 codecvt_members.cc \
00066 collate_members.cc \
00067 ctype_members.cc \
00068 messages_members.cc \
00069 monetary_members.cc \
00070 numeric_members.cc \
00071 time_members.cc
00072
00073 # Source files linked in via configuration magic for a particular
00074 # target, but with ad hoc naming rules.
00075 target_sources_extra = \
00076 basic_file.cc \
00077 c++locale.cc
00078
00079 # Sources present in the src directory.
00080 sources = \
00081 bitset.cc \
00082 codecvt.cc \
00083 complex_io.cc \
00084 concept-inst.cc \
00085 ctype.cc \
00086 ext-inst.cc \
00087 fstream.cc \
00088 fstream-inst.cc \
00089 functexcept.cc \
00090 globals.cc \
00091 io-inst.cc \
00092 ios.cc \
00093 istream-inst.cc \
00094 limits.cc \
00095 locale.cc \
00096 locale-inst.cc \
00097 localename.cc \
00098 misc-inst.cc \
00099 ostream-inst.cc \
00100 sstream-inst.cc \
00101 stdexcept.cc \
00102 stl-inst.cc \
00103 streambuf-inst.cc \
00104 string-inst.cc \
00105 strstream.cc \
00106 valarray-inst.cc \
00107 vterminate.cc \
00108 wstring-inst.cc \
00109 ${target_sources} \
00110 ${target_sources_extra}
00111
00112 VPATH = $(top_srcdir)/src:$(top_srcdir)
00113
00114 libstdc___la_SOURCES = $(sources)
00115
00116 libstdc___la_LIBADD = \
00117 ../libmath/libmath.la @libio_la@ \
00118 ../libsupc++/libsupc++convenience.la
00119
00120 if GLIBCPP_BUILD_VERSIONED_SHLIB
00121 version_arg=-Wl,--version-script=linker.map
00122 else
00123 version_arg=
00124 endif
00125
00126 libstdc___la_LDFLAGS = \
00127 -version-info @libtool_VERSION@ ${version_arg} \
00128 -lm @LIBUNWIND_FLAG@
00129
00130 libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) linker.map
00131
00132 # Use special rules for the deprecated source files so that they find
00133 # deprecated include files.
00134 GLIBCPP_INCLUDE_DIR=@glibcpp_builddir@/include
00135 strstream.lo: strstream.cc
00136 $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
00137 strstream.o: strstream.cc
00138 $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
00139
00140 # Use special rules for the concept-checking instantiations so that all
00141 # the generated template functions are also instantiated. Force the checks
00142 # to be on so that the instantiations are actually seen.
00143 concept-inst.lo: concept-inst.cc
00144 $(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
00145 concept-inst.o: concept-inst.cc
00146 $(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
00147
00148
00149 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
00150 # modified in a per-library or per-sub-library way. Need to manually
00151 # set this option because CONFIG_CXXFLAGS has to be after
00152 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
00153 # as the occasion call for it. (ie, --enable-debug)
00154 AM_CXXFLAGS = \
00155 -fno-implicit-templates \
00156 $(LIBSUPCXX_CXXFLAGS) \
00157 $(WARN_CXXFLAGS) \
00158 $(OPTIMIZE_CXXFLAGS) \
00159 $(CONFIG_CXXFLAGS)
00160
00161
00162 # libstdc++ libtool notes
00163
00164 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
00165 # last. (That way, things like -O2 passed down from the toplevel can
00166 # be overridden by --enable-debug.)
00167
00168 # 2) In general, libtool expects an argument such as `--tag=CXX' when
00169 # using the C++ compiler, because that will enable the settings
00170 # detected when C++ support was being configured. However, when no
00171 # such flag is given in the command line, libtool attempts to figure
00172 # it out by matching the compiler name in each configuration section
00173 # against a prefix of the command line. The problem is that, if the
00174 # compiler name and its initial flags stored in the libtool
00175 # configuration file don't match those in the command line, libtool
00176 # can't decide which configuration to use, and it gives up. The
00177 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
00178 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
00179 # attempt to infer which configuration to use
00180 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
00181 $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
00182
00183 # 3) We'd have a problem when building the shared libstdc++ object if
00184 # the rules automake generates would be used. We cannot allow g++ to
00185 # be used since this would add -lstdc++ to the link line which of
00186 # course is problematic at this point. So, we get the top-level
00187 # directory to configure libstdc++-v3 to use gcc as the C++
00188 # compilation driver.
00189 CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
00190 @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
00191
00192 install-exec-local:
00193 $(AR) cru libstdc++_pic.a .libs
00194
00195
Generated on Wed Sep 29 13:54:49 2004 for libstdc++-v3 Source by
1.3.7