Makefile.am

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 include $(top_srcdir)/fragment.am
00026 
00027 # Cross compiler support.
00028 toolexeclib_LTLIBRARIES = libstdc++.la
00029 
00030 # Symbol versioning for shared libraries.
00031 if GLIBCXX_BUILD_VERSIONED_SHLIB
00032 version_arg = -Wl,--version-script=libstdc++-symbol.ver
00033 version_dep = libstdc++-symbol.ver
00034 libstdc++-symbol.ver:  ${glibcxx_srcdir}/$(SYMVER_MAP)
00035     cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
00036     if test "x$(port_specific_symbol_files)" != x; then \
00037       sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
00038       sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
00039       cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
00040       rm tmp.top tmp.bottom; \
00041     fi
00042 else
00043 version_arg =
00044 version_dep =
00045 endif
00046 
00047 
00048 # Source files linked in via configuration/make substitution for a
00049 # particular host.
00050 host_sources = \
00051     atomicity.cc \
00052     codecvt_members.cc \
00053     collate_members.cc \
00054     ctype_members.cc \
00055     messages_members.cc \
00056     monetary_members.cc \
00057     numeric_members.cc \
00058     time_members.cc 
00059 
00060 codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC)
00061     $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_CC) . || true
00062 
00063 collate_members.cc: ${glibcxx_srcdir}/$(CCOLLATE_CC)
00064     $(LN_S) ${glibcxx_srcdir}/$(CCOLLATE_CC) . || true
00065 
00066 ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC)
00067     $(LN_S) ${glibcxx_srcdir}/$(CCTYPE_CC) . || true
00068 
00069 messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC)
00070     $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true
00071 
00072 monetary_members.cc: ${glibcxx_srcdir}/$(CMONEY_CC)
00073     $(LN_S) ${glibcxx_srcdir}/$(CMONEY_CC) . || true
00074 
00075 numeric_members.cc: ${glibcxx_srcdir}/$(CNUMERIC_CC)
00076     $(LN_S) ${glibcxx_srcdir}/$(CNUMERIC_CC) . || true
00077 
00078 time_members.cc: ${glibcxx_srcdir}/$(CTIME_CC)
00079     $(LN_S) ${glibcxx_srcdir}/$(CTIME_CC) . || true
00080 
00081 atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
00082 atomicity.cc: ${atomicity_file}
00083     $(LN_S) ${atomicity_file} ./atomicity.cc || true
00084 
00085 # Source files linked in via configuration/make substitution for a
00086 # particular host, but with ad hoc naming rules.
00087 host_sources_extra = \
00088     basic_file.cc \
00089     c++locale.cc
00090 
00091 c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
00092     $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
00093 
00094 basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
00095     $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
00096 
00097 # Sources present in the src directory.
00098 sources = \
00099     allocator.cc \
00100     codecvt.cc \
00101     complex_io.cc \
00102     ctype.cc \
00103     debug.cc \
00104     debug_list.cc \
00105     functexcept.cc \
00106     globals_locale.cc \
00107     globals_io.cc \
00108     ios.cc \
00109     ios_failure.cc \
00110     ios_init.cc \
00111     ios_locale.cc \
00112     limits.cc \
00113     list.cc \
00114     locale.cc \
00115     locale_init.cc \
00116     locale_facets.cc \
00117     localename.cc \
00118     stdexcept.cc \
00119     strstream.cc \
00120     tree.cc \
00121     allocator-inst.cc \
00122     concept-inst.cc \
00123     fstream-inst.cc \
00124     ext-inst.cc \
00125     io-inst.cc \
00126     istream-inst.cc \
00127     locale-inst.cc \
00128     locale-misc-inst.cc \
00129     misc-inst.cc \
00130     ostream-inst.cc \
00131     sstream-inst.cc \
00132     streambuf-inst.cc \
00133     string-inst.cc \
00134     valarray-inst.cc \
00135     wlocale-inst.cc \
00136     wstring-inst.cc \
00137     ${host_sources} \
00138     ${host_sources_extra}
00139 
00140 VPATH = $(top_srcdir)/src:$(top_srcdir)
00141 
00142 libstdc___la_SOURCES = $(sources)
00143 
00144 libstdc___la_LIBADD = \
00145     $(top_builddir)/libmath/libmath.la \
00146     $(top_builddir)/libsupc++/libsupc++convenience.la
00147 
00148 libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
00149 
00150 libstdc___la_LDFLAGS = \
00151     -Wl,-O1 \
00152     -version-info $(libtool_VERSION) ${version_arg} -lm 
00153 
00154 
00155 # Use special rules for the deprecated source files so that they find
00156 # deprecated include files.
00157 GLIBCXX_INCLUDE_DIR=$(glibcxx_builddir)/include
00158 strstream.lo: strstream.cc
00159     $(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
00160 strstream.o: strstream.cc
00161     $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
00162 
00163 # Use special rules for the concept-checking instantiations so that all
00164 # the generated template functions are also instantiated.  Force the checks
00165 # to be on so that the instantiations are actually seen.
00166 concept-inst.lo: concept-inst.cc
00167     $(LTCXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
00168 concept-inst.o: concept-inst.cc
00169     $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
00170 
00171 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
00172 # modified in a per-library or per-sub-library way.  Need to manually
00173 # set this option because CONFIG_CXXFLAGS has to be after
00174 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
00175 # as the occasion calls for it.
00176 AM_CXXFLAGS = \
00177     -fno-implicit-templates \
00178     $(WARN_CXXFLAGS) \
00179     $(OPTIMIZE_CXXFLAGS) \
00180     $(CONFIG_CXXFLAGS)
00181 
00182 
00183 # libstdc++ libtool notes
00184 
00185 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
00186 # last. (That way, things like -O2 passed down from the toplevel can
00187 # be overridden by --enable-debug.)
00188 
00189 # 2) In general, libtool expects an argument such as `--tag=CXX' when
00190 # using the C++ compiler, because that will enable the settings
00191 # detected when C++ support was being configured.  However, when no
00192 # such flag is given in the command line, libtool attempts to figure
00193 # it out by matching the compiler name in each configuration section
00194 # against a prefix of the command line.  The problem is that, if the
00195 # compiler name and its initial flags stored in the libtool
00196 # configuration file don't match those in the command line, libtool
00197 # can't decide which configuration to use, and it gives up.  The
00198 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
00199 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
00200 # attempt to infer which configuration to use
00201 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
00202            $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
00203 
00204 # 3) We'd have a problem when building the shared libstdc++ object if
00205 # the rules automake generates would be used.  We cannot allow g++ to
00206 # be used since this would add -lstdc++ to the link line which of
00207 # course is problematic at this point.  So, we get the top-level
00208 # directory to configure libstdc++-v3 to use gcc as the C++
00209 # compilation driver.
00210 CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
00211       $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
00212 
00213 
00214 install-exec-local:
00215     $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
00216     $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
00217 
00218 # Added bits to build debug library.
00219 if GLIBCXX_BUILD_DEBUG
00220 all-local: build_debug
00221 install-data-local: install_debug
00222 else
00223 all-local:
00224 install-data-local:
00225 endif
00226 
00227 debugdir = debug
00228 
00229 # Build parallel set of debug objects here.
00230 stamp-debug:
00231     if test ! -d ${debugdir}; then \
00232       mkdir -p ${debugdir}; \
00233       (cd ${debugdir}; \
00234       sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
00235           -e 's/srcdir = \.\./srcdir = ..\/../' \
00236           -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
00237           -e 's/all-local: build_debug/all-local:/' \
00238           -e 's/install-data-local: install_debug/install-data-local:/' \
00239       < ../Makefile > Makefile) ; \
00240     fi; \
00241     echo `date` > stamp-debug;
00242 
00243 build_debug: stamp-debug
00244     (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all)
00245 
00246 # Install debug library here.
00247 install_debug:
00248     (cd ${debugdir} && $(MAKE) \
00249     toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)

Generated on Fri May 6 01:09:02 2005 for libstdc++-v3 Source by  doxygen 1.4.2