]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Link with libmpiuni as this appears to be necessary on Mac OS X
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 23 Aug 2007 22:37:55 +0000 (22:37 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 23 Aug 2007 22:37:55 +0000 (22:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@15032 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/Makefile

index c21141be5c613ccf63d8890fcd629a089565f187..d7fd328394d609d8509fe93c6275bd1e7e199e9b 100644 (file)
@@ -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)
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.