1 ## Makefile for the C++03 sources of the GNU C++ Standard library.
3 ## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4 ## 2006, 2007, 2008, 2009, 2010, 2011, 2012
5 ## Free Software Foundation, Inc.
7 ## This file is part of the libstdc++ version 3 distribution.
8 ## Process this file with automake to produce Makefile.in.
10 ## This file is part of the GNU ISO C++ Library. This library is free
11 ## software; you can redistribute it and/or modify it under the
12 ## terms of the GNU General Public License as published by the
13 ## Free Software Foundation; either version 3, or (at your option)
16 ## This library is distributed in the hope that it will be useful,
17 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ## GNU General Public License for more details.
21 ## You should have received a copy of the GNU General Public License along
22 ## with this library; see the file COPYING3. If not see
23 ## <http://www.gnu.org/licenses/>.
25 include $(top_srcdir)/fragment.am
27 # Convenience library for C++11 runtime.
28 toolexeclib_LTLIBRARIES = libc++11.la
29 noinst_LTLIBRARIES = libc++11convenience.la
35 condition_variable.cc \
36 compatibility-c++0x.cc \
37 compatibility-atomic-c++0x.cc \
52 if ENABLE_EXTERN_TEMPLATE
53 XTEMPLATE_FLAGS = -fno-implicit-templates
63 vpath % $(top_srcdir)/src/c++11
66 libc__11_la_SOURCES = $(sources) $(inst_sources)
67 libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
69 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
70 # modified in a per-library or per-sub-library way. Need to manually
71 # set this option because CONFIG_CXXFLAGS has to be after
72 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
73 # as the occasion calls for it.
78 $(OPTIMIZE_CXXFLAGS) \
79 $(CONFIG_CXXFLAGS) -std=gnu++11
82 "gxx_include_dir=$(gxx_include_dir)"
86 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
87 # last. (That way, things like -O2 passed down from the toplevel can
88 # be overridden by --enable-debug.)
90 # 2) In general, libtool expects an argument such as `--tag=CXX' when
91 # using the C++ compiler, because that will enable the settings
92 # detected when C++ support was being configured. However, when no
93 # such flag is given in the command line, libtool attempts to figure
94 # it out by matching the compiler name in each configuration section
95 # against a prefix of the command line. The problem is that, if the
96 # compiler name and its initial flags stored in the libtool
97 # configuration file don't match those in the command line, libtool
98 # can't decide which configuration to use, and it gives up. The
99 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
100 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
101 # attempt to infer which configuration to use.
102 # We have to put --tag disable-shared after --tag CXX lest things
103 # CXX undo the affect of disable-shared.
104 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
105 --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
106 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
108 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
110 # 3) We'd have a problem when building the shared libstdc++ object if
111 # the rules automake generates would be used. We cannot allow g++ to
112 # be used since this would add -lstdc++ to the link line which of
113 # course is problematic at this point. So, we get the top-level
114 # directory to configure libstdc++-v3 to use gcc as the C++
115 # compilation driver.
116 CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
118 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@