Commit df746752 authored by laura.gassner's avatar laura.gassner
Browse files

Merge branch 'thof/DENISE-import_Seitosh'

parents aca39e8a 628f7bb8
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: polesnzeroes.cc 4966 2013-02-01 13:46:50Z lrehor $
* $Id$
* \author Thomas Forbriger
* \date 05/01/2003
*
......@@ -12,7 +12,7 @@
* Copyright (c) 2003 by Thomas Forbriger (IMG Frankfurt)
*
* ----
* This program is free software; you can redistribute it and/or modify
* libfourier is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
......@@ -35,7 +35,7 @@
#define TF_POLESNZEROES_CC_VERSION \
"TF_POLESNZEROES_CC V1.0 "
#define TF_POLESNZEROES_CC_CVSID \
"$Id: polesnzeroes.cc 4966 2013-02-01 13:46:50Z lrehor $"
"$Id$"
#include <fourier/polesnzeroes.h>
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: polesnzeroes.h 4966 2013-02-01 13:46:50Z lrehor $
* $Id$
* \author Thomas Forbriger
* \date 05/01/2003
*
......@@ -12,7 +12,7 @@
* Copyright (c) 2003 by Thomas Forbriger (IMG Frankfurt)
*
* ----
* This program is free software; you can redistribute it and/or modify
* libfourier is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
......@@ -39,7 +39,7 @@
#define TF_POLESNZEROES_H_VERSION \
"TF_POLESNZEROES_H V1.0 "
#define TF_POLESNZEROES_H_CVSID \
"$Id: polesnzeroes.h 4966 2013-02-01 13:46:50Z lrehor $"
"$Id$"
#include<cmath>
#include<complex>
......
c this is <polesnzeros.inc>
cS
c ----------------------------------------------------------------------------
c ($Id: polesnzeros.inc 4966 2013-02-01 13:46:50Z lrehor $)
c ($Id$)
c
c Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
c
c ----
c This program is free software; you can redistribute it and/or modify
c libfourier is free software; you can redistribute it and/or modify
c it under the terms of the GNU General Public License as published by
c the Free Software Foundation; either version 2 of the License, or
c (at your option) any later version.
......
......@@ -2,13 +2,14 @@ this is <COPYING>
============================================================================
libseife
--------
$Id: COPYING 4961 2013-02-01 12:52:09Z lrehor $
$Id$
============================================================================
The source code in this directory is part of libseife which compiles to
libseifa. and libcseife.a
Copyright (C) 1984 by Erhard Wielandt
Copyright (C) 1996 by Wolfgang Friederich
Copyright (C) 2013 by Thomas Forbriger
----
......
# this is <Makefile>
# ----------------------------------------------------------------------------
# ($Id: Makefile 4961 2013-02-01 12:52:09Z lrehor $)
# ($Id$)
#
# 25/10/2000 by Thomas Forbriger (IMGF Frankfurt)
#
# libseife Makefile
#
# seife: seismic waveform filters
#
# ----
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -22,25 +24,11 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# ----
#
# This library contains code which was extracted from the program seife.f
# by Erhard Wielandt. The original version was written in 1984 at ETH Zurich.
# The code can be obtained through
# http://www.software-for-seismometry.de/
#
# The frontpage of http://www.software-for-seismometry.de/ tells (Jan. 2013):
#
# Welcome to Erhard Wielandt's website for free seismological software
#
# This website offers free software for practical use, especially for the
# design, calibration, and testing of seismographs. It also contains
# educational software and other material used in courses and workshops on
# seismometry. Special problems of seismometry and theoretical seismology are
# treated in the 'misc. texts'.
# If you are interested in software, please start from the software overview.
# Please have a look at the README file coming along with the source code in
# this directory for further notes regarding provided functionality,
# prerequisites and installation.
#
# The code from seife.f was extracted to a library by Wolfgang Friederich in
# 1996. The current version of libseife is a an extended code collection based
# on the abovementioned code.
#=============================================================================
#
# REVISIONS and CHANGES
# 25/10/2000 V1.0 Thomas Forbriger
......@@ -52,12 +40,13 @@
# 15/11/2010 V1.4 do not use fdep.sh
# 17/11/2010 V1.5 libseifemon.a is out of use
# 17/01/2011 V1.6 distinguish library creation and installation
# 10/06/2011 V1.7 preparing Makefile for export of cseife to
# the DENISE code by Lisa Rehor
#
# ============================================================================
#
CONTRIBDIR=..
include $(CONTRIBDIR)/Makefile_var
.PHONY: all
all: install doc
......@@ -67,46 +56,86 @@ doc:
LIBRARIES=libcseife.a
.PHONY: install
install:
$(MAKE) $(LIBRARIES)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# ============================================================================
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR)
#----------------------------------------------------------------------
CLIBSRC=$(wildcard cseife*.c)
HEADERS=$(shell find . -name \*.h)
INCINSTALLPATH=$(LOCINCLUDEDIR)
LIBINSTALLPATH=$(LOCLIBDIR)
# name of installed (exported) header files
INSTHEADER=$(addprefix $(INCINSTALLPATH)/,$(notdir $(HEADERS)))
.PHONY: clean edit
clean:
-find . -name \*.d | xargs --no-run-if-empty /bin/rm -v
-find . -name \*.o | xargs --no-run-if-empty /bin/rm -v
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-find . -name \*.o77 | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -fv flist
-/bin/rm -fv *.a
-/bin/rm -fv install-include *.a
edit: flist ; vim flist
flist: $(wildcard Makefile *.c *.h) COPYING
flist: $(wildcard subs/*.f *.f Makefile *.c *.h subs/*.inc) COPYING \
$(TF_EDIT) README
echo $^ | tr ' ' '\n' | sort > $@
AR=ar
AS=as
RANLIB=ranlib
CC=mpicc
FLAGS += $(MYFLAGS)
CFLAGS += -O3 -Wall $(FLAGS)
CPPFLAGS=$(addprefix -I,.) \
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash -Isubs $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
SUBS=$(patsubst %.f,%.o,$(wildcard subs/*.f))
%.o: %.f
$(FC) -O2 -o $@ -c $< $(FFLAGS)
.c.o:
$(CC) $(CFLAGS) $< -c $(CPPFLAGS)
#======================================================================
# Fortran include dependencies
%.d: %.f
echo $<: $(addprefix subs/,$(shell cat $< | egrep '^ +include' | cut -f 2 -d \' | sort | uniq)) > $@
include $(patsubst %.f,%.d,$(wildcard subs/*.f))
#======================================================================
$(INCINSTALLPATH)/%.h: %.h
mkdir -p $(INCINSTALLPATH)
-rm -fv $@
/bin/cp -vpd $< $@
.PHONY: install-include
install-include: $(INSTHEADER)
#======================================================================
# reinstall target
# is necessary in case of header file problems (e.g. remcmmnt not installed)
.PHONY: clean-include
clean-include:
/bin/rm -fv $(INSTHEADER)
.PHONY: reinstall
reinstall:
$(MAKE) clean
$(MAKE) clean-include
$(MAKE) install
#======================================================================
......@@ -126,10 +155,24 @@ reinstall:
include $(patsubst %.c,%.d,$(CLIBSRC))
libcseife.a: $(patsubst %.c,%.o,$(CLIBSRC))
libseife.a: $(SUBS)
libcseife.a:
libcseife.a libseife.a:
$(AR) rcv $@ $^
$(RANLIB) $@
#======================================================================
# create package
# --------------
# is delegated to Makefile.packages
ifdef TF_MAKEPKG
.PHONY: package
package: $(TF_MAKEPKG)
$(MAKE) -f $< \
PACKAGE=libseife \
PACKAGEEXPORT="trunk/src/libs/libseife:src" \
PACKAGETARGETS="src:all:" \
PACKAGELIBS="-"
endif
#
# ----- END OF Makefile -----
this is <README>
============================================================================
cseife
------
SEIFE --- seismic waveform filters
----------------------------------
$Id$
============================================================================
This directory contains source code for the library cseife. It was exportet
from TF_Software to DENISE. DENISE is hosted in the Trac-/svn-project
FWI_elastic (http://gpitrsvn.gpi.uni-karlsruhe.de/repos/FWI_elastic/DENISE).
For compilation instructions see README.1st in the root directory of the tar-ball or
http://gpitrsvn.gpi.uni-karlsruhe.de:8000/TFSoftware/wiki/docs/installation
libseife is a collection of Fortran 77 functions and subroutines for time
series analysis and digital filters. It is a full-grown signal processing
toolbox. A C API to the Fortran 77 code is provided as well.
This library contains code which was extracted from the program seife.f
by Erhard Wielandt. The original version was written in 1984 at ETH Zurich.
The code can be obtained through
http://www.software-for-seismometry.de/
See COPYING for copyright and license information.
The code from seife.f was extracted to a library by Wolfgang Friederich in
1996. The current version of libseife is a an extended code collection based
on the abovementioned code.
Installation
------------
environment variables:
LOCLIBDIR defines location of binary libraries
LOCINCLUDEDIR defines location of C header files (prototypes)
Exports:
Each time this source code is exported to DENISE the current version is
tagged. The directory containing the tagged version is named by the day
of the export (yyyymmdd) and can be found in
http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/export/cseife.
Fortran version: libseife.a
C version: libcseife.a
10/06/2011 First export of the version tagged in 20110610
01/02/2013 Export of version tagged in 20130201
make all installs headers and binary libraries
Dependencies
------------
external dependencies: -
internal dependencies: -
----- END OF README -----
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: cseife.c 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
......@@ -38,7 +38,7 @@
#define TF_CSEIFE_C_VERSION \
"TF_CSEIFE_C V1.2"
#define TF_CSEIFE_C_CVSID \
"$Id: cseife.c 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#include <cseife.h>
#include <stdio.h>
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: cseife.h 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
* \author Thomas Forbriger
* \date 14/01/2005
*
......@@ -41,7 +41,7 @@
#define TF_CSEIFE_H_VERSION \
"TF_CSEIFE_H V1.2"
#define TF_CSEIFE_H_CVSID \
"$Id: cseife.h 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#define SEIFE_EXIT_FAILURE 1
......
......@@ -7,7 +7,7 @@
* This algorithm was part of seife.f. A current version of seife.f can be
* obtained from http://www.software-for-seismometry.de/
*
* $Id: cseife_deriv.c 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
......@@ -37,7 +37,7 @@
#define TF_CSEIFE_DERIV_C_VERSION \
"TF_CSEIFE_DERIV_C V1.0 "
#define TF_CSEIFE_DERIV_C_CVSID \
"$Id: cseife_deriv.c 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#include <cseife.h>
......
......@@ -7,7 +7,7 @@
* This algorithm was part of seife.f. A current version of seife.f can be
* obtained from http://www.software-for-seismometry.de/
*
* $Id: cseife_gauss.c 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
......@@ -38,7 +38,7 @@
#define TF_CSEIFE_GAUSS_C_VERSION \
"TF_CSEIFE_GAUSS_C V1.1"
#define TF_CSEIFE_GAUSS_C_CVSID \
"$Id: cseife_gauss.c 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#include <cseife.h>
#include <stdio.h>
......
......@@ -7,7 +7,7 @@
* This algorithm was part of seife.f. A current version of seife.f can be
* obtained from http://www.software-for-seismometry.de/
*
* $Id: cseife_rekfl.c 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
......@@ -38,7 +38,7 @@
#define TF_CSEIFE_REKFL_C_VERSION \
"TF_CSEIFE_REKFL_C V1.1"
#define TF_CSEIFE_REKFL_C_CVSID \
"$Id: cseife_rekfl.c 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#include <stdio.h>
#include <cseife.h>
......
......@@ -7,7 +7,7 @@
* This algorithm was part of seife.f. A current version of seife.f can be
* obtained from http://www.software-for-seismometry.de/
*
* $Id: cseife_rfk.c 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
......@@ -37,7 +37,7 @@
#define TF_CSEIFE_RFK_C_VERSION \
"TF_CSEIFE_RFK_C V1.0 "
#define TF_CSEIFE_RFK_C_CVSID \
"$Id: cseife_rfk.c 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#include <cseife.h>
#include <math.h>
......
......@@ -7,7 +7,7 @@
* This algorithm was part of seife.f. A current version of seife.f can be
* obtained from http://www.software-for-seismometry.de/
*
* $Id: cseife_tides.c 4961 2013-02-01 12:52:09Z lrehor $
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
......@@ -37,7 +37,7 @@
#define TF_CSEIFE_TIDES_C_VERSION \
"TF_CSEIFE_TIDES_C V1.0 "
#define TF_CSEIFE_TIDES_C_CVSID \
"$Id: cseife_tides.c 4961 2013-02-01 12:52:09Z lrehor $"
"$Id$"
#include <cseife.h>
#include <math.h>
......
c this is <seife_common.inc>
c ----------------------------------------------------------------------------
c ($Id$)
c
c Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
c
c common block to set debug mode
c
c REVISIONS and CHANGES
c 11/07/2005 V1.0 Thomas Forbriger
c
c ============================================================================
c
c NOTICE: since the linker refuses to link blockdata subroutines that are
c placed in separate object files, we have to attach the initializing
c blockdata subroutine to one of our souce code files.
c
c Decision: the blockdata statement will be placed in seife_rfk.f
c
c debug mode is active, when .true.
logical ldebug
c
common /seife_global_flags/ ldebug
c
c ----- END OF seife_common.inc -----
# this is <.gitignore>
# ============================================================================
# files to be ignored by git
# --------------------------
# files in src/libs/libstfinv
# ---------------------------
#
# source code documentation
*.doc
*usage.cc
*usage.h
#
# binary executables of programs in test directory
tooltest
onlinehelp
#
# ----- END OF .gitignore -----
this is <COPYING>
============================================================================
libstfinv
---------
$Id: COPYING 4968 2013-02-01 13:58:05Z lrehor $
STFINV -- library for determination of source wavelet correction filter
============================================================================
Copyright (c) 2011,2013 by Thomas Forbriger
Copyright (c) 2011, 2013 by Thomas Forbriger
Copyright (c) 2011 Lisa Rehor (C test code)
Copyright (c) 2011 Martin Schäfer (C test code)
Copyright (c) 2011 Thomas Bohlen (C test code)
Copyright (c) 2011 Colorado School of Mines (segy.h in C test code)
The source code in this directory is part of libstfinv which compiles to
libstfinv.a
Most components od the library are provided under terms of the
GNU General Public License
Please check
test_libstfinv/src/LEGAL_STATEMENT_segy_h and
test_libstfinv_withpairs/src/LEGAL_STATEMENT_segy_h
for specific licensing conditions applying to source code used in the test
programs
----
libstfinv is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
......@@ -23,5 +35,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
----
----- END OF COPYING -----
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile 4968 2013-02-01 13:58:05Z lrehor $
#
# Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
#
......@@ -26,12 +25,14 @@
# required in addition to libstfinv.
#
# REVISIONS and CHANGES
# 05/05/2011 V1.0 Thomas Forbriger
# 05/05/2011 V1.0 Thomas Forbriger (thof)
# 03/02/2014 thof: do not strip comments from header files
#
# ============================================================================
#
include ../Makefile_var
CONTRIBDIR=..
include $(CONTRIBDIR)/Makefile_var
.PHONY: all
all: install doxydoc
......@@ -48,6 +49,33 @@ $(LOCLIBDIR)/%: install-include %
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# ============================================================================
# select groups of files
# they are used for editing and to create object file lists and dependencies
# whereever we find a README, we will use it
README=$(filter-out %.bak,$(shell find . -name README\*))
# the frame of doxygen documentation is palced in text files
DOXYTXT=$(shell find . -name doxygen\*.txt)
# C++ and C source code
SOURCEFILES=$(filter-out %usage.h, $(filter-out %usage.cc, \
$(wildcard *.h *.cc *.c tests/*.cc tests/*.c tests/*.inp) \
$(wildcard test*/src/*.c) \
$(wildcard test*/src/*.h) \
$(wildcard test*/src/LEGAL*h)))
# LaTeX formatted documentation
DOCFILES=$(wildcard doc/*.tex doc/Makefile)
# end-user usage information
USAGEFILES=$(wildcard usage/*usage.txt)
# editional files to be edited
EDITFILES=Makefile $(README) \
$(DOXYTXT) $(DOCFILES) $(USAGEFILES) \
$(SOURCEFILES) \
$(wildcard *.cfg) \
$(wildcard test*/src/Makefile) \
COPYING
# ============================================================================
# check for settings expected in the environment
# ----------------------------------------------
#
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
......@@ -56,9 +84,14 @@ CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
LIBHEADERS=$(filter-out none,$(wildcard *.h))
# ======================================================================
#
LIBHEADERS=$(filter-out none,$(wildcard *.h)) \
$(patsubst usage/%.txt,%.h,$(USAGEFILES))
LIBCCSRC=$(filter-out none,$(wildcard *.cc)) \
$(patsubst usage/%.txt,%.cc,$(USAGEFILES))
LIBCCSRC=$(filter-out none,$(wildcard *.cc))
LIBCSRC=$(filter-out none,$(wildcard *.c))
TESTHEADERS=$(wildcard tests/*.h)
......@@ -72,40 +105,37 @@ TESTCBIN=$(patsubst tests/%.c,%,$(TESTCSRC))
INCINSTALLPATH=$(LOCINCLUDEDIR)/stfinv
LIBINSTALLPATH=$(LOCLIBDIR)
# name of headers with comments stripped off
STRIPHEADER=$(addsuffix .strip,$(notdir $(LIBHEADERS)))
# name of installed (exported) header files
INSTHEADER=$(addprefix $(INCINSTALLPATH)/,$(notdir $(LIBHEADERS)))
# if defined, empty lines are kept in stripped comment headers
# to synchronize line numbers
EMPTYPRINT=1
#EMPTYPRINT=0
# define this to be cat in case you do not have remcmmnt available
ifndef TF_REMCMMNT
TF_REMCMMNT=cat
endif
#
# general part
# ------------
#
# compiler flags
# --------------
FLAGS=
FLAGS+=-fPIC $(MYFLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
EDITFILES=Makefile README $(wildcard *.cfg *.h *.cc *.c tests/*.cc tests/*.c) \
test_libstfinv/README test_libstfinv/Test_libstfinv.inp \
$(wildcard test_libstfinv/src/*.c) \