Commit 6aedc35e authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

proceeding with migration

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/trunk
SVN Revision: 2479
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 55e4aa4d
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.7 2007-12-07 09:21:55 tforb Exp $
# $Id: Makefile,v 1.8 2007-12-14 08:08:19 tforb Exp $
#
# Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)
#
......@@ -92,12 +92,16 @@ libts.doc: libts.f
ifeq ($(TF_FALLBACK),yes)
libts77.a: $(patsubst %.o,%.o77,$(LIBTSOBS))
$(AR) rcv $@ $^
$(RANLIB) $@
/bin/mv -fv $@ $(LOCLIBDIR)
else
lib2fcts.a: $(patsubst %.o,%.f2c.o,$(LIBTSOBS))
libf2cts.a: $(patsubst %.o,%.f2c.o,$(LIBTSOBS))
$(AR) rcv $@ $^
$(RANLIB) $@
/bin/mv -fv $@ $(LOCLIBDIR)
endif
libts.a: $(LIBTSOBS)
%.a:
$(AR) rcv $@ $^
$(RANLIB) $@
/bin/mv -fv $@ $(LOCLIBDIR)
......
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.1 2007-06-12 14:05:18 tforb Exp $
# $Id: Makefile,v 1.2 2007-12-14 08:08:20 tforb Exp $
#
# Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)
#
......@@ -49,7 +49,7 @@ dccal: \
-ltsxx -ltfxx -lsffxx -lgsexx -ltime++ -laff \
-llapack -lblas -lcseife -lsffxx -lg2c -lm\
-L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
newprog $@
/bin/mv -fv $@ $(LOCBINDIR)
#----------------------------------------------------------------------
......
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.8 2007-07-05 16:26:35 tforb Exp $
# $Id: Makefile,v 1.9 2007-12-14 08:08:20 tforb Exp $
#
# Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
#
......@@ -67,11 +67,17 @@
# REVISIONS and CHANGES
# 14/03/2002 V1.0 Thomas Forbriger
# 05/07/2007 V1.1 prepared for package creation
# 13/12/2007 V1.2 g77 is the standard Fortran compiler now
#
# ============================================================================
#
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
#
all: sehefi coma epi chaco sesoc offli sesot merse cooset
all: install
install: sehefi coma epi chaco sesoc offli sesot merse cooset
flist: Makefile $(wildcard *.f *.cc)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -84,34 +90,55 @@ clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o
FLAGS += $(MYFLAGS)
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
LIBSFF=-lsff -L$(SERVERLIBDIR)
LIBTF=-ltf -L$(LOCLIBDIR)
CC=gcc
CFLAGS=-O2
G2CLIB=-lg2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
FCFLAGS=-Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS=-O3 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
CXXFLAGS=-Wall $(FLAGS)
LDFLAGS=-L$(LOCLIBDIR)
LDFLAGS=-L$(LOCLIBDIR) $(FLAGS)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
CC=gcc
FC=g77
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
gcc $(CFLAGS) $(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
@rm $(<:.f=.c)
else
%.o: %.f; $(FC) -o $@ -c $(FCFLAGS) $<
endif
ifeq ($(TF_FALLBACK),yes)
sehefi coma epi chaco sesoc: %: %.o
$(CC) -o $@ $< $(LIBTF) $(LIBSFF) $(F2CLIB)
newprog $@
$(CC) -o $@ $< -ltf -lsff $(F2CLIB)
/bin/mv -fv $@
offli sesot merse: %: %.o
$(CC) -o $@ $< $(LIBTF) -lsffu -ltime_trad $(LIBSFF) $(F2CLIB)
newprog $@
$(CC) -o $@ $< -ltf -lsffu -ltime_trad -lsff $(F2CLIB)
/bin/mv -fv $@
cooset: %: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lsffxx -ltime++ -lgsexx -laff \
-ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
newprog $@
/bin/mv -fv $@
else
sehefi coma epi chaco sesoc: %: %.o
$(FC) -o $@ $< -ltf -lsff -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
offli sesot merse: %: %.o
$(FC) -o $@ $< -ltf -lsffu -ltime_trad -lsff -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
cooset: %: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lsffxx -ltime++ -lgsexx -laff \
-ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
/bin/mv -fv $@ $(LOCBINDIR)
endif
#======================================================================
# create package
......@@ -127,6 +154,8 @@ package:
cd $(TMPPATH)/..; cvs export -r HEAD -d $(PACKAGE) thof/src/LICENSE.GPL
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.compile
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.1st
/bin/bash -c 'cd $(TMPPATH); \
export LOCBINDIR=bin; mkdir -v bin; \
make all; make clean'
......
......@@ -126,7 +126,7 @@ c
50 format(/'trace ',i3,
& t20,'epicentral distance:',f10.3,' = ',f10.3,'km',
& /t10,'latitude: ',f10.3, t40,'longitude: ',f10.3
& /t10,' depth: ',f10.3,'km',t40,' radius: ';f10.3,'km')
& /t10,' depth: ',f10.3,'km',t40,' radius: ',f10.3,'km')
51 format(/'trace ',i3,
& t20,'epicentral distance:',f10.3,' = ',f10.3,'km',
& /t10,' X: ',f10.3,'km',t40,' Y: ',f10.3,'km',
......
......@@ -25,13 +25,14 @@ c REVISIONS and CHANGES
c 09/01/98 V1.0 Thomas Forbriger
c 13/01/98 V1.1 allow trace selection
c 13/05/00 V1.2 do not use idate anymore (it's not Y2K proof)
c 13/13/07 V1.3 small change to satisfy g77
c
c==============================================================================
c
program merse
c
character*79 version
parameter(version='MERSE V1.1 MERge SEismograms in SFF files')
parameter(version='MERSE V1.3 MERge SEismograms in SFF files')
c
c commandline
integer maxopt, lastarg, iargc
......@@ -165,7 +166,8 @@ c
& sc1, sc2, sc3, sdate, stime, ierr)
if (ierr.ne.0) stop 'ERROR: creating target file'
c
do ifile=firstsource,lastsource
ifile=firstsource
do while (ifile.le.lastsource)
c
call getarg(ifile, source)
c get selection
......@@ -179,7 +181,8 @@ c
print *,'NOTICE: found trace selection ',
& selstring(1:index(selstring, ' '))
firstchar=3
call tf_listselect(maxsel, selection, firstchar, selstring, ierr)
call tf_listselect(maxsel, selection,
& firstchar, selstring, ierr)
if (ierr.eq.0) then
nouseselect=.false.
elseif (ierr.eq.1) then
......
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 2.12 2007-12-13 15:45:59 tforb Exp $
# $Id: Makefile,v 2.13 2007-12-14 08:08:21 tforb Exp $
#
# Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)
#
......@@ -48,28 +48,45 @@
#
# REVISIONS and CHANGES
# 21/06/2007 V1.0 Thomas Forbriger
# 13/12/2007 V1.1 g77 is now the default Fortran compiler
#
# ============================================================================
#
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
ifeq ($(TF_FALLBACK),yes)
all: refract refract77
else
all: f2crefract refract
endif
flist: *.f sub/*.f include/*.inc Makefile
echo $^ | tr ' ' '\n' > $@
edit: flist
vim $<
clean:
-/bin/rm flist
find . \( -name \*.o -o -name \*.bak \) | xargs rm -v
ifeq ($(TF_FALLBACK),yes)
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib
PGPLOTLIB77=-lpgplot52 -lX11 -L/usr/X11/lib
LIBSFF=-lf2cstuff -L$(SERVERLIBDIR)
endif
LINLIB=-llapex -lblasex
# LINLIB=-lf2cimslmath
BUGGY=
FLAGS += $(MYFLAGS)
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u -Iinclude
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib64
PGPLOTLIB77=-lpgplot52 -lX11 -L/usr/X11/lib64
#PGPLOTLIB=-lpgplot52 -lX11 -L/usr/X11/lib
CC=gcc
CFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
FFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
CFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
FCFLAGS=-Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
#FFLAGS=-v -O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} -u -Wall \
# -fno-backslash -ffixed-line-length-0 -Wno-common
LIBSFF=-lf2cstuff -L$(SERVERLIBDIR)
GFLAG=
CC=gcc
FC=g77
REFSUB=refract_readdata.o refract_skipdata.o refract_setdefaults.o \
......@@ -85,45 +102,60 @@ REFOBS=refract.o $(addprefix sub/, $(REFSUB))
include make.incdep
make.incdep: *.f sub/*.f
incdep > make.incdep
docs: $(DOCS)
%.doc: %.f
extractdoc.tcl $< > $(<:.f=.doc)
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(GFLAG) $(notdir $(<:.f=.c)) -c -o $@
$(CC) $(CFLAGS) $(notdir $(<:.f=.c)) -c -o $@
@rm $(notdir $(<:.f=.c))
%.o77: %.f
$(FC) -o $@ -c $< -O2 -Wall -ffixed-line-length-0 -fno-backslash \
-Iinclude
clean:
-/bin/rm flist
find . \( -name \*.o -o -name \*.bak \) | xargs rm -v
refract: $(REFOBS)
$(CC) -o $(LOCBINDIR)/refract $(REFOBS) \
$(CC) -o refract $(REFOBS) \
-ltf -lsffu -lts -ltime -lsff \
$(PGPLOTLIB) \
-L$(LOCLIBDIR) $(F2CLIB)
/bin/mv -fv $@ $(LOCBINDIR)
refract77: $(patsubst %.o,%.o77,$(REFOBS))
$(FC) -o $@ $^ \
-ltf77 -lsffu77 -lts77 -ltime77 -lsff77 \
$(PGPLOTLIB77) \
-L$(LOCLIBDIR)
newprog $@
docs: $(DOCS)
/bin/mv -fv $@ $(LOCBINDIR)
else
%.f2c.o: %.f
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(notdir $(<:.f=.c)) -c -o $@
@rm $(notdir $(<:.f=.c))
make.incdep: *.f sub/*.f
incdep > make.incdep
%.o: %.f
$(FC) -o $@ -c $< -O2 $(FCFLAGS) -Iinclude
flist: *.f sub/*.f include/*.inc Makefile
echo $^ | tr ' ' '\n' > $@
refract: $(REFOBS)
$(FC) -o refract $(REFOBS) \
-ltf -lsffu -lts -ltime -lsff \
-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT) \
-L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
edit: flist
vim $<
f2crefract: $(patsubst %.o,%.f2c.o,$(REFOBS))
$(CC) -o $@ $^ \
-lf2ctf -lf2csffu -lf2cts -lf2ctime -lf2csff \
-l$(TF_f2c_PGPLOT) $(TF_LINK_PGPLOT) -lf2c -lm \
-L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
endif
#======================================================================
# create package
......@@ -139,6 +171,8 @@ package:
cd $(TMPPATH)/..; cvs export -r HEAD -d $(PACKAGE) thof/src/LICENSE.GPL
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.compile
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.1st
/bin/bash -c 'cd $(TMPPATH); \
export LOCBINDIR=bin; mkdir -v bin; \
make all; make clean'
......
c this is <refract_domodel.f>
c------------------------------------------------------------------------------
c $Id: refract_domodel.f,v 2.2 2007-06-21 11:06:47 tforb Exp $
c $Id: refract_domodel.f,v 2.3 2007-12-14 08:08:21 tforb Exp $
c
c 05/07/98 by Thomas Forbriger (IfG Stuttgart)
c
......@@ -121,7 +121,7 @@ c
double precision sqalpha
double precision range
logical rangeok
real redtime, redx, realtime, redy,realtmax
real redtime, redx, redy,realtmax
c
if (.not.((mod_valid).and.(elem_syntt))) return
c save settings
......
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