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++98 runtime.
|
28 |
|
|
noinst_LTLIBRARIES = libc++98convenience.la
|
29 |
|
|
|
30 |
|
|
headers =
|
31 |
|
|
|
32 |
|
|
# Source files linked in via configuration/make substitution for a
|
33 |
|
|
# particular host.
|
34 |
|
|
host_sources = \
|
35 |
|
|
atomicity.cc \
|
36 |
|
|
codecvt_members.cc \
|
37 |
|
|
collate_members.cc \
|
38 |
|
|
ctype_configure_char.cc \
|
39 |
|
|
ctype_members.cc \
|
40 |
|
|
messages_members.cc \
|
41 |
|
|
monetary_members.cc \
|
42 |
|
|
numeric_members.cc \
|
43 |
|
|
time_members.cc
|
44 |
|
|
|
45 |
|
|
codecvt_members.cc: ${glibcxx_srcdir}/$(CCODECVT_CC)
|
46 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CCODECVT_CC) . || true
|
47 |
|
|
|
48 |
|
|
collate_members.cc: ${glibcxx_srcdir}/$(CCOLLATE_CC)
|
49 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CCOLLATE_CC) . || true
|
50 |
|
|
|
51 |
|
|
ctype_configure_char.cc: ${glibcxx_srcdir}/$(OS_INC_SRCDIR)/ctype_configure_char.cc
|
52 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(OS_INC_SRCDIR)/ctype_configure_char.cc . || true
|
53 |
|
|
|
54 |
|
|
ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC)
|
55 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CCTYPE_CC) . || true
|
56 |
|
|
|
57 |
|
|
messages_members.cc: ${glibcxx_srcdir}/$(CMESSAGES_CC)
|
58 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_CC) . || true
|
59 |
|
|
|
60 |
|
|
monetary_members.cc: ${glibcxx_srcdir}/$(CMONEY_CC)
|
61 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CMONEY_CC) . || true
|
62 |
|
|
|
63 |
|
|
numeric_members.cc: ${glibcxx_srcdir}/$(CNUMERIC_CC)
|
64 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CNUMERIC_CC) . || true
|
65 |
|
|
|
66 |
|
|
time_members.cc: ${glibcxx_srcdir}/$(CTIME_CC)
|
67 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CTIME_CC) . || true
|
68 |
|
|
|
69 |
|
|
atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
|
70 |
|
|
atomicity.cc: ${atomicity_file}
|
71 |
|
|
$(LN_S) ${atomicity_file} ./atomicity.cc || true
|
72 |
|
|
|
73 |
|
|
# Source files linked in via configuration/make substitution for a
|
74 |
|
|
# particular host, but with ad hoc naming rules.
|
75 |
|
|
host_sources_extra = \
|
76 |
|
|
basic_file.cc c++locale.cc \
|
77 |
|
|
${inst_sources} ${ldbl_compat_sources} ${parallel_sources}
|
78 |
|
|
|
79 |
|
|
c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
|
80 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
|
81 |
|
|
|
82 |
|
|
basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
|
83 |
|
|
$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
|
84 |
|
|
|
85 |
|
|
if ENABLE_PARALLEL
|
86 |
|
|
parallel_sources = parallel_settings.cc \
|
87 |
|
|
compatibility-parallel_list.cc \
|
88 |
|
|
compatibility-parallel_list-2.cc
|
89 |
|
|
else
|
90 |
|
|
parallel_sources =
|
91 |
|
|
endif
|
92 |
|
|
|
93 |
|
|
if GLIBCXX_LDBL_COMPAT
|
94 |
|
|
ldbl_compat_sources = compatibility-ldbl.cc
|
95 |
|
|
else
|
96 |
|
|
ldbl_compat_sources =
|
97 |
|
|
endif
|
98 |
|
|
|
99 |
|
|
if ENABLE_EXTERN_TEMPLATE
|
100 |
|
|
XTEMPLATE_FLAGS = -fno-implicit-templates
|
101 |
|
|
inst_sources = \
|
102 |
|
|
allocator-inst.cc \
|
103 |
|
|
concept-inst.cc \
|
104 |
|
|
ext-inst.cc \
|
105 |
|
|
ios-inst.cc \
|
106 |
|
|
iostream-inst.cc \
|
107 |
|
|
istream-inst.cc \
|
108 |
|
|
locale-inst.cc \
|
109 |
|
|
misc-inst.cc \
|
110 |
|
|
ostream-inst.cc \
|
111 |
|
|
sstream-inst.cc \
|
112 |
|
|
streambuf-inst.cc \
|
113 |
|
|
wlocale-inst.cc
|
114 |
|
|
else
|
115 |
|
|
XTEMPLATE_FLAGS =
|
116 |
|
|
inst_sources =
|
117 |
|
|
endif
|
118 |
|
|
|
119 |
|
|
# Sources present in the src directory, always present.
|
120 |
|
|
sources = \
|
121 |
|
|
bitmap_allocator.cc \
|
122 |
|
|
pool_allocator.cc \
|
123 |
|
|
mt_allocator.cc \
|
124 |
|
|
codecvt.cc \
|
125 |
|
|
compatibility.cc \
|
126 |
|
|
compatibility-debug_list.cc \
|
127 |
|
|
compatibility-debug_list-2.cc \
|
128 |
|
|
compatibility-list.cc \
|
129 |
|
|
compatibility-list-2.cc \
|
130 |
|
|
complex_io.cc \
|
131 |
|
|
ctype.cc \
|
132 |
|
|
globals_io.cc \
|
133 |
|
|
hash_tr1.cc \
|
134 |
|
|
hashtable_tr1.cc \
|
135 |
|
|
ios.cc \
|
136 |
|
|
ios_failure.cc \
|
137 |
|
|
ios_init.cc \
|
138 |
|
|
ios_locale.cc \
|
139 |
|
|
list.cc \
|
140 |
|
|
locale.cc \
|
141 |
|
|
locale_init.cc \
|
142 |
|
|
locale_facets.cc \
|
143 |
|
|
localename.cc \
|
144 |
|
|
math_stubs_float.cc \
|
145 |
|
|
math_stubs_long_double.cc \
|
146 |
|
|
stdexcept.cc \
|
147 |
|
|
strstream.cc \
|
148 |
|
|
tree.cc \
|
149 |
|
|
istream.cc \
|
150 |
|
|
streambuf.cc \
|
151 |
|
|
valarray.cc \
|
152 |
|
|
${host_sources} \
|
153 |
|
|
${host_sources_extra}
|
154 |
|
|
|
155 |
|
|
vpath % $(top_srcdir)/src/c++98
|
156 |
|
|
vpath % $(top_srcdir)
|
157 |
|
|
|
158 |
|
|
libc__98convenience_la_SOURCES = $(sources)
|
159 |
|
|
|
160 |
|
|
# Use special rules for the deprecated source files so that they find
|
161 |
|
|
# deprecated include files.
|
162 |
|
|
GLIBCXX_INCLUDE_DIR=$(glibcxx_builddir)/include
|
163 |
|
|
strstream.lo: strstream.cc
|
164 |
|
|
$(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
|
165 |
|
|
strstream.o: strstream.cc
|
166 |
|
|
$(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
|
167 |
|
|
|
168 |
|
|
# Use special rules for the concept-checking instantiations so that all
|
169 |
|
|
# the generated template functions are also instantiated. Force the checks
|
170 |
|
|
# to be on so that the instantiations are actually seen.
|
171 |
|
|
concept-inst.lo: concept-inst.cc
|
172 |
|
|
$(LTCXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
|
173 |
|
|
concept-inst.o: concept-inst.cc
|
174 |
|
|
$(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
|
175 |
|
|
|
176 |
|
|
# Use special rules for parallel mode compilation.
|
177 |
|
|
PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
|
178 |
|
|
parallel_settings.lo: parallel_settings.cc
|
179 |
|
|
$(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $<
|
180 |
|
|
parallel_settings.o: parallel_settings.cc
|
181 |
|
|
$(CXXCOMPILE) $(PARALLEL_FLAGS) -c $<
|
182 |
|
|
|
183 |
|
|
compatibility-parallel_list.lo: compatibility-parallel_list.cc
|
184 |
|
|
$(LTCXXCOMPILE) -c $<
|
185 |
|
|
compatibility-parallel_list.o: compatibility-parallel_list.cc
|
186 |
|
|
$(CXXCOMPILE) -c $<
|
187 |
|
|
|
188 |
|
|
compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc
|
189 |
|
|
$(LTCXXCOMPILE) -c $<
|
190 |
|
|
compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc
|
191 |
|
|
$(CXXCOMPILE) -c $<
|
192 |
|
|
|
193 |
|
|
if GLIBCXX_LDBL_COMPAT
|
194 |
|
|
# Use special rules for compatibility-ldbl.cc compilation, as we need to
|
195 |
|
|
# pass -mlong-double-64.
|
196 |
|
|
compatibility-ldbl.lo: compatibility-ldbl.cc
|
197 |
|
|
$(LTCXXCOMPILE) -mlong-double-64 -c $<
|
198 |
|
|
compatibility-ldbl.o: compatibility-ldbl.cc
|
199 |
|
|
$(CXXCOMPILE) -mlong-double-64 -c $<
|
200 |
|
|
endif
|
201 |
|
|
|
202 |
|
|
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
|
203 |
|
|
# modified in a per-library or per-sub-library way. Need to manually
|
204 |
|
|
# set this option because CONFIG_CXXFLAGS has to be after
|
205 |
|
|
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
206 |
|
|
# as the occasion calls for it.
|
207 |
|
|
AM_CXXFLAGS = \
|
208 |
|
|
$(PIC_CXXFLAGS) \
|
209 |
|
|
$(XTEMPLATE_FLAGS) \
|
210 |
|
|
$(WARN_CXXFLAGS) \
|
211 |
|
|
$(OPTIMIZE_CXXFLAGS) \
|
212 |
|
|
$(CONFIG_CXXFLAGS)
|
213 |
|
|
|
214 |
|
|
AM_MAKEFLAGS = \
|
215 |
|
|
"gxx_include_dir=$(gxx_include_dir)"
|
216 |
|
|
|
217 |
|
|
# Libtool notes
|
218 |
|
|
|
219 |
|
|
# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
|
220 |
|
|
# last. (That way, things like -O2 passed down from the toplevel can
|
221 |
|
|
# be overridden by --enable-debug.)
|
222 |
|
|
|
223 |
|
|
# 2) In general, libtool expects an argument such as `--tag=CXX' when
|
224 |
|
|
# using the C++ compiler, because that will enable the settings
|
225 |
|
|
# detected when C++ support was being configured. However, when no
|
226 |
|
|
# such flag is given in the command line, libtool attempts to figure
|
227 |
|
|
# it out by matching the compiler name in each configuration section
|
228 |
|
|
# against a prefix of the command line. The problem is that, if the
|
229 |
|
|
# compiler name and its initial flags stored in the libtool
|
230 |
|
|
# configuration file don't match those in the command line, libtool
|
231 |
|
|
# can't decide which configuration to use, and it gives up. The
|
232 |
|
|
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
233 |
|
|
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
234 |
|
|
# attempt to infer which configuration to use.
|
235 |
|
|
# We have to put --tag disable-shared after --tag CXX lest things
|
236 |
|
|
# CXX undo the affect of disable-shared.
|
237 |
|
|
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
|
238 |
|
|
--mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
|
239 |
|
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
240 |
|
|
|
241 |
|
|
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
|
242 |
|
|
|
243 |
|
|
# 3) We'd have a problem when building the shared libstdc++ object if
|
244 |
|
|
# the rules automake generates would be used. We cannot allow g++ to
|
245 |
|
|
# be used since this would add -lstdc++ to the link line which of
|
246 |
|
|
# course is problematic at this point. So, we get the top-level
|
247 |
|
|
# directory to configure libstdc++-v3 to use gcc as the C++
|
248 |
|
|
# compilation driver.
|
249 |
|
|
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \
|
250 |
|
|
--mode=link $(CXX) \
|
251 |
|
|
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
|