]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
# in general, when linking shared libraries, we will want to link with
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 5 Feb 2003 22:42:12 +0000 (22:42 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 5 Feb 2003 22:42:12 +0000 (22:42 +0000)
# 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

git-svn-id: https://svn.dealii.org/trunk@7042 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/Makefile
deal.II/lac/Makefile

index d9eda1dc8dbb1bc8157f1b3308b71d939570a612..6ae190875d24f14d3b2def7f4c43cc721bb8bfa8 100644 (file)
@@ -87,6 +87,19 @@ $(LIBDIR)/3d/%.$(OBJEXT) :
 
 
 
+# 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
+ifneq ($(GXX-VERSION),compaq_cxx)
+  deplibs.g = $(lib-lac.g) $(lib-base.g)
+  deplibs.o = $(lib-lac.o) $(lib-base.o)
+else
+  deplibs.g =
+  deplibs.o =
+endif
+
+
 
 # rules how to make the libraries themselves
 $(LIBDIR)/libdeal_II_1d.g.a: $(go-files-1d)
@@ -121,29 +134,29 @@ $(LIBDIR)/libdeal_II_3d.a: $(o-files-3d)
 
 $(LIBDIR)/libdeal_II_1d.g.so: $(go-files-1d)
        @echo "=====deal.II====1d====debug======$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-1d) $(lib-lac.g) $(lib-base.g)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-1d) $(deplibs.g)
 
 $(LIBDIR)/libdeal_II_1d.so: $(o-files-1d)
        @echo "=====deal.II====1d====optimized==$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-1d) $(lib-lac.o) $(lib-base.o)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-1d) $(deplibs.o)
 
 
 $(LIBDIR)/libdeal_II_2d.g.so: $(go-files-2d)
        @echo "=====deal.II====2d====debug======$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-2d) $(lib-lac.g) $(lib-base.g)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-2d) $(deplibs.g)
 
 $(LIBDIR)/libdeal_II_2d.so: $(o-files-2d)
        @echo "=====deal.II====2d====optimized==$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-2d) $(lib-lac.o) $(lib-base.o)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-2d) $(deplibs.o)
 
 
 $(LIBDIR)/libdeal_II_3d.g.so: $(go-files-3d)
        @echo "=====deal.II====3d====debug======$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-3d) $(lib-lac.g) $(lib-base.g)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-3d) $(deplibs.g)
 
 $(LIBDIR)/libdeal_II_3d.so: $(o-files-3d)
        @echo "=====deal.II====3d====optimized==$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-3d) $(lib-lac.o) $(lib-base.o)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-3d) $(deplibs.o)
 
 
 
index ac5f18fe4bdaf599feb6f4fa110a3ed6ac93c940..89da282cc24855b22ce475cb9e3891d7570c5512 100644 (file)
@@ -51,6 +51,19 @@ else
   LIBHSL=
 endif
 
+# 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
+ifneq ($(GXX-VERSION),compaq_cxx)
+  deplibs.g = $(lib-base.g) $(LIBHSL)
+  deplibs.o = $(lib-base.o) $(LIBHSL)
+else
+  deplibs.g =
+  deplibs.o =
+endif
+
+
 $(LIBDIR)/liblac.a: $(o-files)
        @echo "=====lac==============optimized==$(MT)== Linking library:   $(@F)"
        @ar ru $@ $(o-files)
@@ -64,11 +77,11 @@ $(LIBDIR)/liblac.g.a: $(go-files)
 
 $(LIBDIR)/liblac.so: $(o-files)
        @echo "=====lac==============optimized==$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files) $(lib-base.o) $(LIBHSL)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files) $(deplibs.o)
 
 $(LIBDIR)/liblac.g.so: $(go-files)
        @echo "=====lac==============debug======$(MT)== Linking library:   $(@F)"
-       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files) $(lib-base.g) $(LIBHSL)
+       @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-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.