aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/src/Makefile.am')
-rw-r--r--libstdc++-v3/src/Makefile.am100
1 files changed, 84 insertions, 16 deletions
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 4592168f48d..304c035defc 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the src subdirectory of the GNU C++ Standard library.
##
-## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
@@ -29,19 +29,30 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
# Cross compiler support.
CXX = @glibcpp_CXX@
+glibcpp_srcdir=@glibcpp_srcdir@
+glibcpp_builddir=@glibcpp_builddir@
toolexecdir = @glibcpp_toolexecdir@
toolexeclibdir = @glibcpp_toolexeclibdir@
toolexeclib_LTLIBRARIES = libstdc++.la
+# Symbol versioning for shared libraries.
+if GLIBCPP_BUILD_VERSIONED_SHLIB
+version_arg = -Wl,--version-script=libstdc++-symbol.ver
+libstdc++-symbol.ver: ${glibcpp_srcdir}/@SYMVER_MAP@
+ @LN_S@ ${glibcpp_srcdir}/@SYMVER_MAP@ ./libstdc++-symbol.ver || true
+else
+version_arg =
+libstdc++-symbol.ver:
+endif
+
# Compile flags that should be constant throughout the build, both for
# SUBDIRS and for libstdc++-v3 in general.
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
-# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = \
- @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @DEBUG_FLAGS@
+ @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
# Warning flags to use.
WARN_CXXFLAGS = \
@@ -60,7 +71,8 @@ INCLUDES = \
$(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
$(TOPLEVEL_INCLUDES)
-# Source files linked in via configuration magic for a particular target.
+# Source files linked in via configuration/make substitution for a
+# particular target.
target_sources = \
codecvt_members.cc \
collate_members.cc \
@@ -70,12 +82,39 @@ target_sources = \
numeric_members.cc \
time_members.cc
-# Source files linked in via configuration magic for a particular
-# target, but with ad hoc naming rules.
+codecvt_members.cc: ${glibcpp_srcdir}/@CCODECVT_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CCODECVT_CC@ . || true
+
+collate_members.cc: ${glibcpp_srcdir}/@CCOLLATE_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CCOLLATE_CC@ . || true
+
+ctype_members.cc: ${glibcpp_srcdir}/@CCTYPE_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CCTYPE_CC@ . || true
+
+messages_members.cc: ${glibcpp_srcdir}/@CMESSAGES_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_CC@ . || true
+
+monetary_members.cc: ${glibcpp_srcdir}/@CMONEY_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CMONEY_CC@ . || true
+
+numeric_members.cc: ${glibcpp_srcdir}/@CNUMERIC_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CNUMERIC_CC@ . || true
+
+time_members.cc: ${glibcpp_srcdir}/@CTIME_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CTIME_CC@ . || true
+
+# Source files linked in via configuration/make substitution for a
+# particular target, but with ad hoc naming rules.
target_sources_extra = \
basic_file.cc \
c++locale.cc
+c++locale.cc: ${glibcpp_srcdir}/@CLOCALE_CC@
+ @LN_S@ ${glibcpp_srcdir}/@CLOCALE_CC@ ./$@ || true
+
+basic_file.cc: ${glibcpp_srcdir}/@BASIC_FILE_CC@
+ @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_CC@ ./$@ || true
+
# Sources present in the src directory.
sources = \
bitset.cc \
@@ -114,20 +153,15 @@ VPATH = $(top_srcdir)/src:$(top_srcdir)
libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \
- ../libmath/libmath.la @libio_la@ \
- ../libsupc++/libsupc++convenience.la
+ $(top_builddir)/libmath/libmath.la @libio_la@ \
+ $(top_builddir)/libsupc++/libsupc++convenience.la
-if GLIBCPP_BUILD_VERSIONED_SHLIB
-version_arg=-Wl,--version-script=linker.map
-else
-version_arg=
-endif
+libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = \
-version-info @libtool_VERSION@ ${version_arg} \
-lm @LIBUNWIND_FLAG@
-libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) linker.map
# Use special rules for the deprecated source files so that they find
# deprecated include files.
@@ -150,13 +184,13 @@ concept-inst.o: concept-inst.cc
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it. (ie, --enable-debug)
+# as the occasion call for it.
AM_CXXFLAGS = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
- $(CONFIG_CXXFLAGS)
+ $(CONFIG_CXXFLAGS)
# libstdc++ libtool notes
@@ -188,3 +222,37 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
# compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
+# Added bits to build debug library.
+if GLIBCPP_BUILD_DEBUG
+all-local: build_debug
+install-data-local: install_debug
+else
+all-local:
+install-data-local:
+endif
+
+debugdir = debug
+
+# Build parallel set of debug objects here.
+stamp-debug:
+ if test ! -d ${debugdir}; then \
+ mkdir -p ${debugdir}; \
+ (cd ${debugdir}; \
+ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
+ -e 's/srcdir = \.\./srcdir = ..\/../' \
+ -e 's/glibcpp_basedir = \.\./glibcpp_basedir = ..\/../' \
+ -e 's/all-local: build_debug/all-local:/' \
+ -e 's/install-data-local: install_debug/install-data-local:/' \
+ < ../Makefile > Makefile) ; \
+ fi; \
+ echo `date` > stamp-debug;
+
+build_debug: stamp-debug
+ (cd ${debugdir} && $(MAKE) CXXFLAGS='@DEBUG_FLAGS@' all)
+
+# Install debug library here.
+install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=@glibcpp_toolexeclibdir@/debug install)