OSDN Git Service

2003-04-06 Steven Bosscher <steven@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / libsupc++ / Makefile.am
index 4694032..4fa9b94 100644 (file)
@@ -1,6 +1,6 @@
 ## Makefile for the GNU C++ Support library.
 ##
-## Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 ##
 ## Process this file with automake to produce Makefile.in.
 ##
@@ -27,6 +27,8 @@ MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 
 # Cross compiler and multilib support.
+CC = @CC@
+CXX = @glibcpp_CXX@
 toolexecdir = @glibcpp_toolexecdir@
 toolexeclibdir = @glibcpp_toolexeclibdir@
 
@@ -47,25 +49,21 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
 # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
 # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
 CONFIG_CXXFLAGS = \
-       @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ 
+       @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
 
 # Warning flags to use.
 WARN_CXXFLAGS = \
        @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
 
+LIBSUPCXX_CXXFLAGS = @LIBSUPCXX_PICFLAGS@
+
 # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
-GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@
-C_INCLUDE_DIR = @C_INCLUDE_DIR@
-CSTD_INCLUDES = @CSTD_INCLUDES@
-LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
 LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
-LIBIO_INCLUDES = @LIBIO_INCLUDES@
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
 
 INCLUDES = \
-       -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
-       -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include \
-        $(LIBSUPCXX_INCLUDES)
+       $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
 
 headers = \
        exception new typeinfo cxxabi.h exception_defines.h 
@@ -75,7 +73,18 @@ sources = \
        del_opnt.cc \
        del_opv.cc \
        del_opvnt.cc \
-       exception_support.cc \
+       eh_alloc.cc \
+       eh_aux_runtime.cc \
+       eh_catch.cc \
+       eh_exception.cc \
+       eh_globals.cc \
+       eh_personality.cc \
+       eh_term_handler.cc \
+       eh_terminate.cc \
+       eh_throw.cc \
+       eh_type.cc \
+       eh_unex_handler.cc \
+       guard.cc \
        new_handler.cc \
        new_op.cc \
        new_opnt.cc \
@@ -84,23 +93,20 @@ sources = \
        pure.cc \
        tinfo.cc \
        tinfo2.cc \
-       vec.cc
+       vec.cc \
+       vterminate.cc
 
-libsupc___la_SOURCES = $(sources)
-libsupc__convenience_la_SOURCES = $(sources)
+libsupc___la_SOURCES = $(sources) 
+libsupc__convenience_la_SOURCES = $(sources) 
 
-glibcppinstalldir = @gxx_include_dir@
+glibcppinstalldir = $(gxx_include_dir)
 glibcppinstall_HEADERS = $(headers)
 
-# Flags to force separate libtool library to be static only.
-LIBTOOL = @LIBTOOL@ --tag disable-shared
-LIBSUPCXX_CXXFLAGS = -prefer-pic
-
 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
 # modified in a per-library or per-sub-library way.  Need to manually
 # set this option because CONFIG_CXXFLAGS has to be after
 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
-# as the occasion call for it. (ie, --enable-debug)
+# as the occasion call for it. 
 AM_CXXFLAGS = \
        -fno-implicit-templates \
        $(LIBSUPCXX_CXXFLAGS) \
@@ -108,6 +114,9 @@ AM_CXXFLAGS = \
        $(OPTIMIZE_CXXFLAGS) \
        $(CONFIG_CXXFLAGS) 
 
+AM_MAKEFLAGS = \
+       "gxx_include_dir=$(gxx_include_dir)"
+
 # libstdc++ libtool notes
 
 # 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
@@ -139,11 +148,25 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
 # course is problematic at this point.  So, we get the top-level
 # directory to configure libstdc++-v3 to use gcc as the C++
 # compilation driver.
-CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
-         @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
-
-
-
-
-
-
+CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
+          --mode=link $(CXX) \
+          @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+# We have to have rules modified from the default to counteract SUN make
+# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
+install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
+       @list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+         q=`echo $$p | sed -e 's,.*/,,'`; \
+         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q"; \
+         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q; \
+       done
+
+uninstall-glibcppinstallHEADERS:
+       @$(NORMAL_UNINSTALL)
+       list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+         q=`echo $$p | sed -e 's,.*/,,'`; \
+         rm -f $(DESTDIR)$(glibcppinstalldir)/$$q; \
+       done