]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/libsupc++/Makefile.am
Daily bump.
[thirdparty/gcc.git] / libstdc++-v3 / libsupc++ / Makefile.am
CommitLineData
06bd10fb
BK
1## Makefile for the GNU C++ Support library.
2##
4ffbd077 3## Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
06bd10fb
BK
4##
5## Process this file with automake to produce Makefile.in.
6##
cbecceb9 7## This file is part of GCC.
06bd10fb 8##
cbecceb9 9## GCC is free software; you can redistribute it and/or modify
06bd10fb
BK
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##
cbecceb9 14## GCC is distributed in the hope that it will be useful,
06bd10fb
BK
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
cbecceb9 20## along with GCC; see the file COPYING. If not, write to
06bd10fb
BK
21## the Free Software Foundation, 59 Temple Place - Suite 330,
22## Boston, MA 02111-1307, USA.
23
0df3f383 24include $(top_srcdir)/fragment.am
06bd10fb
BK
25
26# Need this library to both be part of libstdc++.a, and installed
27# separately too.
28# 1) separate libsupc++.la
29toolexeclib_LTLIBRARIES = libsupc++.la
30# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
31noinst_LTLIBRARIES = libsupc++convenience.la
32
0b8e0cf3 33
e466dc8a 34
4ffbd077
BK
35LIBSUPCXX_CXXFLAGS = @LIBSUPCXX_PICFLAGS@
36
06bd10fb 37headers = \
e2c09482 38 exception new typeinfo cxxabi.h exception_defines.h
06bd10fb 39
e01c9849 40sources = \
06bd10fb
BK
41 del_op.cc \
42 del_opnt.cc \
43 del_opv.cc \
44 del_opvnt.cc \
52a11cbf
RH
45 eh_alloc.cc \
46 eh_aux_runtime.cc \
47 eh_catch.cc \
48 eh_exception.cc \
49 eh_globals.cc \
50 eh_personality.cc \
fb705416 51 eh_term_handler.cc \
52a11cbf
RH
52 eh_terminate.cc \
53 eh_throw.cc \
74a3070f 54 eh_type.cc \
fb705416 55 eh_unex_handler.cc \
c4f66405 56 guard.cc \
06bd10fb
BK
57 new_handler.cc \
58 new_op.cc \
59 new_opnt.cc \
60 new_opv.cc \
61 new_opvnt.cc \
3734420f 62 pure.cc \
06bd10fb
BK
63 tinfo.cc \
64 tinfo2.cc \
fb705416
PE
65 vec.cc \
66 vterminate.cc
06bd10fb 67
4ffbd077
BK
68libsupc___la_SOURCES = $(sources)
69libsupc__convenience_la_SOURCES = $(sources)
06bd10fb 70
3d7c150e
BK
71glibcxxinstalldir = $(gxx_include_dir)
72glibcxxinstall_HEADERS = $(headers)
a6863e25 73
c7053b70 74# AM_CXXFLAGS needs to be in each subdirectory so that it can be
a9117427
BK
75# modified in a per-library or per-sub-library way. Need to manually
76# set this option because CONFIG_CXXFLAGS has to be after
77# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
4ffbd077 78# as the occasion call for it.
06bd10fb 79AM_CXXFLAGS = \
c7053b70
BK
80 -fno-implicit-templates \
81 $(LIBSUPCXX_CXXFLAGS) \
82 $(WARN_CXXFLAGS) \
83 $(OPTIMIZE_CXXFLAGS) \
84 $(CONFIG_CXXFLAGS)
06bd10fb 85
3bf74da2
MK
86AM_MAKEFLAGS = \
87 "gxx_include_dir=$(gxx_include_dir)"
88
a9117427
BK
89# libstdc++ libtool notes
90
91# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
92# last. (That way, things like -O2 passed down from the toplevel can
93# be overridden by --enable-debug.)
94
95# 2) In general, libtool expects an argument such as `--tag=CXX' when
96# using the C++ compiler, because that will enable the settings
97# detected when C++ support was being configured. However, when no
98# such flag is given in the command line, libtool attempts to figure
99# it out by matching the compiler name in each configuration section
100# against a prefix of the command line. The problem is that, if the
101# compiler name and its initial flags stored in the libtool
102# configuration file don't match those in the command line, libtool
103# can't decide which configuration to use, and it gives up. The
104# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
105# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
20b11783
MM
106# attempt to infer which configuration to use.
107#
108# We have to put --tag disable-shared after --tag CXX lest things
109# CXX undo the affect of disable-shared.
110LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
0df3f383 111 --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
a9117427 112 $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
c7053b70 113
787d2fb7
AO
114# 3) We'd have a problem when building the shared libstdc++ object if
115# the rules automake generates would be used. We cannot allow g++ to
116# be used since this would add -lstdc++ to the link line which of
117# course is problematic at this point. So, we get the top-level
118# directory to configure libstdc++-v3 to use gcc as the C++
119# compilation driver.
400f4e55
AO
120CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
121 --mode=link $(CXX) \
122 @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
38fae3e3
HPN
123
124# We have to have rules modified from the default to counteract SUN make
3d7c150e
BK
125# prepending each of $(glibcxxinstall_HEADERS) with VPATH below.
126install-glibcxxinstallHEADERS: $(glibcxxinstall_HEADERS)
38fae3e3 127 @$(NORMAL_INSTALL)
3d7c150e
BK
128 $(mkinstalldirs) $(DESTDIR)$(glibcxxinstalldir)
129 @list='$(glibcxxinstall_HEADERS)'; for p in $$list; do \
38fae3e3
HPN
130 q=`echo $$p | sed -e 's,.*/,,'`; \
131 if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
3d7c150e
BK
132 echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcxxinstalldir)/$$q"; \
133 $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcxxinstalldir)/$$q; \
38fae3e3
HPN
134 done
135
3d7c150e 136uninstall-glibcxxinstallHEADERS:
38fae3e3 137 @$(NORMAL_UNINSTALL)
3d7c150e 138 list='$(glibcxxinstall_HEADERS)'; for p in $$list; do \
38fae3e3 139 q=`echo $$p | sed -e 's,.*/,,'`; \
3d7c150e 140 rm -f $(DESTDIR)$(glibcxxinstalldir)/$$q; \
38fae3e3 141 done