]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/libsupc++/Makefile.am
Makefile.am (CXXLINK): Add --tag disable-shared after --tag CXX.
[gcc.git] / libstdc++-v3 / libsupc++ / Makefile.am
1 ## Makefile for the GNU C++ Support library.
2 ##
3 ## Copyright (C) 2000, 2001 Free Software Foundation, Inc.
4 ##
5 ## Process this file with automake to produce Makefile.in.
6 ##
7 ## This file is part of GNU CC.
8 ##
9 ## GNU CC is free software; you can redistribute it and/or modify
10 ## it under the terms of the GNU General Public License as published by
11 ## the Free Software Foundation; either version 2, or (at your option)
12 ## any later version.
13 ##
14 ## GNU CC 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
20 ## along with GNU CC; see the file COPYING. If not, write to
21 ## the Free Software Foundation, 59 Temple Place - Suite 330,
22 ## Boston, MA 02111-1307, USA.
23
24 AUTOMAKE_OPTIONS = 1.3 cygnus
25 MAINT_CHARSET = latin1
26
27 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
28
29 # Cross compiler and multilib support.
30 toolexecdir = @glibcpp_toolexecdir@
31 toolexeclibdir = @glibcpp_toolexeclibdir@
32
33
34 # Need this library to both be part of libstdc++.a, and installed
35 # separately too.
36 # 1) separate libsupc++.la
37 toolexeclib_LTLIBRARIES = libsupc++.la
38 # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
39 noinst_LTLIBRARIES = libsupc++convenience.la
40
41
42 # Compile flags that should be constant throughout the build, both for
43 # SUBDIRS and for libstdc++-v3 in general.
44 OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
45
46 # These bits are all figured out from configure. Look in acinclude.m4
47 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
48 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
49 CONFIG_CXXFLAGS = \
50 @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
51
52 # Warning flags to use.
53 WARN_CXXFLAGS = \
54 @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
55
56 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
57 GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@
58 C_INCLUDE_DIR = @C_INCLUDE_DIR@
59 CSTD_INCLUDES = @CSTD_INCLUDES@
60 LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
61 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
62 LIBIO_INCLUDES = @LIBIO_INCLUDES@
63 TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
64
65 INCLUDES = \
66 -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
67 -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include \
68 $(LIBSUPCXX_INCLUDES)
69
70 headers = \
71 exception new typeinfo cxxabi.h exception_defines.h
72
73 sources = \
74 del_op.cc \
75 del_opnt.cc \
76 del_opv.cc \
77 del_opvnt.cc \
78 eh_alloc.cc \
79 eh_aux_runtime.cc \
80 eh_catch.cc \
81 eh_exception.cc \
82 eh_globals.cc \
83 eh_personality.cc \
84 eh_terminate.cc \
85 eh_throw.cc \
86 new_handler.cc \
87 new_op.cc \
88 new_opnt.cc \
89 new_opv.cc \
90 new_opvnt.cc \
91 pure.cc \
92 tinfo.cc \
93 tinfo2.cc \
94 vec.cc
95
96 libsupc___la_SOURCES = $(sources)
97 libsupc__convenience_la_SOURCES = $(sources)
98
99 glibcppinstalldir = @gxx_include_dir@
100 glibcppinstall_HEADERS = $(headers)
101
102 LIBSUPCXX_CXXFLAGS = -prefer-pic
103
104 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
105 # modified in a per-library or per-sub-library way. Need to manually
106 # set this option because CONFIG_CXXFLAGS has to be after
107 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
108 # as the occasion call for it. (ie, --enable-debug)
109 AM_CXXFLAGS = \
110 -fno-implicit-templates \
111 $(LIBSUPCXX_CXXFLAGS) \
112 $(WARN_CXXFLAGS) \
113 $(OPTIMIZE_CXXFLAGS) \
114 $(CONFIG_CXXFLAGS)
115
116 # libstdc++ libtool notes
117
118 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
119 # last. (That way, things like -O2 passed down from the toplevel can
120 # be overridden by --enable-debug.)
121
122 # 2) In general, libtool expects an argument such as `--tag=CXX' when
123 # using the C++ compiler, because that will enable the settings
124 # detected when C++ support was being configured. However, when no
125 # such flag is given in the command line, libtool attempts to figure
126 # it out by matching the compiler name in each configuration section
127 # against a prefix of the command line. The problem is that, if the
128 # compiler name and its initial flags stored in the libtool
129 # configuration file don't match those in the command line, libtool
130 # can't decide which configuration to use, and it gives up. The
131 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
132 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
133 # attempt to infer which configuration to use.
134 #
135 # We have to put --tag disable-shared after --tag CXX lest things
136 # CXX undo the affect of disable-shared.
137 LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
138 --mode=compile $(CXX) $(INCLUDES) \
139 $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
140
141 # 3) We'd have a problem when building the shared libstdc++ object if
142 # the rules automake generates would be used. We cannot allow g++ to
143 # be used since this would add -lstdc++ to the link line which of
144 # course is problematic at this point. So, we get the top-level
145 # directory to configure libstdc++-v3 to use gcc as the C++
146 # compilation driver.
147 CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
148 --mode=link $(CXX) \
149 @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
This page took 0.044696 seconds and 5 git commands to generate.