Commit 0ce82359 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

sorted out some issues with shared libraries

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libdatrwxx.su2
SVN Revision: 3604
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 1a174506
......@@ -177,7 +177,7 @@ libaff.a: $(INSTHEADER) $(LIBOBS)
libaff.so: $(INSTHEADER) $(LIBOBS)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBS)
/bin/mv -fpv $@ $(LOCLIBDIR)
/bin/mv -fv $@ $(LOCLIBDIR)
#======================================================================
# dependencies
......
......@@ -54,10 +54,10 @@ $(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
SUBDIRS=$(addsuffix /,sff tsoft tfascii su bonjer pdas mseed hpmo sac gse)
SUBDIRS+=$(addsuffix /,binary ascii)
LIBHEADERS=$(wildcard *.h)
LIBHEADERS=$(filter-out datatypes%,$(wildcard *.h))
LIBHEADERS+=$(wildcard $(addsuffix *.h,$(SUBDIRS)))
LIBSRC=$(wildcard *.cc sff/*.cc tsoft/*.cc tfascii/*.cc su/*.cc)
LIBSRC=$(filter-out datatype%,$(wildcard *.cc))
LIBSRC+=$(wildcard $(addsuffix *.cc,$(SUBDIRS)))
TESTHEADERS=$(wildcard tests/*.h)
......
......@@ -156,7 +156,7 @@ libfapidxx.a: $(INSTHEADER) $(LIBOBS)
libfapidxx.so: $(INSTHEADER) $(LIBOBS)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBS)
/bin/mv -fpv $@ $(LOCLIBDIR)
/bin/mv -fv $@ $(LOCLIBDIR)
#======================================================================
# documentation part
......
......@@ -27,12 +27,14 @@
# - set TF_REMCMMNT to cat if not defined
# 07/10/2010 V1.4 - migrate to FFTW3
# 15/11/2010 V1.5 - avoid makefdoc.pl
# 18.12.2010 V1.6 - shared library does not work satisfactory
#
# ============================================================================
#
all: install libfourier.doc doxydoc
install: install-include libfourier.a libfourierxx.a libfourierxx.so
install: install-include libfourier.a libfourierxx.a
#shared: libfourierxx.so
flist: Makefile $(wildcard *.f *.inc *.h *.cc *.c README *.cfg)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -71,11 +73,11 @@ RANLIB=ranlib
FFTWLIB=-lfftw3
#----------------------------------------------------------------------
FLAGS += $(MYFLAGS) -fPIC
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
FLAGS+=-fPIC
FFLAGS+=-ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS+=$(FLAGS)
CXXFLAGS+=-Wall -fPIC $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR) -fPIC
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
LIBSRC=$(wildcard *.f)
......@@ -185,8 +187,9 @@ libfourierxx.a: install-include $(LIBOBSXX)
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libfourierxx.so: install-include $(LIBOBSXX)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBSXX)
libfourierxx.so: install-include libfourier.a $(LIBOBSXX)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBSXX) -lfourier \
-L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCLIBDIR)
#======================================================================
......
......@@ -36,7 +36,7 @@ namespace fourier {
/*----------------------------------------------------------------------*/
void PolesNZeroes::setpole(const Tcvalue& pole)
void PolesNZeroes::setpole(const PolesNZeroes::Tcvalue& pole)
{
if (isnormal())
{ Mpoles.push_back(pole); }
......@@ -46,7 +46,7 @@ namespace fourier {
/*----------------------------------------------------------------------*/
void PolesNZeroes::setzero(const Tcvalue& zero)
void PolesNZeroes::setzero(const PolesNZeroes::Tcvalue& zero)
{
if (isnormal())
{ Mzeroes.push_back(zero); }
......@@ -56,7 +56,7 @@ namespace fourier {
/*----------------------------------------------------------------------*/
void PolesNZeroes::numfactor(const Tcvalue& factor)
void PolesNZeroes::numfactor(const PolesNZeroes::Tcvalue& factor)
{
if (isnormal())
{ Mnumerator *= factor; }
......@@ -66,7 +66,7 @@ namespace fourier {
/*----------------------------------------------------------------------*/
void PolesNZeroes::denfactor(const Tcvalue& factor)
void PolesNZeroes::denfactor(const PolesNZeroes::Tcvalue& factor)
{
if (isnormal())
{ Mdenominator *= factor; }
......
......@@ -126,7 +126,7 @@ libpgplotCpp.a: $(SRC:.cc=.o)
libpgplotCpp.so: $(SRC:.cc=.o)
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fpv $@ $(LIBINSTALLPATH)
/bin/mv -fv $@ $(LIBINSTALLPATH)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -118,7 +118,7 @@ libserialxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
libserialxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fpv $@ $(LOCLIBDIR)
/bin/mv -fv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -64,7 +64,7 @@
all: install doxydoc
install: install-include libtfxx.a
#libtfxx.so
#shared: libtfxx.so
# ============================================================================
#
......
......@@ -38,12 +38,18 @@
# linking to libtfxx.so also requires
# libseife even in cases where the main program
# doesn't need them; this is a linker issue
#
# 18.12.2010
# there is no problem with the shared library, when other libraries are linked
# at build time; shared library has same size but contains linker information;
# introduced target shared; commented out this shared, since not all libraries
# to be linked are shared libraries
#
# ============================================================================
all: install doxydoc
install: install-include libtsxx.a
#libtsxx.so
#shared: libtsxx.so
# ============================================================================
#
......@@ -122,7 +128,8 @@ libtsxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
/bin/mv -fv $@ $(LOCLIBDIR)
libtsxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^ -lseife -L$(LOCLIBDIR)
$(CXX) $(CXXFLAGS) -shared -o $@ $^ -lseife -lgsl \
-lgslcblas -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment