]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Allow for the creation of static petsc libs.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 28 Apr 2004 19:10:54 +0000 (19:10 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 28 Apr 2004 19:10:54 +0000 (19:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@9112 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lib/Makefile

index c6988bb1090deab845292ee4eb87009f7e850a95..13898420bf9101b3d5461d1223f70151f1a8cdd1 100644 (file)
@@ -55,14 +55,24 @@ endif
            $(lib-contrib-petsc-path.o)/libpetscmat$(lib-suffix) \
            $(lib-contrib-petsc-path.o)/libpetscvec$(lib-suffix) \
            $(lib-contrib-petsc-path.o)/libpetsc$(lib-suffix)
-  external-links-petsc:
+
+  ifeq ($(enable-shared),yes)
+    external-links-petsc:
        @echo Setting up libraries for PETSc
-       @echo "======================debug============= Linking library:   libpetsc.g.so"
-       @$(CXX) -shared -o libpetsc.g.so \
+       @echo "======================debug============= Linking library:   libpetsc.g$(lib-suffix)"
+       @$(CXX) -shared -o libpetsc.g$(lib-suffix) \
                -Wl,-rpath,$(lib-contrib-petsc-path.g) $(xlib.g)
-       @echo "======================optimized========= Linking library:   libpetsc.so"
-       @$(CXX) -shared -o libpetsc.so \
+       @echo "======================optimized========= Linking library:   libpetsc$(lib-suffix)"
+       @$(CXX) -shared -o libpetsc$(lib-suffix) \
                -Wl,-rpath,$(lib-contrib-petsc-path.o) $(xlib.o)
+  else
+    external-links-petsc:
+       @echo Setting up libraries for PETSc
+       @echo "======================debug============= Linking library:   libpetsc.g$(lib-suffix)"
+       @$(AR) ru libpetsc.g$(lib-suffix)  $(xlib.g)
+       @echo "======================optimized========= Linking library:   libpetsc$(lib-suffix)"
+       @$(AR) ru libpetsc$(lib-suffix) $(xlib.o)
+  endif
 
 else
   external-links-petsc:

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.