OSDN Git Service

2000-10-11 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 # Compile flags that should be constant throughout the build, both for
46 # SUBDIRS and for libstdc++-v3 in general.
47 OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
48
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.
52 CONFIG_CXXFLAGS = \
53         @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ 
54
55 # Warning flags to use.
56 WARN_CXXFLAGS = \
57         @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
58
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@
67
68 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)
72
73 headers = \
74         cxxabi.h exception new new.h typeinfo
75
76 sources = \
77         del_op.cc \
78         del_opnt.cc \
79         del_opv.cc \
80         del_opvnt.cc \
81         exception.cc \
82         new_handler.cc \
83         new_op.cc \
84         new_opnt.cc \
85         new_opv.cc \
86         new_opvnt.cc \
87         pure.cc \
88         tinfo.cc \
89         tinfo2.cc \
90         vec.cc
91
92 libsupc___la_SOURCES = $(sources)
93 libsupc__convenience_la_SOURCES = $(sources)
94
95 # This insanely simple bit of install magic courtesy of Mr. Tromey.
96 glibcppinstalldir= $(prefix)/include/g++-v3
97 glibcppinstall_HEADERS = $(headers)
98
99 # Flags to force separate libtool library to be static only.
100 LIBTOOL = @LIBTOOL@ --tag disable-shared
101 LIBSUPCXX_CXXFLAGS = -prefer-pic
102
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)
108 AM_CXXFLAGS = \
109         -fno-implicit-templates \
110         $(LIBSUPCXX_CXXFLAGS) \
111         $(WARN_CXXFLAGS) \
112         $(OPTIMIZE_CXXFLAGS) \
113         $(CONFIG_CXXFLAGS) 
114
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
119 # --enable-debug.)
120 LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) \
121                $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
122
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 $@
128
129
130
131
132