Commit 448134e2 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

migrated to SVN environment

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: 3213
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 05f24299
......@@ -10,26 +10,25 @@
# 30/01/2007 V1.0 Thomas Forbriger
# 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 SVN environment
# - discard f2c option
#
# ============================================================================
#
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
PROGRAMS=damplo pamo polplot splot stuplo susplo
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
G2CLIB=-lg2c -lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
all: $(PROGRAMS)
#----------------------------------------------------------------------
# check environment
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_LINK_PGPLOT TF_LINK_FORTRAN)
PGPLOTF2CLIB=-l$(TF_f2c_PGPLOT) $(TF_LINK_PGPLOT)
PGPLOT77LIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
ifeq ($(TF_FALLBACK),yes)
PGPLOTLIB=$(PGPLOTF2CLIB)
else
PGPLOTLIB=$(PGPLOT77LIB)
endif
PGPLOTLIB=$(TF_LINK_PGPLOT) $(TF_LINK_FORTRAN)
FLAGS += $(MYFLAGS)
CFLAGS += -O2 $(FLAGS)
......@@ -44,8 +43,8 @@ FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
DIRS=-L$(SERVERLIBDIR) -L$(LOCLIBDIR) -I$(SERVERINCLUDEDIR) -I$(LOCINCLUDEDIR)
all: $(PROGRAMS)
#----------------------------------------------------------------------
# standard edit targets
flist: Makefile $(wildcard *.f *.cc)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -57,92 +56,19 @@ clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist
-/bin/rm *.o *.bak *.o77
#----------------------------------------------------------------------
# pattern rules
ifeq ($(TF_FALLBACK),yes)
%.o: %.f
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I$(LOCINCLUDEDIR)
@rm $(<:.f=.c)
%.o77: %.f
$(FC) -o $@ -c $< $(OPTFLAGS) $(G77FLAGS)
else
%.f2c.o: %.f
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(<:.f=.c) -c -o $@ \
-I${SERVERINCLUDEDIR} -I$(LOCINCLUDEDIR)
@rm $(<:.f=.c)
%.o: %.f
$(FC) -o $@ -c $< $(FFLAGS)
endif
ifeq ($(TF_FALLBACK),yes)
susplo: susplo.o
$(CC) $^ -o $@ -ltf -lsff $(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR)
newprog $@
splot: splot.o
$(CC) splot.o -o splot -ltf -lsff \
$(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR)
newprog splot
pamo77 tesiff77: %77: %.o77
$(FC) $< -o $@ -lsffu77 -ltime77 -lsff77 -ltf77 \
$(PGPLOTLIB77) -L$(LOCLIBDIR) -L$(SERVERLIBDIR)
newprog $@
pamo: pamo.o
$(CC) pamo.o -o pamo -lsffu -ltime -lsff -ltf \
$(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR)
newprog pamo
stuplo77: stuplo.o77
$(FC) $< -o $@ -lsff77 -ltf77 \
$(PGPLOTLIB77) -L$(LOCLIBDIR) -L$(SERVERLIBDIR)
newprog $@
stuplo77.static: stuplo.o77
$(FC) $< -o $@ -lsff77 -ltf77 \
$(PGPLOTLIB77) -ldl -L$(LOCLIBDIR) -L$(SERVERLIBDIR) -static
newprog $@
stuplo: stuplo.o
$(CC) stuplo.o -o stuplo -lsff -ltf \
$(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR)
newprog stuplo
stuplo.static: stuplo.o
$(CC) stuplo.o -o stuplo -lsff -ltf \
$(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR) -static
newprog $@
damplo: damplo.o
$(CC) damplo.o -o damplo -lsffu -ltime -lsff -ltf\
$(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR)
newprog damplo
else
# targets
stuplo splot susplo: %: %.o
$(FC) $< -o $@ -ltf -lsff $(PGPLOTLIB) -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
pamo damplo: %: %.o
$(FC) $< -o $@ -ltf -lsffu -ltime -lsff $(PGPLOTLIB) -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
f2cstuplo f2csplot f2csusplo: f2c%: %.f2c.o
$(CC) $< -o $@ -lf2ctf -lf2csff \
$(PGPLOTF2CLIB) -L$(LOCLIBDIR) $(G2CLIB)
/bin/mv -fv $@ $(LOCBINDIR)
f2cpamo f2cdamplo: f2c%: %.f2c.o
$(CC) $< -o $@ -lf2ctf -lf2csffu -lf2ctime -lf2csff \
$(PGPLOTF2CLIB) -L$(LOCLIBDIR) $(G2CLIB)
/bin/mv -fv $@ $(LOCBINDIR)
endif
stuploxx: %: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lpgplotCpp -lcpgplot \
$(PGPLOTLIB) $(TF_LINK_FORTRAN) \
-ltfxx -ltsxx -ldatreadxx -lsffxx -lgsexx -ltime++ -laff \
-L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
newprog $@
# ----- END OF Makefile -----
......@@ -16,22 +16,24 @@
# 11/07/2005 V1.0 Thomas Forbriger
# 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
# - discard f2c fallback
# - use FFTW3
#
# ============================================================================
#
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
PROGRAMS=tsfilt stufi rotate coro xyz2uvw susei evelo tesiff teswf \
phasedsignals hamres siggen smoos dise foutra teseco resaseda gatherdiff \
autocorr cross tidofi fredofi sigfit noisymize
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
all: $(PROGRAMS)
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_LINK_FORTRAN)
PGPLOTF2CLIB=-l$(TF_f2c_PGPLOT) $(TF_LINK_PGPLOT)
PGPLOT77LIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
FORTRANLIB=$(TF_LINK_FORTRAN)
FLAGS += $(MYFLAGS)
......@@ -40,28 +42,13 @@ FFLAGS += -ff2c -Wall -ffixed-line-length-0 $(FLAGS)
# use STATIC=-static to produce statically linked binaries
STATIC=
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
CXXFLAGS=-Wall $(FLAGS)
LDFLAGS=-L$(LOCLIBDIR) $(STATIC)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
gcc $(CFLAGS) $(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
@rm $(<:.f=.c)
%.o77: %.f; $(FC) -c -o $@ $<
else
%.f2c.o: %.f
f2c $(F2CFLAGS) $<
gcc $(CFLAGS) $(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
@rm $(<:.f=.c)
%.o: %.f; $(FC) -c -o $@ $< $(FFLAGS)
endif
all: $(PROGRAMS)
CXXFLAGS+=-fhonor-std -Wall $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR) $(STATIC)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
#----------------------------------------------------------------------
# standard edit targets
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
......@@ -72,36 +59,13 @@ flist: $(wildcard *.f *.inc Makefile *.cc *.gpt)
.PHONY: edit
edit: flist; vim $<
#----------------------------------------------------------------------
# pattern rules
ifeq ($(TF_FALLBACK),yes)
tsfilt: tsfilt.o
$(CC) $(CFLAGS) $< -o $@ -lseife -ltf \
$(F2CLIB) -L$(LOCLIBDIR) -static
newprog $@
stufi: stufi.o
$(CC) $(CFLAGS) $< -o $@ -lseife -ltf -lsff \
$(F2CLIB) -L$(LOCLIBDIR) -static
newprog $@
rotate coro xyz2uvw: %: %.o
$(CC) $(CFLAGS) $< -o $@ -lsff $(F2CLIB) -L$(LOCLIBDIR) -ltf
newprog $@
susei evelo tesiff teswf: %: %.o
$(CC) $(CFLAGS) $< -o $@ -ltf -lsff $(F2CLIB) -L$(LOCLIBDIR)
newprog $@
susei77 evelo77 tesiff77 teswf77: %77: %.o77
$(FC) $(CFLAGS) $< -o $@ -ltf77 -lsff77 -L$(LOCLIBDIR)
newprog $@
%.o: %.f; $(FC) -c -o $@ $< $(FFLAGS)
phasedsignals hamres siggen smoos dise: %: %.o
$(CC) $(CFLAGS) $< -o $@ -ltf -lsffu -ltime -lsff -lgsl -lm \
-lgslcblas $(F2CLIB) \
-L$(LOCLIBDIR)
newprog $@
else
#----------------------------------------------------------------------
# tagrets
tsfilt: %: %.o
$(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -lseife -ltf
/bin/mv -fv $@ $(LOCBINDIR)
......@@ -115,11 +79,10 @@ phasedsignals hamres siggen smoos dise: %: %.o
$(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ \
-ltf -lsffu -ltime -lsff -lgsl -lm -lgslcblas
/bin/mv -fv $@ $(LOCBINDIR)
endif
deconv foutra sigval: \
%: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lfourierxx -ldrfftw -ldfftw -lm \
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lfourierxx -lfftw3 -lm \
-lsffxx -ldatreadxx -llinearxx \
-ltsxx -ltfxx -lsffxx -lgsexx -ltime++ -laff \
-llapack -lblas -lcseife -lsffxx $(FOTRANLIB) -lm\
......
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