OSDN Git Service

2000-10-10 Benjamin Kosnik <bkoz@purist.soma.redhat.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 LIBSUPCXX_INCLUDES = -I$(top_srcdir)/libsupc++/include
46
47 INCLUDES = \
48         -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include \
49         $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDES) \
50         $(CONFIG_INCLUDES)
51
52 headers = \
53         include/cxxabi.h \
54         include/exception \
55         include/new \
56         include/new.h \
57         include/typeinfo
58
59 sources = \
60         del_op.cc \
61         del_opnt.cc \
62         del_opv.cc \
63         del_opvnt.cc \
64         exception.cc \
65         new_handler.cc \
66         new_op.cc \
67         new_opnt.cc \
68         new_opv.cc \
69         new_opvnt.cc \
70         tinfo.cc \
71         tinfo2.cc \
72         vec.cc
73
74 libsupc___la_SOURCES = $(sources)
75 libsupc__convenience_la_SOURCES = $(sources)
76
77 # Flags to force separate libtool library to be static only.
78 LIBTOOL = @LIBTOOL@ --tag disable-shared
79 LIBSUPCXX_CXXFLAGS = -prefer-pic
80
81 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
82 # modified in a per-library or per-sub-library way.
83 # Need to manually set this option because CONFIG_CXXFLAGS has to be at
84 # the end of the compile line so that -O2 can be overridden as the
85 # occasion call for it. (ie, --enable-debug)
86 AM_CXXFLAGS = \
87         -fno-implicit-templates \
88         $(LIBSUPCXX_CXXFLAGS) \
89         $(WARN_CXXFLAGS) \
90         $(OPTIMIZE_CXXFLAGS) \
91         $(CONFIG_CXXFLAGS) 
92
93 # Need to explicitly set this so that AM_CXXFLAGS is last. In
94 # addition, we don't use $(DEFS), which tries to set $(top_srcdir) as
95 # an include diretory, which screws up shadow headers. (That way,
96 # things like -O2 passed down from the toplevel can be overridden by
97 # --enable-debug.)
98 CXXCOMPILE = $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
99              $(CXXFLAGS) $(AM_CXXFLAGS) 
100
101 LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) \
102                $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
103
104 # We have a problem when building the shared libstdc++ object if the
105 # rules automake generates would be used.  We cannot allow CXX to be used
106 # in libtool since this would add -lstdc++ to the link line which of
107 # course is impossible.
108 CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
109
110
111
112
113