Commit 0059bac3 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: 3238
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 4acee2c1
......@@ -50,19 +50,16 @@
# 21/06/2007 V1.0 Thomas Forbriger
# 13/12/2007 V1.1 g77 is now the default Fortran compiler
# 17/12/2007 V1.2 moved to gfortran
# 11/10/2010 V1.3 migrate to SVN environment
# - discard f2c option (fallback)
# - check environment
#
# ============================================================================
#
# 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: refract
endif
all: refract
#----------------------------------------------------------------------
# standard edit targets
flist: *.f sub/*.f include/*.inc Makefile
echo $^ | tr ' ' '\n' > $@
......@@ -72,18 +69,15 @@ edit: flist
clean:
-/bin/rm flist
find . \( -name \*.o -o -name \*.bak -o -name \*.o77 \) | xargs rm -v
#----------------------------------------------------------------------
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
ifeq ($(TF_FALLBACK),yes)
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib
PGPLOTLIB77=-lpgplot52 -lX11 -L/usr/X11/lib
LIBSFF=-lf2cstuff -L$(SERVERLIBDIR)
endif
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_LINK_PGPLOT)
LINLIB=-llapex -lblasex
# LINLIB=-lf2cimslmath
FLAGS += $(MYFLAGS)
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u -Iinclude
CFLAGS += -O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
......@@ -108,75 +102,14 @@ docs: $(DOCS)
%.doc: %.f
extractdoc.tcl $< > $(<:.f=.doc)
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
$(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
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)
/bin/mv -fv $@ $(LOCBINDIR)
else
%.f2c.o: %.f
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(notdir $(<:.f=.c)) -c -o $@
@rm $(notdir $(<:.f=.c))
%.o: %.f
$(FC) -o $@ -c $< -O2 $(FFLAGS) -Iinclude
refract: $(REFOBS)
$(FC) -o refract $(REFOBS) \
-ltf -lsffu -lts -ltime -lsff \
-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT) \
$(TF_LINK_PGPLOT) \
-L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
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
# --------------
VERSIONCODE=$(shell date +'%Y%m%d')
PACKAGE=refract$(VERSIONCODE)
PUBLICATIONPATH=$(HOME)/public_html/download/software
TMPPATH=$(HOME)/tmp/$(PACKAGE)
package:
/bin/rm -rfv $(TMPPATH); mkdir -pv $(TMPPATH)
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/ts/refract
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'
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