Commit cc50cc51 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

[WP][TASK] (ticket10app): rewrite linker rules for Fortran programs

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.
parent 271b6460
......@@ -102,18 +102,22 @@ TESTCASEMAKE=$(filter-out %.bak,$(wildcard testcases/Makefile*))
DOXYTXT=$(shell find . -name doxygen\*.txt)
EDITFILES=Makefile README $(wildcard *.cfg) COPYING $(DOXYTXT)
EDITSRC=$(wildcard *.cc *.h *.c *.f *.txt *.gpt *.inc)
EDITSRC=$(wildcard *.cc *.h *.c *.f *.gpt *.inc)
EDITTESTS=$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt)
flist: $(wildcard *.txt *.c *.f *.h *.inc Makefile *.cc *.gpt) \
flist: $(wildcard *.txt *.c *.f *.h *.inc *_text.txt Makefile *.cc *.gpt) \
doxydoc.cfg README COPYING $(DOXYTXT)\
$(wildcard testcases/*.par) $(wildcard testcases/*.tpl) \
$(TESTCASEMAKE) $(wildcard testcases/*.gpt) $(TF_EDIT)
echo $(filter $(EDITFILES),$^) | tr ' ' '\n' | sort > $@
echo "----" >> $@
echo "---- source code ----" >> $@
echo $(filter $(EDITSRC),$^) | tr ' ' '\n' | sort >> $@
echo "----" >> $@
echo "---- Fortran source files only ----" >> $@
echo $(sort $(filter %.f,$^)) | tr ' ' '\n' >> $@
echo "---- C++ source files only ----" >> $@
echo $(sort $(filter %.cc,$^)) | tr ' ' '\n' >> $@
echo "---- test cases ----" >> $@
echo $(sort $(filter $(EDITTESTS),$^)) | tr ' ' '\n' >> $@
echo "----" >> $@
echo $(filter-out $(EDITFILES) $(EDITSRC) $(EDITTESTS),$^) \
......@@ -154,73 +158,95 @@ include $(patsubst %.txt,%.d,$(wildcard *_help.txt))
include $(patsubst %.cc,%.d,$(wildcard *.cc))
#----------------------------------------------------------------------
# targets
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 $@
# binary executable targets
# -------------------------
#
# Fortran programs
# ----------------
#
xyz2uvw tisli susei smoos rotate evelo coro: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lsff -ltf
tsfilt stufi: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lseife -lsff -ltf
suspect dise: %: %.o
$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@ \
-lsffu -ltime -lsff -ltf
# Fortran programs with libfapidxx support
# ----------------------------------------
#
# 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:
......
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