Commit 7a8219d4 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

gfortran

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: 2634
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent bb78c44d
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.9 2007-06-05 09:35:48 tforb Exp $
# $Id: Makefile,v 1.10 2008-09-15 15:17:01 tforb Exp $
#
# Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)
#
......@@ -41,28 +41,56 @@
#
# REVISIONS and CHANGES
# 05/06/2007 V1.0 Thomas Forbriger
# 15/09/2008 V1.1 moved to gfortran
#
# ============================================================================
#
# 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
PGPLOTF2CLIB=-l$(TF_f2c_PGPLOT) $(TF_LINK_PGPLOT)
PGPLOT77LIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
FORTRANLIB=$(TF_LINK_FORTRAN)
FLAGS += $(MYFLAGS)
CFLAGS += -O2 $(FLAGS)
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)
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist
-/bin/rm -v *.o *.bak *.o77 flist
-/bin/rm -v *.o *.bak *.o77 flist *.f2.o
.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 \
......@@ -77,6 +105,7 @@ include make.incdep
# so we can change the current dimensions without affecting the CVS
grepg_ardim.xxx.inc: grepg_ardim.inc; /bin/cp -v $< $@
ifeq ($(TF_FALLBACK),yes)
.f.o:
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(FLAGS) \
......@@ -95,6 +124,17 @@ 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) $(LDFLAGS) $^ -o $@ \
-ltf $(PGPLOT77LIB)
/bin/mv -fv $@ $(LOCBINDIR)
endif
#======================================================================
# create package
......
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