Commit 1fc3109f authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

sousou compiles with gfortran; provide sousoux

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: 3833
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent e4d3717e
......@@ -27,8 +27,21 @@
#
# ============================================================================
#
PROGRAMS=sousou sousoux
all: sousou
.PHONY: all
all: install doc
.PHONY: doc
doc: sousou.doc
.PHONY: install
install:
$(MAKE) $(PROGRAMS)
/bin/mv -fv $(PROGRAMS) $(LOCBINDIR)
#----------------------------------------------------------------------
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
......@@ -36,11 +49,13 @@ CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
LINLIB=-llapack -lblas
CC=gcc
CFLAGS=-O2 -I${LOCINCLUDEDIR}
LIBS=-lsffu -ltime
FLAGS += $(MYFLAGS) -fPIC
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
#----------------------------------------------------------------------
......@@ -53,7 +68,7 @@ edit: flist; vim $<
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o *.d *.doc
-/bin/rm -vf flist *.o *.d *.doc $(PROGRAMS)
#----------------------------------------------------------------------
......@@ -62,7 +77,7 @@ OBS=sousou.o sousou_readdata.o sousou_skipdata.o sousou_checks.o \
%.d: %.f
echo $<: $(shell cat $< | egrep '^ +include' | cut -f 2 -d \' | sort | uniq) > $@
-include $(patsubst %.o,%.d,$(OBS))
include $(patsubst %.o,%.d,$(OBS))
sousou.doc: $(patsubst %.o,%.f,$(OBS))
/usr/bin/awk 'BEGIN{ hot=0; } \
......@@ -74,10 +89,15 @@ sousou.doc: $(patsubst %.o,%.f,$(OBS))
{ if (hot==1) { print " " $$0; } }' $^ > $@
sousou: $(OBS)
$(FC) -o $(LOCBINDIR)/$@ $(OBS) \
-ltf -lts $(LIBS) -lsff \
$(TF_LINK_PGPLOT) $(LINLIB) \
$(FC) -o $@ $(OBS) \
-ltf -lts -lsffu -lsff -ltime \
$(TF_LINK_PGPLOT) -llapack -lblas \
-L$(LOCLIBDIR)
sousoux: $(OBS)
$(FC) -o $@ $(OBS) \
-ltf -lts -lsffu -lfapidxx -ldatrwxx -lsffxx -lgsexx -laff -ltime++ \
$(TF_LINK_PGPLOT) -llapack -lblas \
-L$(LOCLIBDIR)
# ----- END OF Makefile -----
......@@ -64,7 +64,7 @@ c sff file header
c
c sff trace
logical last
character rcs*1, wid2line*10
character rcs*1, wid2line*132
real rc1, rc2, rc3, tanf
integer nstack
c
......@@ -80,7 +80,10 @@ c ok go
allnsamples=0
hot=.true.
c
do i=(lastarg+1),iargc()
i=lastarg
c
do while (i.le.iargc())
i=i+1
c still enough data space left?
if (hot) then
c
......
......@@ -39,45 +39,12 @@ c
c
cE
c declare variables
integer ierr, nchar, i
real ampfac
character code*20, lid*5
integer ierr
character code*20
c go
read(lu, '(a5,1x,i10,1x,e16.6,1x,a)', err=99, end=98)
& lid, nchar, ampfac, code
if (lid.ne.'DAST ')
& stop 'ERROR (skipdata): data block doesn''t begin with DAST line'
read(lu, '(a)', err=99, end=98) lid
if (lid.ne.'WID2 ')
& stop 'ERROR (skipdata): data block doesn''t contain WID2 line'
read(lu, '(a)', err=99, end=98) lid
if (lid.ne.'DAT2 ')
& stop 'ERROR (skipdata): data block doesn''t contain DAT2 line'
do i=1,(nchar/80)
read(lu, '(1x)')
enddo
read(lu, '(a)', err=99, end=98) lid
if (lid.ne.'CHK2 ')
& stop 'ERROR (skipdata): data block doesn''t end with CHK2 line\n'
c
i=1
last=.true.
1 if (code(i:i).ne.' ') then
if (code(i:i).eq.'F') then
call sff_SkipFree(lu, ierr)
if (ierr.ne.0) stop 'ERROR (skipdata): skipping FREE block'
endif
if (code(i:i).eq.'I') read(lu,'(1x)', err=99, end=98)
if (code(i:i).eq.'D') last=.false.
i=i+1
goto 1
endif
c
if (last) close(lu)
c
call sff_skipdata(lu, code, last, ierr)
if (ierr.ne.0) stop 'ERROR (skipdata): skipping trace'
return
99 stop 'ERROR (skipdata): reading file'
98 stop 'ERROR (skipdata): unexpected end of file'
end
c
c ----- END OF fidase_skipdata.f -----
......@@ -42,7 +42,7 @@ c
character outfile*(*)
character comment*(*)
c
integer lu, ierr, i
integer lu, ierr
parameter(lu=11)
c
integer itrace, ifile, isamp
......@@ -112,7 +112,7 @@ c
enddo
call tf_fork(nspecsamp, outspec, 1.)
do isamp=1,nspecsamp
outdata(isamp)=sngl(real(outspec(isamp)))
outdata(isamp)=real(outspec(isamp))
enddo
c
call sff_WTraceFI(lu, wid2line, nspecsamp,
......
......@@ -50,7 +50,7 @@ c source
character stype*20, sdate*6, stime*10
c
complex fact,ime
real pi,timeshift,freq
real pi,freq
parameter(pi=3.1415927,ime=(0.,1.))
c data
complex outspec(maxspec)
......@@ -124,7 +124,7 @@ c print *,'FT'
call tf_fork(nspecsamp, outspec, 1.)
c print *,'copy back'
do isamp=1,nspecsamp
outdata(isamp)=sngl(real(outspec(isamp)))
outdata(isamp)=real(outspec(isamp))
enddo
c
c print *,'write'
......
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