Commit 5d0aea00 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

[WP][TASK][FIX] (ticket10app): rewrite all rules with libraries in proper order

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.

All linker rules underwent a revision and are tested
parent cc50cc51
......@@ -30,7 +30,7 @@
# 24/05/2001 introduced tsfilt
#
# REVISIONS and CHANGES
# 11/07/2005 V1.0 Thomas Forbriger
# 11/07/2005 V1.0 Thomas Forbriger (thof)
# 07/12/2007 V1.1 default Fortran compiler now is g77
# 17/12/2007 V1.2 moved to gfortran
# 08/10/2010 V1.3 migrate to new SVN environment
......@@ -46,6 +46,8 @@
# 17/04/2013 V1.9 lisousi has its own place now (moved source code)
# 28/10/2013 V1.10 implemented libfapidxx-version of suseix
# 02/01/2014 V1.11 removed signal generators, added tisli suspect
# 01/02/2014 thof: rewrite all linker rules with libraries in
# proper order
#
# ============================================================================
......@@ -157,6 +159,12 @@ edit: flist; vim $<
include $(patsubst %.txt,%.d,$(wildcard *_help.txt))
include $(patsubst %.cc,%.d,$(wildcard *.cc))
#----------------------------------------------------------------------
# typical combinations of libraries
LIBDATRWXX=-ldatrwxx -lsffxx -ltime++ -lgsexx -laff
LIBFAPIDXX=-lfapidxx $(LIBDATRWXX)
LIBTSIOXX=-ltsioxx -ltsxx -ltfxx $(LIBDATRWXX)
#----------------------------------------------------------------------
# binary executable targets
# -------------------------
......@@ -164,6 +172,7 @@ include $(patsubst %.cc,%.d,$(wildcard *.cc))
# Fortran programs
# ----------------
#
xyz2uvw tisli susei smoos rotate evelo coro: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lsff -ltf
......@@ -178,79 +187,63 @@ suspect dise: %: %.o
# Fortran programs with libfapidxx support
# ----------------------------------------
suseix: %x: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-ltf $(LIBFAPIDXX)
#
# C++ programs
# ------------
### tsfilt: %: %.o
### $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -lseife -ltf
###
### stufi: %: %.o
### $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -lseife -ltf -lsff
###
### tisli susei evelo rotate coro xyz2uvw: %: %.o
### $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -ltf -lsff
###
### suseix: %x: %.o
### $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -ltf \
### -lfapidxx -ldatrwxx -lsffxx -lgsexx -ltime++ -laff
###
### suspect smoos dise: %: %.o
### $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ \
### -ltf -lsffu -ltime -lsff -lgsl -lm -lgslcblas
###
### deconv foutra sigval sigift: \
### %: %.o
### $(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lfourierxx -lfftw3 -lm \
### -ltsioxx -llinearxx \
### -ltsxx -ltfxx \
### -lcseife -ldatrwxx -lsffxx -lgsexx -ltime++ -laff \
### -llapack -lblas \
### -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
###
### fregra: \
### %: %.o
### $(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lm \
### -lsffxx -ldatrwxx \
### -ltsxx -ltfxx -lsffxx -lgsexx -ltime++ -laff \
### -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
###
### sigscale teseco resaseda gatherdiff autocorr cross tidofi: \
### %: %.o
### $(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) \
### -ltsioxx \
### -ltsxx -ltfxx \
### -lcseife -ldatrwxx -lsffxx -lgsexx -ltime++ -laff \
### -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
###
### noisymize: \
### %: %.o
### $(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) \
### -ltsioxx \
### -ltsxx -ltfxx \
### -lcseife -ldatrwxx -lsffxx -lgsexx -ltime++ -laff \
### -lgsl -lgslcblas \
### -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
###
### fidasexx: fidasexx.o
### $(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lpgplotCpp -lcpgplot \
### $(TF_LINK_PGPLOT) $(TF_LINK_FORTRAN) -llinearxx -llapack -lblas \
### -ltfxx -ltsxx -ldatrwxx -lsffxx -lgsexx -ltime++ -laff \
### -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
###
### soutifu: soutifu.o
### $(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) \
### -lstfinv \
### -lfourierxx -lfftw3 \
### -llinearxx -llapack -lblas \
### -ltsioxx -ltfxx -ltsxx -ldatrwxx -lsffxx -lgsexx -ltime++ -laff \
### -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS) $(LDFLAGS)
###
### geophone: %: %.o
### $(LINK.cc) $^ -laff -lsffxx -lgsexx -ltime++ -ltfxx $(LDFLAGS) -o $@
.PHONY: list-libraries
list-libraries:
grep ' -l' Makefile | tr ' ' '\n' | egrep '^-l' | sort | uniq
sigval sigscale geophone gatherdiff cross autocorr: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
$(LIBDATRWXX) -ltfxx
tidofi: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-ltsxx -lcseife $(LIBDATRWXX) -ltfxx
fidasexx: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-llinearxx -lpgplotCpp -lcpgplot \
$(LIBDATRWXX) -ltfxx \
$(TF_LINK_PGPLOT) $(TF_LINK_FORTRAN) \
-llapack
sigfit: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-llinearxx \
$(LIBDATRWXX) -ltfxx \
-llapack
resaseda: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-ltsxx $(LIBDATRWXX) -ltfxx
teseco: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
$(LIBTSIOXX)
noisymize: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
$(LIBTSIOXX) -lgsl -lgslcblas
fregra foutra deconv: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lfourierxx $(LIBTSIOXX) -lfftw3
soutifu: \
%: %.o
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lstfinv -lfourierxx $(LIBTSIOXX) -lfftw3
#======================================================================
# documentation part
......
Supports Markdown
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