OSDN Git Service

2000-10-06 Benjamin Kosnik <bkoz@cygnus.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / libsupc++ / Makefile.am
1 ## Makefile for the GNU C++ Support library.
2 ##
3 ## Copyright (C) 2000 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 # Cross compiler and multilib support.
28 # Install a library built with a cross compiler in tooldir, not libdir.
29 if USE_LIBDIR
30 toolexeclibdir = $(libdir)$(MULTISUBDIR)
31 else
32 toolexecdir = $(exec_prefix)/$(target_alias)
33 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
34 endif
35
36
37 # Need this library to both be part of libstdc++.a, and installed
38 # separately too.
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
43
44
45 INCLUDES = \
46         -I$(top_srcdir)/../gcc -I$(top_srcdir)/libsupc++/include \
47         $(CONFIG_INCLUDES)
48
49 headers = \
50         include/cxxabi.h \
51         include/exception \
52         include/new \
53         include/new.h \
54         include/typeinfo
55
56 sources = \
57         del_op.cc \
58         del_opnt.cc \
59         del_opv.cc \
60         del_opvnt.cc \
61         exception.cc \
62         new_handler.cc \
63         new_op.cc \
64         new_opnt.cc \
65         new_opv.cc \
66         new_opvnt.cc \
67         tinfo.cc \
68         tinfo2.cc \
69         vec.cc
70
71 libsupc___la_SOURCES = $(sources)
72 libsupc__convenience_la_SOURCES = $(sources)
73
74 # Flags to force separate libtool library to be static only.
75 LIBTOOL = @LIBTOOL@ --tag disable-shared
76 LIBSUPCXX_CXXFLAGS = -prefer-pic
77
78
79 # These bits are all figured out from configure. Look in acinclude.m4
80 # or configure.in to see how they are set.
81 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
82 AC_CXXFLAGS = \
83         $(WERROR) @WFMT_FLAGS@ @CPU_FLAGS@ @EXTRA_CXX_FLAGS@ \
84         @SECTION_FLAGS@ @CSHADOWFLAGS@ @DEBUG_FLAGS@ 
85
86 # Need to manually set this option because AC_CXXFLAGS has to be at
87 # the end of the compile line so that -O2 can be overridden as the
88 # occasion call for it. (ie, --enable-debug)
89 AM_CXXFLAGS = \
90         -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) \
91         -Wall -Wno-format -W -Wwrite-strings -Winline \
92         $(LIBSUPCXX_CXXFLAGS) $(AC_CXXFLAGS) 
93
94 # Need to explicitly set this so that AM_CXXFLAGS is last. In
95 # addition, we don't use $(DEFS), which tries to set $(top_srcdir) as
96 # an include diretory, which screws up shadow headers. (That way,
97 # things like -O2 passed down from the toplevel can be overridden by
98 # --enable-debug.)
99 CXXCOMPILE = $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
100              $(CXXFLAGS) $(AM_CXXFLAGS) 
101
102 LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) \
103                $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
104
105 # We have a problem when building the shared libstdc++ object if the
106 # rules automake generates would be used.  We cannot allow CXX to be used
107 # in libtool since this would add -lstdc++ to the link line which of
108 # course is impossible.
109 CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@