Commit 8fdfac31 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

migrated to new 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: 3221
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8daeac61
......@@ -26,6 +26,10 @@
# 05/06/2007 V1.0 Thomas Forbriger
# 08/10/2009 V1.1 moved to gfortran
# 16/07/2010 V1.2 use correct libpgplot
# 08/10/2010 V1.3 migrate to SVN environment
# discard f2c option (fallback solution)
# check environment
# discard package creation
#
# ============================================================================
#
......@@ -52,13 +56,12 @@
#
# ============================================================================
#
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
all: greda gabor phadi hivexpanco hivgabor
#----------------------------------------------------------------------
# standard edit targets
.PHONY: clean edit
flist: *.f Makefile *.inc
......@@ -69,66 +72,30 @@ edit: flist
clean:
-/bin/rm *.o *.bak
#----------------------------------------------------------------------
LINLIB=-llapex -lblasex
# LINLIB=-lf2cimslmath
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)
LINLIB=-llapack -lblas
BUGGY=
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
#PGPLOTLIB=-l$(TF_f2c_PGPLOT) -lX11 -L/usr/X11/lib
PGPLOTLIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
CC=gcc
CFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
PGPLOTLIB=$(TF_LINK_PGPLOT)
CFLAGS +=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
GFLAG=
#FFLAGS += -ff2c -Wall -ffixed-line-length-none $(FLAGS) -frecord-marker=4
# setting binary markers to 4 for gfortran 4.1 prevents reading the PGPLOT
# FONT file
FFLAGS += -ff2c -Wall -ffixed-line-length-none $(FLAGS)
ifeq ($(TF_FALLBACK),yes)
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib -L$(SERVERLIBDIR)
#PGPLOTLIB=-lpg -lgrx20
#CC=gcc
F2CFLAGS=-f -u
CFLAGS=-O2
endif
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(<:.f=.c) -c
@rm $(<:.f=.c)
%.o77: %.f
g77 -O2 -o $@ -c $< -Wall -ffixed-line-length-0 -fno-backslash
else
%.o: %.f; $(FC) -c -o $@ $< $(FFLAGS)
endif
make.incdep: *.f
incdep > make.incdep
-include make.incdep
ifeq ($(TF_FALLBACK),yes)
gredaimsl: greda.o
gcc -o greda greda.o -lts -ltf -lf2cimslmath \
-lnumrec -ltime -lsff $(F2CLIB)\
-L$(LOCLIBDIR) -L$(SERVERLIBDIR)
newprog greda
greda: greda.o greda_phasor.o
gcc -o $@ $^ -lsffu -lts -ltf -llapex -lblasex \
-lnumrec -ltime -lsff $(F2CLIB)\
-L$(LOCLIBDIR) -L$(SERVERLIBDIR)
newprog greda
hivexpanco hivgabor gabor phadi: %: %.o
gcc -o $@ $< -lsffu -lts -ltf -llapex -lblasex \
-lnumrec -ltime -lsff $(PGPLOTLIB) $(F2CLIB) \
-L$(LOCLIBDIR) -L$(SERVERLIBDIR)
newprog $@
else
gredaimsl: greda.o
$(FC) -o greda greda.o -lts -ltf -lf2cimslmath \
-lnumrec -ltime -lsff\
......@@ -136,38 +103,15 @@ gredaimsl: greda.o
/bin/mv -fv $@ $(LOCBINDIR)
greda: greda.o greda_phasor.o
$(FC) -o $@ $^ -lsffu -lts -ltf -llapack -lblas \
$(FC) -o $@ $^ -lsffu -lts -ltf $(LINLIB) \
-lnumrec -ltime -lsff\
-L$(LOCLIBDIR) -L$(SERVERLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
hivexpanco hivgabor gabor phadi: %: %.o
$(FC) -o $@ $< -lsffu -lts -ltf -llapex -lblasex \
$(FC) -o $@ $< -lsffu -lts -ltf $(LINLIB) \
-lnumrec -ltime -lsff $(PGPLOTLIB) \
-L$(LOCLIBDIR) -L$(SERVERLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
endif
#======================================================================
# create package
# --------------
VERSIONCODE=$(shell date +'%Y%m%d')
PACKAGE=disan$(VERSIONCODE)
PUBLICATIONPATH=$(HOME)/public_html/download/software
TMPPATH=$(HOME)/tmp/$(PACKAGE)
package:
/bin/rm -rfv $(TMPPATH); mkdir -pv $(TMPPATH)
cd $(TMPPATH)/..; cvs export -l -r HEAD \
-d $(PACKAGE) thof/src/green/disan
cd $(TMPPATH)/..; cvs export -r HEAD -d $(PACKAGE) thof/src/LICENSE.GPL
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.compile
/bin/bash -c 'cd $(TMPPATH); \
export LOCBINDIR=bin; mkdir -v bin; \
make all; make clean'
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
gzip --force -9 $(PUBLICATIONPATH)/$(PACKAGE).tar
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
bzip2 -f $(PUBLICATIONPATH)/$(PACKAGE).tar
# ----- END OF Makefile -----
......@@ -42,24 +42,22 @@
# REVISIONS and CHANGES
# 05/06/2007 V1.0 Thomas Forbriger
# 15/09/2008 V1.1 moved to gfortran
# 08/10/2010 V1.2 migrate to new SVN environment
# discard f2c fallback option
# check environment
# discard package creation
#
# ============================================================================
#
# 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: grepg grepg77
else
all: grepg
endif
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
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)
PGPLOTF2CLIB=-l$(TF_f2c_PGPLOT) $(TF_LINK_PGPLOT)
PGPLOT77LIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
FORTRANLIB=$(TF_LINK_FORTRAN)
FLAGS += $(MYFLAGS)
......@@ -71,11 +69,11 @@ FFLAGS += -ff2c -Wall -ffixed-line-length-none $(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)
#----------------------------------------------------------------------
# standard edit targets
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
......@@ -85,15 +83,7 @@ clean: ;
.PHONY: edit
edit: flist ; vim flist
flist: *.f *.inc Makefile ; echo $^ | tr ' ' '\n' | sort > $@
ifeq ($(TF_FALLBACK),yes)
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib -L$(SERVERLIBDIR)
#PGPLOTLIB=-lpg -lgrx20
#CC=gcc
F2CFLAGS=-f -u
CFLAGS=-O2
endif
#----------------------------------------------------------------------
GREBOBS=grepg.o grepg_message.o grepg_dopicks.o grepg_selstyle.o \
grepg_phase.o grepg_phasewedg.o grepg_poly.o grepg_remavg.o \
......@@ -104,61 +94,14 @@ make.incdep: *.f
include make.incdep
# only the original is in CVS
# so we can change the current dimensions without affecting the CVS
# only the original is in SVN
# so we can change the current dimensions without affecting the SVN
grepg_ardim.xxx.inc: grepg_ardim.inc; /bin/cp -v $< $@
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(FLAGS) \
$(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I$(LOCINCLUDEDIR)
@rm $(<:.f=.c)
%.o77: %.f
g77 -O2 -o $@ -c $< -Wall -ffixed-line-length-0 -fno-backslash
grepg77: $(GREBOBS:.o=.o77)
g77 $(FLAGS) $^ -o $@ -ltf77 -lpgplot52 -lX11 \
-L$(SERVERLIBDIR) -L$(LOCLIBDIR) -L/usr/X11/lib
newprog $@
grepg: $(GREBOBS)
$(CC) $(FLAGS) $(GREBOBS) -o grepg -ltf \
$(PGPLOTLIB) $(F2CLIB) -L$(LOCLIBDIR)
newprog grepg
else
%.f2c.o: %.f
f2c $(F2CFLAGS) $<
gcc $(CFLAGS) $(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
@rm $(<:.f=.c)
%.o: %.f; $(FC) -c -o $@ $< $(FFLAGS)
grepg: $(GREBOBS)
$(FC) $(FFLAGS) $^ -o $@ \
-ltf $(PGPLOT77LIB) $(LDFLAGS)
-ltf $(TF_LINK_PGPLOT) $(LDFLAGS)
/bin/mv -fv $@ $(LOCBINDIR)
endif
#======================================================================
# create package
# --------------
VERSIONCODE=$(shell date +'%Y%m%d')
PACKAGE=grepg$(VERSIONCODE)
PUBLICATIONPATH=$(HOME)/public_html/download/software
TMPPATH=$(HOME)/tmp/$(PACKAGE)
package:
/bin/rm -rfv $(TMPPATH); mkdir -pv $(TMPPATH)
cd $(TMPPATH)/..; cvs export -l -r HEAD \
-d $(PACKAGE) thof/src/green/grepg
cd $(TMPPATH)/..; cvs export -r HEAD -d $(PACKAGE) thof/src/LICENSE.GPL
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.compile
/bin/bash -c 'cd $(TMPPATH); \
export LOCBINDIR=bin; mkdir -v bin; \
make all; make clean'
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
gzip --force -9 $(PUBLICATIONPATH)/$(PACKAGE).tar
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
bzip2 -f $(PUBLICATIONPATH)/$(PACKAGE).tar
# ----- END OF Makefile -----
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