From 8dce68079a947473f1215b3057dedc465c97b456 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 5 Feb 2003 22:42:12 +0000 Subject: [PATCH] # 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 git-svn-id: https://svn.dealii.org/trunk@7042 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/Makefile | 25 +++++++++++++++++++------ deal.II/lac/Makefile | 17 +++++++++++++++-- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/deal.II/deal.II/Makefile b/deal.II/deal.II/Makefile index d9eda1dc8d..6ae190875d 100644 --- a/deal.II/deal.II/Makefile +++ b/deal.II/deal.II/Makefile @@ -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) diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index ac5f18fe4b..89da282cc2 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -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) -- 2.39.5