]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Put the _contents_ of several petsc archives into one instead of collecting several...
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Thu, 29 Apr 2004 14:00:58 +0000 (14:00 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Thu, 29 Apr 2004 14:00:58 +0000 (14:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@9119 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lib/Makefile

index 13898420bf9101b3d5461d1223f70151f1a8cdd1..97de411420201b5764974f56ad5226a4b9833032 100644 (file)
@@ -65,14 +65,31 @@ endif
        @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:
+else
+
+  # As I don't know how to merge archives, here a workaround: First extract all
+  # the archives into a newly created directory. Then put all the files into a
+  # 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$(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
+       @echo "======================debug============= Linking library:   libpetsc.g.a"
+       @mkdir ar_tmp; cd ar_tmp; \
+        for arfile in $(xlib.g) ; do \
+          $(AR) x $$arfile; \
+        done
+       @$(AR) ru libpetsc.g.a ar_tmp/*
+       @rm -r ar_tmp
+       @$(RANLIB) libpetsc.g.a
+       @echo "======================optimized========= Linking library:   libpetsc.a"
+       @mkdir ar_tmp; cd ar_tmp; \
+        for arfile in $(xlib.o) ; do \
+          $(AR) x $$arfile; \
+        done
+       @$(AR) ru libpetsc.a ar_tmp/*
+       @rm -r ar_tmp
+       @$(RANLIB) libpetsc.a
+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.