From 734be4818b27794e28fccf6829d3e6f11be62040 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 23 Aug 2007 22:37:55 +0000 Subject: [PATCH] Link with libmpiuni as this appears to be necessary on Mac OS X git-svn-id: https://svn.dealii.org/trunk@15032 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/Makefile | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index c21141be5c..d7fd328394 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -39,7 +39,28 @@ $(LIBDIR)/base/%.$(OBJEXT) : @$(CXX) $(CXXFLAGS.o) -c $< -o $@ -# rules +# in general, when linking shared libraries, we will want to link with +# the underlying libs as well. AIX even requires this. on the other +# hand, on DEC OSF with CXX this will fail with duplicate symbols, so +# make sure that it doesn't happen on that system and that compiler +# +# for the current directory, this is only the PETSc libraries since we +# reference them in base/source/utilities +ifneq ($(GXX-VERSION),compaq_cxx) + deplibs.g = + deplibs.o = + + ifeq ($(USE_CONTRIB_PETSC),yes) + deplibs.g += $(lib-contrib-petsc.g) $(DEAL_II_PETSC_MPIUNI_LIB) + deplibs.o += $(lib-contrib-petsc.o) $(DEAL_II_PETSC_MPIUNI_LIB) + endif +else + deplibs.g = + deplibs.o = +endif + + +# rules for libraries lib: $(LIBDIR)/libbase.g$(lib-suffix) $(LIBDIR)/libbase$(lib-suffix) libg: $(LIBDIR)/libbase.g$(lib-suffix) libo: $(LIBDIR)/libbase$(lib-suffix) @@ -57,11 +78,11 @@ $(LIBDIR)/libbase.g$(static-lib-suffix): $(go-files) $(LIBDIR)/libbase$(shared-lib-suffix): $(o-files) @echo "=====base=============optimized==$(MT)== Linking library: $(@F)" - @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files) $(extra-o-files) + @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files) $(extra-o-files) $(deplibs.o) $(LIBDIR)/libbase.g$(shared-lib-suffix): $(go-files) @echo "=====base=============debug======$(MT)== Linking library: $(@F)" - @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files) $(extra-o-files) + @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files) $(extra-o-files) $(deplibs.g) -- 2.39.5