1 |
742 |
jeremybenn |
## Makefile for the C++03 sources of the GNU C++ Standard library.
|
2 |
|
|
##
|
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.
|
6 |
|
|
##
|
7 |
|
|
## This file is part of the libstdc++ version 3 distribution.
|
8 |
|
|
## Process this file with automake to produce Makefile.in.
|
9 |
|
|
|
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)
|
14 |
|
|
## any later version.
|
15 |
|
|
|
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.
|
20 |
|
|
|
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 |
|
|
## .
|
24 |
|
|
|
25 |
|
|
include $(top_srcdir)/fragment.am
|
26 |
|
|
|
27 |
|
|
# Convenience library for C++11 runtime.
|
28 |
|
|
noinst_LTLIBRARIES = libc++11convenience.la
|
29 |
|
|
|
30 |
|
|
headers =
|
31 |
|
|
|
32 |
|
|
sources = \
|
33 |
|
|
chrono.cc \
|
34 |
|
|
condition_variable.cc \
|
35 |
|
|
compatibility-c++0x.cc \
|
36 |
|
|
compatibility-atomic-c++0x.cc \
|
37 |
|
|
debug.cc \
|
38 |
|
|
functexcept.cc \
|
39 |
|
|
functional.cc \
|
40 |
|
|
future.cc \
|
41 |
|
|
hash_c++0x.cc \
|
42 |
|
|
hashtable_c++0x.cc \
|
43 |
|
|
limits.cc \
|
44 |
|
|
mutex.cc \
|
45 |
|
|
placeholders.cc \
|
46 |
|
|
regex.cc \
|
47 |
|
|
shared_ptr.cc \
|
48 |
|
|
system_error.cc \
|
49 |
|
|
thread.cc
|
50 |
|
|
|
51 |
|
|
if ENABLE_EXTERN_TEMPLATE
|
52 |
|
|
XTEMPLATE_FLAGS = -fno-implicit-templates
|
53 |
|
|
inst_sources = \
|
54 |
|
|
fstream-inst.cc \
|
55 |
|
|
string-inst.cc \
|
56 |
|
|
wstring-inst.cc
|
57 |
|
|
else
|
58 |
|
|
XTEMPLATE_FLAGS =
|
59 |
|
|
inst_sources =
|
60 |
|
|
endif
|
61 |
|
|
|
62 |
|
|
vpath % $(top_srcdir)/src/c++11
|
63 |
|
|
vpath % $(top_srcdir)
|
64 |
|
|
|
65 |
|
|
libc__11convenience_la_SOURCES = $(sources) $(inst_sources)
|
66 |
|
|
|
67 |
|
|
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
|
68 |
|
|
# modified in a per-library or per-sub-library way. Need to manually
|
69 |
|
|
# set this option because CONFIG_CXXFLAGS has to be after
|
70 |
|
|
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
71 |
|
|
# as the occasion calls for it.
|
72 |
|
|
AM_CXXFLAGS = \
|
73 |
|
|
$(PIC_CXXFLAGS) \
|
74 |
|
|
$(XTEMPLATE_FLAGS) \
|
75 |
|
|
$(WARN_CXXFLAGS) \
|
76 |
|
|
$(OPTIMIZE_CXXFLAGS) \
|
77 |
|
|
$(CONFIG_CXXFLAGS) -std=gnu++11
|
78 |
|
|
|
79 |
|
|
AM_MAKEFLAGS = \
|
80 |
|
|
"gxx_include_dir=$(gxx_include_dir)"
|
81 |
|
|
|
82 |
|
|
# Libtool notes
|
83 |
|
|
|
84 |
|
|
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
85 |
|
|
# last. (That way, things like -O2 passed down from the toplevel can
|
86 |
|
|
# be overridden by --enable-debug.)
|
87 |
|
|
|
88 |
|
|
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
89 |
|
|
# using the C++ compiler, because that will enable the settings
|
90 |
|
|
# detected when C++ support was being configured. However, when no
|
91 |
|
|
# such flag is given in the command line, libtool attempts to figure
|
92 |
|
|
# it out by matching the compiler name in each configuration section
|
93 |
|
|
# against a prefix of the command line. The problem is that, if the
|
94 |
|
|
# compiler name and its initial flags stored in the libtool
|
95 |
|
|
# configuration file don't match those in the command line, libtool
|
96 |
|
|
# can't decide which configuration to use, and it gives up. The
|
97 |
|
|
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
98 |
|
|
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
99 |
|
|
# attempt to infer which configuration to use.
|
100 |
|
|
# We have to put --tag disable-shared after --tag CXX lest things
|
101 |
|
|
# CXX undo the affect of disable-shared.
|
102 |
|
|
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
|
103 |
|
|
--mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
|
104 |
|
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
105 |
|
|
|
106 |
|
|
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
|
107 |
|
|
|
108 |
|
|
# 3) We'd have a problem when building the shared libstdc++ object if
|
109 |
|
|
# the rules automake generates would be used. We cannot allow g++ to
|
110 |
|
|
# be used since this would add -lstdc++ to the link line which of
|
111 |
|
|
# course is problematic at this point. So, we get the top-level
|
112 |
|
|
# directory to configure libstdc++-v3 to use gcc as the C++
|
113 |
|
|
# compilation driver.
|
114 |
|
|
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
|
115 |
|
|
--mode=link $(CXX) \
|
116 |
|
|
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
|