From 2463f4075b1b5a9a6f35202c62533dffba24386c Mon Sep 17 00:00:00 2001
From: rschulz
Date: Fri, 17 Dec 2004 16:59:49 +0000
Subject: [PATCH] changes to configuration / makefiles to support arbitrary
library file suffixes (rschulz)
git-svn-id: https://svn.dealii.org/trunk@9816 0785d39b-7218-0410-832d-ea1e28bc413d
---
deal.II/base/Makefile | 22 +++++-------
deal.II/common/Make.global_options.in | 15 +++++---
deal.II/configure | 18 +++++-----
deal.II/configure.in | 12 +++----
deal.II/contrib/hsl/Makefile | 6 ++--
deal.II/contrib/umfpack/Makefile | 10 ++----
deal.II/deal.II/Makefile | 45 ++++++++++--------------
deal.II/doc/development/Makefile | 4 +++
deal.II/doc/development/makefiles.1.html | 32 +++++++++++++++--
deal.II/doc/news/c-5.0.html | 8 +++++
deal.II/lac/Makefile | 22 +++++-------
deal.II/lib/Makefile | 21 +++++------
12 files changed, 117 insertions(+), 98 deletions(-)
diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile
index d3e979d628..81adc642d9 100644
--- a/deal.II/base/Makefile
+++ b/deal.II/base/Makefile
@@ -34,32 +34,26 @@ $(LIBDIR)/base/%.$(OBJEXT) :
# rules
-ifeq ($(enable-shared),yes)
- lib: $(LIBDIR)/libbase.g.so $(LIBDIR)/libbase.so
- libg: $(LIBDIR)/libbase.g.so
- libo: $(LIBDIR)/libbase.so
-else
- lib: $(LIBDIR)/libbase.g.a $(LIBDIR)/libbase.a
- libg: $(LIBDIR)/libbase.g.a
- libo: $(LIBDIR)/libbase.a
-endif
+lib: $(LIBDIR)/libbase.g$(lib-suffix) $(LIBDIR)/libbase$(lib-suffix)
+libg: $(LIBDIR)/libbase.g$(lib-suffix)
+libo: $(LIBDIR)/libbase$(lib-suffix)
-$(LIBDIR)/libbase.a: $(o-files)
+$(LIBDIR)/libbase$(static-lib-suffix): $(o-files)
@echo "=====base=============optimized==$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(o-files)
@$(RANLIB) $@
-$(LIBDIR)/libbase.g.a: $(go-files)
+$(LIBDIR)/libbase.g$(static-lib-suffix): $(go-files)
@echo "=====base=============debug======$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(go-files)
@$(RANLIB) $@
-$(LIBDIR)/libbase.so: $(o-files)
+$(LIBDIR)/libbase$(shared-lib-suffix): $(o-files)
@echo "=====base=============optimized==$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files)
-$(LIBDIR)/libbase.g.so: $(go-files)
+$(LIBDIR)/libbase.g$(shared-lib-suffix): $(go-files)
@echo "=====base=============debug======$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files)
@@ -91,4 +85,4 @@ Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options
include Makefile.dep
.PHONY: clean
-.PHONY: lib lib.a lib.g.a
+.PHONY: lib lib$(static-lib-suffix) lib.g$(static-lib-suffix)
diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in
index 451b50bbc3..f0b6051f52 100644
--- a/deal.II/common/Make.global_options.in
+++ b/deal.II/common/Make.global_options.in
@@ -72,14 +72,19 @@ endif
LIBPATH += $(addprefix -L,$(LIBDIR))
+static-lib-suffix = @static_lib_suffix@
+shared-lib-suffix = @shared_lib_suffix@
-# add search path for libraries to make dependencies
-vpath %.a $(libdir)
-vpath %.so $(libdir)
-
+ifeq ($(enable-shared),yes)
+ lib-suffix = $(shared-lib-suffix)
+else
+ lib-suffix = $(static-lib-suffix)
+endif
+# add search path for libraries to make dependencies
+vpath %@static_lib_suffix@ $(libdir)
+vpath %@shared_lib_suffix@ $(libdir)
-lib-suffix = @lib_suffix@
OBJEXT = @OBJEXT@
EXEEXT = @EXEEXT@
diff --git a/deal.II/configure b/deal.II/configure
index 856de501af..018e6a5cfa 100755
--- a/deal.II/configure
+++ b/deal.II/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.179 .
+# From configure.in Revision: 1.180 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
@@ -273,7 +273,7 @@ PACKAGE_BUGREPORT=
ac_unique_file="deal.II"
ac_subdirs_all="$ac_subdirs_all contrib tests"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DEAL_II_VERSION DEAL_II_MAJOR DEAL_II_MINOR DEAL_II_PATH DEAL2_DIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GXX_VERSION CXXFLAGSG CXXFLAGSO CXXFLAGSPIC SHLIBLD CC_VERSION enablemultithreading withmultithreading F77 F77_VERSION F77FLAGSO F77FLAGSG F77FLAGSPIC F77LIBS enableshared lib_suffix AR RANLIB ac_ct_RANLIB NEEDS_F77LIBS BLAS_LIB TECPLOT_LIB TECPLOT_INCLUDE_DIR HSL_LIB HSL_INCLUDE_DIR USE_CONTRIB_HSL USE_CONTRIB_PETSC DEAL_II_PETSC_DIR DEAL_II_PETSC_ARCH DEAL_II_PETSC_VERSION_MAJOR DEAL_II_PETSC_VERSION_MINOR DEAL_II_PETSC_VERSION_SUBMINOR DEAL_II_DEFINE_DEAL_II_USE_PETSC USE_CONTRIB_METIS DEAL_II_METIS_DIR UMFPACK_LIB UMFPACK_INCLUDE_DIR USE_CONTRIB_UMFPACK DOXYGEN DOT DEAL_II_HAVE_DOT PERL subdirs LDFLAGSPIC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DEAL_II_VERSION DEAL_II_MAJOR DEAL_II_MINOR DEAL_II_PATH DEAL2_DIR build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GXX_VERSION CXXFLAGSG CXXFLAGSO CXXFLAGSPIC SHLIBLD CC_VERSION enablemultithreading withmultithreading F77 F77_VERSION F77FLAGSO F77FLAGSG F77FLAGSPIC F77LIBS enableshared static_lib_suffix shared_lib_suffix AR RANLIB ac_ct_RANLIB NEEDS_F77LIBS BLAS_LIB TECPLOT_LIB TECPLOT_INCLUDE_DIR HSL_LIB HSL_INCLUDE_DIR USE_CONTRIB_HSL USE_CONTRIB_PETSC DEAL_II_PETSC_DIR DEAL_II_PETSC_ARCH DEAL_II_PETSC_VERSION_MAJOR DEAL_II_PETSC_VERSION_MINOR DEAL_II_PETSC_VERSION_SUBMINOR DEAL_II_DEFINE_DEAL_II_USE_PETSC USE_CONTRIB_METIS DEAL_II_METIS_DIR UMFPACK_LIB UMFPACK_INCLUDE_DIR USE_CONTRIB_UMFPACK DOXYGEN DOT DEAL_II_HAVE_DOT PERL subdirs LDFLAGSPIC LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -7826,6 +7826,9 @@ else
enableshared=yes
fi;
+shared_lib_suffix=".so"
+static_lib_suffix=".a"
+
case "$target" in
*-aix4* | alpha*-linux* | alpha*-osf45* | *cygwin | powerpc-apple-darwin* | hppa64-unknown-linux-gnu )
{ echo "$as_me:$LINENO: WARNING: Shared libraries not supported on $target. Using static libs instead" >&5
@@ -7834,11 +7837,6 @@ echo "$as_me: WARNING: Shared libraries not supported on $target. Using static l
;;
esac
-if test "x$enableshared" = "xyes" ; then
- lib_suffix=".so"
-else
- lib_suffix=".a"
-fi
@@ -9682,7 +9680,8 @@ s,@F77FLAGSG@,$F77FLAGSG,;t t
s,@F77FLAGSPIC@,$F77FLAGSPIC,;t t
s,@F77LIBS@,$F77LIBS,;t t
s,@enableshared@,$enableshared,;t t
-s,@lib_suffix@,$lib_suffix,;t t
+s,@static_lib_suffix@,$static_lib_suffix,;t t
+s,@shared_lib_suffix@,$shared_lib_suffix,;t t
s,@AR@,$AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
@@ -10328,6 +10327,7 @@ if test "x$doxygen_not_found" = "xyes" ; then
echo " WARNING: documentation generation program could be found."
echo " WARNING: You can still use the library, but you won't be"
echo " WARNING: able to generate API documentation locally on"
- echo " WARNING: your machine."
+ echo " WARNING: your machine. It is available for download,"
+ echo " WARNING: however."
echo
fi
diff --git a/deal.II/configure.in b/deal.II/configure.in
index d7ff72539c..993b894081 100644
--- a/deal.II/configure.in
+++ b/deal.II/configure.in
@@ -265,6 +265,9 @@ dnl On AIX 4.x and alpha, shared libs don't work for us at present, so
dnl disable them (we should probably use libtool there). Likewise on
dnl CygWin Windows and Mac OS X systems, where we don't know how to
dnl create shared libs at all (at least at present)
+shared_lib_suffix=".so"
+static_lib_suffix=".a"
+
case "$target" in
*-aix4* | alpha*-linux* | alpha*-osf[45]* | *cygwin | powerpc-apple-darwin* | hppa64-unknown-linux-gnu )
AC_MSG_WARN(Shared libraries not supported on $target. Using static libs instead)
@@ -272,14 +275,9 @@ case "$target" in
;;
esac
-if test "x$enableshared" = "xyes" ; then
- lib_suffix=".so"
-else
- lib_suffix=".a"
-fi
-
AC_SUBST(enableshared)
-AC_SUBST(lib_suffix)
+AC_SUBST(static_lib_suffix)
+AC_SUBST(shared_lib_suffix)
dnl Also look for RANLIB, since some rather old systems (ah, and MAC OS X!)
dnl still require it for statically linked libraries. On other systems,
diff --git a/deal.II/contrib/hsl/Makefile b/deal.II/contrib/hsl/Makefile
index 4375ecb0ec..bd7fd78aa8 100644
--- a/deal.II/contrib/hsl/Makefile
+++ b/deal.II/contrib/hsl/Makefile
@@ -29,13 +29,13 @@ $(LIBDIR)/contrib/hsl/%.$(OBJEXT) :
lib: $(LIBDIR)/libhsl$(lib-suffix) $(LIBDIR)/bin/detached_ma27$(EXEEXT)
-$(LIBDIR)/libhsl.a: $(forward-declarations) $(o-files)
+$(LIBDIR)/libhsl$(static-lib-suffix): $(forward-declarations) $(o-files)
@echo =====hsl==============optimized==$(MT)== Linking library: $(@F)
@$(AR) ru $@ $(o-files)
# link the object files to a shared library. since this is not C++,
# simply use the C compiler, rather than $(SHLIBLD)
-$(LIBDIR)/libhsl.so: $(forward-declarations) $(o-files)
+$(LIBDIR)/libhsl$(shared-lib-suffix): $(forward-declarations) $(o-files)
@echo =====hsl==============optimized==$(MT)== Linking library: $(@F)
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files) $(F77LIBS)
@@ -83,4 +83,4 @@ include Makefile.dep
.PHONY: clean
-.PHONY: lib lib.a lib.g.a
+.PHONY: lib lib$(static-lib-suffix) lib.g$(static-lib-suffix)
diff --git a/deal.II/contrib/umfpack/Makefile b/deal.II/contrib/umfpack/Makefile
index d4eaf7a702..2f3d6cdd90 100644
--- a/deal.II/contrib/umfpack/Makefile
+++ b/deal.II/contrib/umfpack/Makefile
@@ -1,11 +1,7 @@
include ../../common/Make.global_options
# rules
-ifeq ($(enable-shared),yes)
- lib: $(LIBDIR)/liblac_umfpack.so
-else
- lib: $(LIBDIR)/liblac_umfpack.a
-endif
+lib: $(LIBDIR)/liblac_umfpack$(lib-suffix)
ifneq ($(with-multithreading),no)
MT = MT
@@ -22,12 +18,12 @@ UMFPACK:
cd UMFPACK/Source ; $(MAKE) all
-$(LIBDIR)/liblac_umfpack.so: AMD UMFPACK
+$(LIBDIR)/liblac_umfpack$(shared-lib-suffix): AMD UMFPACK
@echo "=====umfpack==========optimized==$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $D/lib/contrib/umfpack/*.o
-$(LIBDIR)/liblac_umfpack.a: AMD UMFPACK
+$(LIBDIR)/liblac_umfpack$(static-lib-suffix): AMD UMFPACK
@echo "=====umfpack==========optimized==$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $D/lib/contrib/umfpack/*.o
@$(RANLIB) $@
diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile
index 4323b974b5..316e5f7547 100644
--- a/deal.II/deal.II/Makefile
+++ b/deal.II/deal.II/Makefile
@@ -16,21 +16,12 @@ default: 2dg 2d
all: 2dg 2d 3dg 3d 1dg 1d
-ifeq ($(enable-shared),yes)
- 1dg: $(LIBDIR)/libdeal_II_1d.g.so
- 1d : $(LIBDIR)/libdeal_II_1d.so
- 2dg: $(LIBDIR)/libdeal_II_2d.g.so
- 2d : $(LIBDIR)/libdeal_II_2d.so
- 3dg: $(LIBDIR)/libdeal_II_3d.g.so
- 3d : $(LIBDIR)/libdeal_II_3d.so
-else
- 1dg: $(LIBDIR)/libdeal_II_1d.g.a
- 1d : $(LIBDIR)/libdeal_II_1d.a
- 2dg: $(LIBDIR)/libdeal_II_2d.g.a
- 2d : $(LIBDIR)/libdeal_II_2d.a
- 3dg: $(LIBDIR)/libdeal_II_3d.g.a
- 3d : $(LIBDIR)/libdeal_II_3d.a
-endif
+1dg: $(LIBDIR)/libdeal_II_1d.g$(lib-suffix)
+1d : $(LIBDIR)/libdeal_II_1d$(lib-suffix)
+2dg: $(LIBDIR)/libdeal_II_2d.g$(lib-suffix)
+2d : $(LIBDIR)/libdeal_II_2d$(lib-suffix)
+3dg: $(LIBDIR)/libdeal_II_3d.g$(lib-suffix)
+3d : $(LIBDIR)/libdeal_II_3d$(lib-suffix)
# create lists of file names
cc-files = $(shell echo source/*/*.cc)
@@ -102,59 +93,59 @@ endif
# rules how to make the libraries themselves
-$(LIBDIR)/libdeal_II_1d.g.a: $(go-files-1d)
+$(LIBDIR)/libdeal_II_1d.g$(static-lib-suffix): $(go-files-1d)
@echo "=====deal.II====1d====debug======$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(go-files-1d)
@$(RANLIB) $@
-$(LIBDIR)/libdeal_II_1d.a: $(o-files-1d)
+$(LIBDIR)/libdeal_II_1d$(static-lib-suffix): $(o-files-1d)
@echo "=====deal.II====1d====optimized==$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(o-files-1d)
@$(RANLIB) $@
-$(LIBDIR)/libdeal_II_2d.g.a: $(go-files-2d)
+$(LIBDIR)/libdeal_II_2d.g$(static-lib-suffix): $(go-files-2d)
@echo "=====deal.II====2d====debug======$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(go-files-2d)
@$(RANLIB) $@
-$(LIBDIR)/libdeal_II_2d.a: $(o-files-2d)
+$(LIBDIR)/libdeal_II_2d$(static-lib-suffix): $(o-files-2d)
@echo "=====deal.II====2d====optimized==$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(o-files-2d)
@$(RANLIB) $@
-$(LIBDIR)/libdeal_II_3d.g.a: $(go-files-3d)
+$(LIBDIR)/libdeal_II_3d.g$(static-lib-suffix): $(go-files-3d)
@echo "=====deal.II====3d====debug======$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(go-files-3d)
@$(RANLIB) $@
-$(LIBDIR)/libdeal_II_3d.a: $(o-files-3d)
+$(LIBDIR)/libdeal_II_3d$(static-lib-suffix): $(o-files-3d)
@echo "=====deal.II====3d====optimized==$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(o-files-3d)
@$(RANLIB) $@
-$(LIBDIR)/libdeal_II_1d.g.so: $(go-files-1d)
+$(LIBDIR)/libdeal_II_1d.g$(shared-lib-suffix): $(go-files-1d)
@echo "=====deal.II====1d====debug======$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-1d) $(deplibs.g)
-$(LIBDIR)/libdeal_II_1d.so: $(o-files-1d)
+$(LIBDIR)/libdeal_II_1d$(shared-lib-suffix): $(o-files-1d)
@echo "=====deal.II====1d====optimized==$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-1d) $(deplibs.o)
-$(LIBDIR)/libdeal_II_2d.g.so: $(go-files-2d)
+$(LIBDIR)/libdeal_II_2d.g$(shared-lib-suffix): $(go-files-2d)
@echo "=====deal.II====2d====debug======$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-2d) $(deplibs.g)
-$(LIBDIR)/libdeal_II_2d.so: $(o-files-2d)
+$(LIBDIR)/libdeal_II_2d$(shared-lib-suffix): $(o-files-2d)
@echo "=====deal.II====2d====optimized==$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-2d) $(deplibs.o)
-$(LIBDIR)/libdeal_II_3d.g.so: $(go-files-3d)
+$(LIBDIR)/libdeal_II_3d.g$(shared-lib-suffix): $(go-files-3d)
@echo "=====deal.II====3d====debug======$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-3d) $(deplibs.g)
-$(LIBDIR)/libdeal_II_3d.so: $(o-files-3d)
+$(LIBDIR)/libdeal_II_3d$(shared-lib-suffix): $(o-files-3d)
@echo "=====deal.II====3d====optimized==$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-3d) $(deplibs.o)
diff --git a/deal.II/doc/development/Makefile b/deal.II/doc/development/Makefile
index e1a914837b..f4b92c6066 100644
--- a/deal.II/doc/development/Makefile
+++ b/deal.II/doc/development/Makefile
@@ -20,6 +20,7 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
@echo 'SHLIBLD=$(SHLIBLD)
' >> $@
@echo 'OBJEXT=$(OBJEXT)
' >> $@
@echo 'EXEEXT=$(EXEEXT)
' >> $@
+ @echo 'enable-shared=$(enable-shared)
' >> $@
@echo 'PERL=$(PERL)
' >> $@
@echo 'DEAL_II_MAJOR=$(DEAL_II_MAJOR)
' >> $@
@echo 'DEAL_II_MINOR=$(DEAL_II_MINOR)
' >> $@
@@ -35,6 +36,9 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
@echo 'lib-path-deal2=$(lib-path-deal2)
' >> $@
@echo 'LIBPATH=$(LIBPATH)
' >> $@
@echo 'LIBS=$(LIBS)
' >> $@
+ @echo 'static-lib-suffix=$(static-lib-suffix)
' >> $@
+ @echo 'shared-lib-suffix=$(shared-lib-suffix)
' >> $@
+ @echo 'lib-suffix=$(lib-suffix)
' >> $@
@echo 'lib-base.o=$(lib-base.o)
' >> $@
@echo 'lib-base.g=$(lib-base.g)
' >> $@
@echo 'lib-lac.o=$(lib-lac.o)
' >> $@
diff --git a/deal.II/doc/development/makefiles.1.html b/deal.II/doc/development/makefiles.1.html
index e8d23dac48..9f144c8451 100644
--- a/deal.II/doc/development/makefiles.1.html
+++ b/deal.II/doc/development/makefiles.1.html
@@ -16,7 +16,7 @@
The file common/Make.global_options
exports several
make variables to other Makefiles which
include it. You will want to include this file into the Makefiles of
- your project to use the same compiler flags and to access the pathes
+ your project to use the same compiler flags and to access the paths
to libraries. This page documents available
flags, documents the values which are used
in your local installation, and shows
@@ -139,6 +139,13 @@
+ enable-shared
+
+ Determines whether shared or static libraries are used.
+ Set to yes
if you want to use shared
+ libraries.
+
+
PERL
@@ -304,6 +311,27 @@
Paths and filenames of libraries
+ -
static-lib-suffix
+ -
+ File extension of static libraries. Usually set to .a
+
+
+ -
shared-lib-suffix
+ -
+ File extension of shared libraries. If shared libraries
+ are supported, this suffix is usually .so, if shared
+ libraries are not supported, it is set to the same value
+ as static-lib-suffix
.
+
+
+ -
lib-suffix
+ -
+ File extension of libraries. Depending on the value of
+ enable-shared
, it is either set to
+ static-lib-suffix
or to
+ shared-lib-suffix
.
+
+
-
lib-base.o
-
Path and filename of the base library in optimized
@@ -369,7 +397,7 @@
-
Pathes to include files
+ Paths to include files
-
include-path-base
diff --git a/deal.II/doc/news/c-5.0.html b/deal.II/doc/news/c-5.0.html
index b1b33a42d8..c49fb65be7 100644
--- a/deal.II/doc/news/c-5.0.html
+++ b/deal.II/doc/news/c-5.0.html
@@ -73,6 +73,14 @@ inconvenience this causes.
General
+ -
+ Fixed: Configuration scripts were changed to allow any file suffix for
+ shared and static libraries to allow in the future the creation of dlls
+ under cygwin.
+
+ (Ralf B. Schulz, 2004/12/17)
+
+
-
New: Configuration now detects the Intel Fortran compiler and can set
compilation flags accordingly.
diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile
index e037e23269..9bfb4e8030 100644
--- a/deal.II/lac/Makefile
+++ b/deal.II/lac/Makefile
@@ -33,15 +33,9 @@ $(LIBDIR)/lac/%.$(OBJEXT) :
# rules
-ifeq ($(enable-shared),yes)
- lib: $(LIBDIR)/liblac.g.so $(LIBDIR)/liblac.so
- libg: $(LIBDIR)/liblac.g.so
- libo: $(LIBDIR)/liblac.so
-else
- lib: $(LIBDIR)/liblac.g.a $(LIBDIR)/liblac.a
- libg: $(LIBDIR)/liblac.g.a
- libo: $(LIBDIR)/liblac.a
-endif
+lib: $(LIBDIR)/liblac.g$(lib-suffix) $(LIBDIR)/liblac$(lib-suffix)
+libg: $(LIBDIR)/liblac.g$(lib-suffix)
+libo: $(LIBDIR)/liblac$(lib-suffix)
# if we use HSL, then we need to link against libhsl.so. if we don't, then
# don't set this variable
@@ -70,22 +64,22 @@ else
endif
-$(LIBDIR)/liblac.a: $(o-files)
+$(LIBDIR)/liblac$(static-lib-suffix): $(o-files)
@echo "=====lac==============optimized==$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(o-files)
@$(RANLIB) $@
-$(LIBDIR)/liblac.g.a: $(go-files)
+$(LIBDIR)/liblac.g$(static-lib-suffix): $(go-files)
@echo "=====lac==============debug======$(MT)== Linking library: $(@F)"
@$(AR) ru $@ $(go-files)
@$(RANLIB) $@
-$(LIBDIR)/liblac.so: $(o-files)
+$(LIBDIR)/liblac$(shared-lib-suffix): $(o-files)
@echo "=====lac==============optimized==$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files) $(deplibs.o)
-$(LIBDIR)/liblac.g.so: $(go-files)
+$(LIBDIR)/liblac.g$(shared-lib-suffix): $(go-files)
@echo "=====lac==============debug======$(MT)== Linking library: $(@F)"
@$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files) $(deplibs.g)
@@ -115,4 +109,4 @@ Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options
include Makefile.dep
.PHONY: clean
-.PHONY: lib lib.a lib.g.a
+.PHONY: lib lib$(static-lib-suffix) lib.g$(static-lib-suffix)
diff --git a/deal.II/lib/Makefile b/deal.II/lib/Makefile
index 575c6e8c89..016e17210e 100644
--- a/deal.II/lib/Makefile
+++ b/deal.II/lib/Makefile
@@ -43,6 +43,7 @@ ifeq ($(DEAL_II_PETSC_VERSION_MINOR),1)
else
xlib-ksp=libpetscksp
endif
+
xlib.g = $(lib-contrib-petsc-path.g)/$(xlib-ksp)$(lib-suffix) \
$(lib-contrib-petsc-path.g)/libpetscdm$(lib-suffix) \
$(lib-contrib-petsc-path.g)/libpetscmat$(lib-suffix) \
@@ -57,11 +58,11 @@ endif
ifeq ($(enable-shared),yes)
external-links-petsc:
@echo Setting up libraries for PETSc
- @echo "======================debug============= Linking library: libpetsc.g$(lib-suffix)"
- @$(CXX) -shared -o libpetsc.g$(lib-suffix) \
+ @echo "======================debug============= Linking library: libpetsc.g$(shared-lib-suffix)"
+ @$(CXX) -shared -o libpetsc.g$(shared-lib-suffix) \
-Wl,-rpath,$(lib-contrib-petsc-path.g) $(xlib.g)
- @echo "======================optimized========= Linking library: libpetsc$(lib-suffix)"
- @$(CXX) -shared -o libpetsc$(lib-suffix) \
+ @echo "======================optimized========= Linking library: libpetsc$(shared-lib-suffix)"
+ @$(CXX) -shared -o libpetsc$(shared-lib-suffix) \
-Wl,-rpath,$(lib-contrib-petsc-path.o) $(xlib.o)
else
@@ -70,22 +71,22 @@ else
# single new archive. Do the same for debug and optimized mode.
external-links-petsc:
@echo Setting up libraries for PETSc
- @echo "======================debug============= Linking library: libpetsc.g.a"
+ @echo "======================debug============= Linking library: libpetsc.g$(static-lib-suffix)"
@mkdir ar_tmp; cd ar_tmp; \
for arfile in $(xlib.g) ; do \
$(AR) x $$arfile; \
done
- @$(AR) ru libpetsc.g.a ar_tmp/*
+ @$(AR) ru libpetsc.g$(static-lib-suffix) ar_tmp/*
@rm -r ar_tmp
- @$(RANLIB) libpetsc.g.a
- @echo "======================optimized========= Linking library: libpetsc.a"
+ @$(RANLIB) libpetsc.g$(static-lib-suffix)
+ @echo "======================optimized========= Linking library: libpetsc$(static-lib-suffix)"
@mkdir ar_tmp; cd ar_tmp; \
for arfile in $(xlib.o) ; do \
$(AR) x $$arfile; \
done
- @$(AR) ru libpetsc.a ar_tmp/*
+ @$(AR) ru libpetsc$(static-lib-suffix) ar_tmp/*
@rm -r ar_tmp
- @$(RANLIB) libpetsc.a
+ @$(RANLIB) libpetsc$(static-lib-suffix)
endif
--
2.39.5