]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/src/Makefile.am
eh_personality.cc (__cxa_call_unexpected): Take void*.
[gcc.git] / libstdc++-v3 / src / Makefile.am
1 ## Makefile for the src subdirectory of the GNU C++ Standard library.
2 ##
3 ## Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
4 ##
5 ## This file is part of the libstdc++ version 3 distribution.
6 ## Process this file with automake to produce Makefile.in.
7
8 ## This file is part of the GNU ISO C++ Library. This library is free
9 ## software; you can redistribute it and/or modify it under the
10 ## terms of the GNU General Public License as published by the
11 ## Free Software Foundation; either version 2, or (at your option)
12 ## any later version.
13
14 ## This library is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ## GNU General Public License for more details.
18
19 ## You should have received a copy of the GNU General Public License along
20 ## with this library; see the file COPYING. If not, write to the Free
21 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22 ## USA.
23
24 AUTOMAKE_OPTIONS = 1.3 gnits
25 MAINT_CHARSET = latin1
26
27 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
28
29 # Cross compiler and multilib support.
30 CXX = @glibcpp_CXX@
31 toolexecdir = @glibcpp_toolexecdir@
32 toolexeclibdir = @glibcpp_toolexeclibdir@
33 toolexeclib_LTLIBRARIES = libstdc++.la
34
35 # Compile flags that should be constant throughout the build, both for
36 # SUBDIRS and for libstdc++-v3 in general.
37 OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
38
39 # These bits are all figured out from configure. Look in acinclude.m4
40 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
41 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
42 CONFIG_CXXFLAGS = \
43 @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
44
45 # Warning flags to use.
46 WARN_CXXFLAGS = \
47 @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
48
49 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
50 GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
51 LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
52 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
53 LIBIO_INCLUDES = @LIBIO_INCLUDES@
54 TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
55
56 INCLUDES = \
57 -nostdinc++ \
58 $(GLIBCPP_INCLUDES) \
59 $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
60 $(TOPLEVEL_INCLUDES)
61
62 sources = \
63 basic_file.cc bitset.cc c++locale.cc cmath.cc codecvt.cc \
64 complex_io.cc functexcept.cc globals.cc ios.cc limits.cc \
65 locale.cc locale-inst.cc localename.cc \
66 collate.cc messages.cc moneypunct.cc numpunct.cc time.cc \
67 misc-inst.cc stdexcept.cc stl-inst.cc string-inst.cc strstream.cc \
68 valarray-inst.cc wstring-inst.cc concept-inst.cc vterminate.cc
69
70 VPATH = $(top_srcdir)/src:$(top_srcdir)
71
72 libstdc___la_SOURCES = $(sources)
73
74 libstdc___la_LIBADD = \
75 ../libmath/libmath.la @libio_la@ \
76 ../libsupc++/libsupc++convenience.la
77
78 libstdc___la_LDFLAGS = -version-info @libtool_VERSION@ -lm
79
80 libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
81
82
83 # Use special rules for the deprecated source files so that they find
84 # deprecated include files.
85 GLIBCPP_INCLUDE_DIR=@glibcpp_builddir@/include
86 strstream.lo: strstream.cc
87 $(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
88 strstream.o: strstream.cc
89 $(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
90
91 # Use special rules for the concept-checking instantiations so that all
92 # the generated template functions are also instantiated. Force the checks
93 # to be on so that the instantiations are actually seen.
94 concept-inst.lo: concept-inst.cc
95 $(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
96 concept-inst.o: concept-inst.cc
97 $(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
98
99
100 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
101 # modified in a per-library or per-sub-library way. Need to manually
102 # set this option because CONFIG_CXXFLAGS has to be after
103 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
104 # as the occasion call for it. (ie, --enable-debug)
105 AM_CXXFLAGS = \
106 -fno-implicit-templates \
107 $(LIBSUPCXX_CXXFLAGS) \
108 $(WARN_CXXFLAGS) \
109 $(OPTIMIZE_CXXFLAGS) \
110 $(CONFIG_CXXFLAGS)
111
112
113 # libstdc++ libtool notes
114
115 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
116 # last. (That way, things like -O2 passed down from the toplevel can
117 # be overridden by --enable-debug.)
118
119 # 2) In general, libtool expects an argument such as `--tag=CXX' when
120 # using the C++ compiler, because that will enable the settings
121 # detected when C++ support was being configured. However, when no
122 # such flag is given in the command line, libtool attempts to figure
123 # it out by matching the compiler name in each configuration section
124 # against a prefix of the command line. The problem is that, if the
125 # compiler name and its initial flags stored in the libtool
126 # configuration file don't match those in the command line, libtool
127 # can't decide which configuration to use, and it gives up. The
128 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
129 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
130 # attempt to infer which configuration to use
131 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
132 $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
133
134 # 3) We'd have a problem when building the shared libstdc++ object if
135 # the rules automake generates would be used. We cannot allow g++ to
136 # be used since this would add -lstdc++ to the link line which of
137 # course is problematic at this point. So, we get the top-level
138 # directory to configure libstdc++-v3 to use gcc as the C++
139 # compilation driver.
140 CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
141 @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
This page took 0.046961 seconds and 6 git commands to generate.