The followings are the makefile and a simplified shell file I
create.
makefile:
# g95/Cygwin on Windows
# ----------------------------------
FC = g95
DFLAGS =
FFLAGS =
MODFLAGS = -c
FFLAGSP4 = -
FFLAGS0 =
FPP = -fpp -DIFC
F = f90
OBJ = o
EXENAME = -o findrule
CODEDIR =
MKLDIR = /opt/intel/mkl721/lib/32
MKLP4 = $(MKLDIR)/libmkl_lapack.a $(MKLDIR)/libmkl_ia32.a $
(MKLDIR)/libguide.a -lpthread
MKLP4FPP = -DMKL
OBJCODE = $(CODEDIR)stdtypes.$(OBJ) $(CODEDIR)mtprng.$
(OBJ) $(CODEDIR)TAGP_Modules.$(OBJ) \
$(CODEDIR)f2kcli.$(OBJ) $(CODEDIR)mrgrnk.$
(OBJ) $(CODEDIR)solvopt.$(OBJ) \
$(CODEDIR)TAGP_IO_Options.$(OBJ) $
(CODEDIR)TAGP_Utilities.$(OBJ) \
$(CODEDIR)TAGP_Populate.$(OBJ) $(CODEDIR)TAGP_IO_Data.$
(OBJ) $(CODEDIR)TAGP_IO.$(OBJ) \
$(CODEDIR)TA_Evaluate.$(OBJ) $(CODEDIR)TAGP_IO_Final.
$(OBJ) \
$(CODEDIR)TAGP_Edit.$(OBJ) $(CODEDIR)TAGP_Breed.$
(OBJ)
CODE = $(CODEDIR)stdtypes.$(F) $(CODEDIR)mtprng.$
(F) $(CODEDIR)TAGP_Modules.$(F) \
$(CODEDIR)f2kcli.$(F) $(CODEDIR)mrgrnk.$
(F) $(CODEDIR)solvopt.$(F) \
$(CODEDIR)TAGP_IO_Options.$(F) $(CODEDIR)TAGP_Utilities.$
(F) \
$(CODEDIR)TAGP_Populate.$(F) $(CODEDIR)TAGP_IO_Data.$
(F) $(CODEDIR)TAGP_IO.$(F) \
$(CODEDIR)TA_Evaluate.$(F) $(CODEDIR)TAGP_IO_Final.$
(F) \
$(CODEDIR)TAGP_Edit.$(F) $(CODEDIR)TAGP_Breed.$(F)
all:
$(FC) $(MODFLAGS) $(FFLAGS0) $(FPP) $(DFLAGS) $(CODE)
$(FC) $(FPP) $(EXENAME) $(FFLAGS) $(FFLAGSP4) $(DFLAGS) $(CODE) $
(CODEDIR)TAGP.f90
debug:
$(FC) $(MODFLAGS) $(FFLAGS0) $(FPP) $(DFLAGS) $(CODE)
$(FC) $(FPP) $(EXENAME) $(DFLAGS) $(CODE) $(CODEDIR)TAGP.f90
mkl:
$(FC) $(MODFLAGS) $(FFLAGS0) $(FPP) $(DFLAGS) $(CODE)
$(FC) $(FPP) $(MKLP4FPP) $(EXENAME) $(FFLAGS) $(FFLAGSP4) $(CODE) $
(CODEDIR)TAGP.f90 $(MKLP4)
clean:
rm *.$(OBJ) *.mod
make.sh
#!/usr/bin/bash
g95 -c -cpp -DG95 stdtypes.f90 mtprng.f90 TAGP_Modules.f90 mrgrnk.f90
solvopt.f90 TAGP_IO_Options.f90 TAGP_Utilities.f90 TAGP_Populate.f90
TAGP_IO_Data.f90 TAGP_IO.f90 TA_Evaluate.f90 TAGP_IO_Final.f90
TAGP_Edit.f90 TAGP_Breed.f90
g95 -cpp -DG95 -ftrace=full -o findrule stdtypes.f90 mtprng.f90
TAGP_Modules.f90 mrgrnk.f90 solvopt.f90 TAGP_IO_Options.f90
TAGP_Utilities.f90 TAGP_Populate.f90 TAGP_IO_Data.f90 TAGP_IO.f90
TA_Evaluate.f90 TAGP_IO_Final.f90 TAGP_Edit.f90 TAGP_Breed.f90 TAGP.f90
If you want to use Compaq Visual Fortran, why does the make file
refers to g95, a very different compiler?
# Intel Fortran Compiler for Linux 7.0
# ----------------------------------
FC = ifort
DFLAGS = -C -Vaxlib -g
FFLAGS = -O3 -Vaxlib -ipo -pad -w95 -parallel
MODFLAGS = -c
FFLAGSP4 = -tpp7 -xW
Dunno, never looked if there's something provided or not -- well,
actually, I know there is but I never used it. You can have one
auto-generated from the IDE by some incantation which I also haven't
done, but I'm sure the help files along with some experimentation
could/would lead you to it.
> Can I compile the bunch of Fortran applications directly without
> makefile?
Of course. Make a batch file containing the options you want and submit
it at the command line in whatever CLI you choose (I use the JPSoft
4DOS/4NT in lieu of the MS-supplied, but can manage most anything w/ MS
with enough tribulation).
"df /?" at the command line will list all options for the compiler
although you may find the helpfiles more convenient.
--
As far as I can see, you should be able to build findrule.exe by typing
the following command in a Command Prompt window:
df stdtypes.f90 mtprng.f90 TAGP_Modules.f90 mrgrnk.f90 solvopt.f90
TAGP_IO_Options.f90 TAGP_Utilities.f90 TAGP_Populate.f90
TAGP_IO_Data.f90 TAGP_IO.f90 TA_Evaluate.f90 TAGP_IO_Final.f90
TAGP_Edit.f90 TAGP_Breed.f90 TAGP.f90 /exe:findrule.exe
If it gives module errors just repeat the command (the modules need to
be created before use). I can't see any reason to use Cygwin if you are
compiling with CVF. You might still want to create a makefile though.
You can use the MS program nmake (read the docs). Don't you have MS
Visual Studio? This is what I use with CVF instead of makefiles.
I had the IDE open and thought to look...
Project--> Export Makefile
--
Yes...but if you really want to use VISUAL Fortran, then you would
probably be using the IDE and it's quite nice project management features.
>
> --
--
Gary Scott
mailto:garylscott@sbcglobal dot net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
If you want to do the impossible, don't hire an expert because he knows
it can't be done.
-- Henry Ford
True (and mostly why I didn't recall initially), but that wasn't the
question asked... :)
--
I know...I forgot to add that the VS project management features are
less to my liking in more recent versions (the "solution" versions).