1 ## Makefile for the GNU C++ Support library.
3 ## Copyright (C) 2000 Free Software Foundation, Inc.
5 ## Process this file with automake to produce Makefile.in.
7 ## This file is part of GNU CC.
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)
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.
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.
24 AUTOMAKE_OPTIONS = 1.3 cygnus
25 MAINT_CHARSET = latin1
27 # Cross compiler and multilib support.
28 # Install a library built with a cross compiler in tooldir, not libdir.
30 toolexeclibdir = $(libdir)$(MULTISUBDIR)
32 toolexecdir = $(exec_prefix)/$(target_alias)
33 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
37 # Need this library to both be part of libstdc++.a, and installed
39 # 1) separate libsupc++.la
40 toolexeclib_LTLIBRARIES = libsupc++.la
41 # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
42 noinst_LTLIBRARIES = libsupc++convenience.la
45 # Compile flags that should be constant throughout the build, both for
46 # SUBDIRS and for libstdc++-v3 in general.
47 OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
49 # These bits are all figured out from configure. Look in acinclude.m4
50 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
51 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
53 @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
55 # Warning flags to use.
57 @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
59 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
60 GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@
61 C_INCLUDE_DIR = @C_INCLUDE_DIR@
62 TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
63 LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
64 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
65 LIBIO_INCLUDES = @LIBIO_INCLUDES@
66 CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
69 -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include \
70 $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) \
71 $(CONFIG_INCLUDES) -I$(top_builddir)
74 cxxabi.h exception new new.h typeinfo
92 libsupc___la_SOURCES = $(sources)
93 libsupc__convenience_la_SOURCES = $(sources)
95 # This insanely simple bit of install magic courtesy of Mr. Tromey.
96 glibcppinstalldir= $(prefix)/include/g++-v3
97 glibcppinstall_HEADERS = $(headers)
99 # Flags to force separate libtool library to be static only.
100 LIBTOOL = @LIBTOOL@ --tag disable-shared
101 LIBSUPCXX_CXXFLAGS = -prefer-pic
103 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
104 # modified in a per-library or per-sub-library way.
105 # Need to manually set this option because CONFIG_CXXFLAGS has to be at
106 # the end of the compile line so that -O2 can be overridden as the
107 # occasion call for it. (ie, --enable-debug)
109 -fno-implicit-templates \
110 $(LIBSUPCXX_CXXFLAGS) \
112 $(OPTIMIZE_CXXFLAGS) \
115 # Need to explicitly set this so that AM_CXXFLAGS is last. In
116 # addition, we don't use $(DEFS), which tries to set $(top_srcdir) as
117 # an include diretory, which screws up shadow headers. (That way,
118 # things like -O2 passed down from the toplevel can be overridden by
120 LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) \
121 $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
123 # We have a problem when building the shared libstdc++ object if the
124 # rules automake generates would be used. We cannot allow CXX to be used
125 # in libtool since this would add -lstdc++ to the link line which of
126 # course is impossible.
127 CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@